aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorMihai Bazon <mihai@bazon.net>2014-01-05 11:48:01 +0200
committerMihai Bazon <mihai@bazon.net>2014-01-05 11:48:01 +0200
commit5e4c7f42454f12761a95241a03e6b36a46df2283 (patch)
treefa219f013dda1728040efd5f6a9cfac6bd940eb6 /lib
parentb521b4b926f7a385ed14ec07bc4b5dad9ebcd93b (diff)
downloadtracifyjs-5e4c7f42454f12761a95241a03e6b36a46df2283.tar.gz
tracifyjs-5e4c7f42454f12761a95241a03e6b36a46df2283.zip
Fix parens for property access -- (foo, bar)["baz"]
Diffstat (limited to 'lib')
-rw-r--r--lib/output.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/output.js b/lib/output.js
index 9ed155b4..0c339c44 100644
--- a/lib/output.js
+++ b/lib/output.js
@@ -463,7 +463,7 @@ function OutputStream(options) {
|| p instanceof AST_Unary // !(foo, bar, baz)
|| 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_PropAccess // (1, {foo:2}).foo or (1, {foo:2})["foo"] ==> 2
|| p instanceof AST_Array // [ 1, (2, 3), 4 ] ==> [ 1, 3, 4 ]
|| p instanceof AST_ObjectProperty // { foo: (1, 2) }.foo ==> 2
|| p instanceof AST_Conditional /* (false, true) ? (a = 10, b = 20) : (c = 30)