diff options
author | Mihai Bazon <mihai@bazon.net> | 2012-10-22 11:49:58 +0300 |
---|---|---|
committer | Mihai Bazon <mihai@bazon.net> | 2012-10-22 11:58:06 +0300 |
commit | 30faaf13edca3a4db6867e8faf0f0b68c6ac11e0 (patch) | |
tree | 64f82f6c9979427ba17b99603197d5b327b12c04 /lib/output.js | |
parent | 41be8632d3ec2ac0bae566aab97f40d7d7146142 (diff) | |
download | tracifyjs-30faaf13edca3a4db6867e8faf0f0b68c6ac11e0.tar.gz tracifyjs-30faaf13edca3a4db6867e8faf0f0b68c6ac11e0.zip |
more sequence optimizations (lift some sequences above binary/unary expressions so that we can avoid parens)
Diffstat (limited to 'lib/output.js')
-rw-r--r-- | lib/output.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/output.js b/lib/output.js index 8d2c4d39..4b515ecd 100644 --- a/lib/output.js +++ b/lib/output.js @@ -414,7 +414,7 @@ function OutputStream(options) { var p = output.parent(); return p instanceof AST_Call // (foo, bar)() or foo(1, (2, 3), 4) || p instanceof AST_Unary // !(foo, bar, baz) - || p instanceof AST_Binary // 1 + (2, 3) + 4 ==> 7 + || p instanceof AST_Binary // 1 + (2, 3) + 4 ==> 8 || p instanceof AST_VarDef // var a = (1, 2), b = a + a; ==> b == 4 || p instanceof AST_Dot // (1, {foo:2}).foo ==> 2 || p instanceof AST_Array // [ 1, (2, 3), 4 ] ==> [ 1, 3, 4 ] |