From: Mihai Bazon Date: Wed, 7 Nov 2012 10:26:33 +0000 (+0200) Subject: parenthesize property access when it's the expression in New X-Git-Url: https://git.ndcode.org/public/gitweb.cgi?a=commitdiff_plain;h=a1ae0c8609ad5ab977dae8afcb96b04594a0cc9a;p=UglifyJS.git parenthesize property access when it's the expression in New refs #35 --- diff --git a/lib/output.js b/lib/output.js index 2a177684..321c7222 100644 --- a/lib/output.js +++ b/lib/output.js @@ -468,6 +468,11 @@ function OutputStream(options) { } }); + PARENS(AST_PropAccess, function(output){ + var p = output.parent(); + return p instanceof AST_New && p.expression === this; + }); + PARENS(AST_Call, function(output){ var p = output.parent(); return p instanceof AST_New && p.expression === this;