diff options
author | Mihai Bazon <mihai@bazon.net> | 2012-10-13 14:32:08 +0300 |
---|---|---|
committer | Mihai Bazon <mihai@bazon.net> | 2012-10-13 14:32:08 +0300 |
commit | b071c9d079e3acbfb521a6634364c5816d3be280 (patch) | |
tree | e89ac0a0a53bc62c9f593e8e0687dc8d25a09490 | |
parent | 851b48e4a3ecdbe7d77ec827f94d67092d2890ef (diff) | |
download | tracifyjs-b071c9d079e3acbfb521a6634364c5816d3be280.tar.gz tracifyjs-b071c9d079e3acbfb521a6634364c5816d3be280.zip |
add parens to AST_Seq whose parent is AST_Unary
-rw-r--r-- | lib/output.js | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/output.js b/lib/output.js index 25b601ef..674ae4db 100644 --- a/lib/output.js +++ b/lib/output.js @@ -403,6 +403,7 @@ function OutputStream(options) { PARENS(AST_Seq, function(output){ 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_VarDef // var a = (1, 2), b = a + a; ==> b == 4 || p instanceof AST_Dot // (1, {foo:2}).foo ==> 2 |