parenthesize a Call expression when its parent is New

fix #35
This commit is contained in:
Mihai Bazon
2012-11-07 11:36:15 +02:00
parent 5346fb94bb
commit ff388a8d2d

View File

@@ -468,6 +468,11 @@ function OutputStream(options) {
}
});
PARENS(AST_Call, function(output){
var p = output.parent();
return p instanceof AST_New && p.expression === this;
});
PARENS(AST_New, function(output){
var p = output.parent();
// (new Date).getTime();