Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Convert from/to ternary #31

Closed
markiewb opened this issue Apr 24, 2014 · 1 comment
Closed

Convert from/to ternary #31

markiewb opened this issue Apr 24, 2014 · 1 comment
Milestone

Comments

@markiewb
Copy link
Owner

FIXED

<!description="Convert to ternary">
    if ($cond$){
            $var = $a;
        }else{
            $var = $b;
        }
=>     

$var = ($cond$)?$a:$b;
;;

        if ($cond$){
            return $a;
        }else{
            return $b;
        }

return ($cond$)?$a:$b;


 <!description="Convert ternary to if/else">
return ($cond$)?$a:$b;
=>      if ($cond$){
            return $a;
        }else{
            return $b;
        }
;;

<!description="Convert ternary to if/else">
$var = ($cond$)?$a:$b;
=>      if ($cond$){
            $var = $a;
        }else{
            $var = $b;
        }
;;


@markiewb markiewb added this to the 1.2 milestone May 4, 2014
markiewb added a commit that referenced this issue May 12, 2014
markiewb added a commit that referenced this issue May 14, 2014
markiewb added a commit that referenced this issue May 14, 2014
* feature/issue-31-convert2ternary:
  issue #31: Convert from/to ternary - 2ifelse hints * updated description too
  issue #31: Convert from/to ternary - 2ternary hints
  issue #31: draft
@markiewb
Copy link
Owner Author

Fixed in 1.2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant