Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Emit better formated if statements.
  • Loading branch information
pmurias committed Sep 17, 2014
1 parent e6ef35a commit 11a008a
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/vm/js/QAST/Compiler.nqp
Expand Up @@ -513,13 +513,13 @@ class QAST::OperationsJS {

Chunk.new($want, $result, [
$boolifed_cond,
"if ({$boolifed_cond.expr}) \{",
"if ({$boolifed_cond.expr}) \{\n",
$then,
$want != $T_VOID ?? "$result = {$then.expr}" !! '',
"\} else \{",
$want != $T_VOID ?? "$result = {$then.expr};\n" !! '',
"\} else \{\n",
$else,
$want != $T_VOID ?? "$result = {$else.expr}" !! '',
"\}"
$want != $T_VOID ?? "$result = {$else.expr};\n" !! '',
"\}\n"
], :node($node));
});
}
Expand Down

0 comments on commit 11a008a

Please sign in to comment.