From a1ae0c8609ad5ab977dae8afcb96b04594a0cc9a Mon Sep 17 00:00:00 2001 From: Mihai Bazon Date: Wed, 7 Nov 2012 12:26:33 +0200 Subject: [PATCH] parenthesize property access when it's the expression in New refs #35 --- lib/output.js | 5 +++++ 1 file changed, 5 insertions(+) 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; -- 2.34.1