parenthesize property access when it's the expression in New

refs #35
This commit is contained in:
Mihai Bazon
2012-11-07 12:26:33 +02:00
parent a90c1aeafe
commit a1ae0c8609

View File

@@ -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;