aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorMihai Bazon <mihai@bazon.net>2013-05-20 08:27:37 +0300
committerMihai Bazon <mihai@bazon.net>2013-05-20 08:27:37 +0300
commit22a038e6a23d1c1e8c5068b73f8af059521a6f2d (patch)
treeadd883e8dfdf6310c0308b94ddac7fef66a0bc76 /lib
parentf652372c9a55ac7c6c3d965f0dff47bf0d0c0b3e (diff)
downloadtracifyjs-22a038e6a23d1c1e8c5068b73f8af059521a6f2d.tar.gz
tracifyjs-22a038e6a23d1c1e8c5068b73f8af059521a6f2d.zip
Fix output of statement: `new function(){...};`
Close #209
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 a13c92ea..b510cb35 100644
--- a/lib/output.js
+++ b/lib/output.js
@@ -1122,7 +1122,7 @@ function OutputStream(options) {
if (p instanceof AST_Statement && p.body === node)
return true;
if ((p instanceof AST_Seq && p.car === node ) ||
- (p instanceof AST_Call && p.expression === node ) ||
+ (p instanceof AST_Call && p.expression === node && !(p instanceof AST_New) ) ||
(p instanceof AST_Dot && p.expression === node ) ||
(p instanceof AST_Sub && p.expression === node ) ||
(p instanceof AST_Conditional && p.condition === node ) ||