diff options
author | Mihai Bazon <mihai@bazon.net> | 2012-11-07 11:49:06 +0200 |
---|---|---|
committer | Mihai Bazon <mihai@bazon.net> | 2012-11-07 11:49:06 +0200 |
commit | a90c1aeafe0ab94cb20e0f0f40fda2b740a3bb15 (patch) | |
tree | 3fab95cfc726fcd897655f93b0f606f2b9709c7f /lib/output.js | |
parent | ff388a8d2d6f7777690e792e8cb497acb108e3e5 (diff) | |
download | tracifyjs-a90c1aeafe0ab94cb20e0f0f40fda2b740a3bb15.tar.gz tracifyjs-a90c1aeafe0ab94cb20e0f0f40fda2b740a3bb15.zip |
further fix for parens around New (refs #35)
Diffstat (limited to 'lib/output.js')
-rw-r--r-- | lib/output.js | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/output.js b/lib/output.js index 22ee31e4..2a177684 100644 --- a/lib/output.js +++ b/lib/output.js @@ -475,8 +475,9 @@ function OutputStream(options) { PARENS(AST_New, function(output){ var p = output.parent(); - // (new Date).getTime(); - if (p instanceof AST_Dot && no_constructor_parens(this, output)) + if (no_constructor_parens(this, output) + && (p instanceof AST_Dot // (new Date).getTime() + || p instanceof AST_Call && p.expression === this)) // (new foo)(bar) return true; }); |