Fix parens in +(+x). Close #475

This commit is contained in:
Mihai Bazon
2014-04-27 20:51:01 +03:00
parent 8669ca219b
commit 8258edd8a5

View File

@@ -455,7 +455,8 @@ function OutputStream(options) {
PARENS(AST_Unary, function(output){
var p = output.parent();
return p instanceof AST_PropAccess && p.expression === this;
return (p instanceof AST_PropAccess && p.expression === this)
|| (p instanceof AST_Unary && p.operator == "+" && this.operator == "+");
});
PARENS(AST_Seq, function(output){