From 8258edd8a54cd5ed5d15a3a674f2cc716b304aeb Mon Sep 17 00:00:00 2001 From: Mihai Bazon Date: Sun, 27 Apr 2014 20:51:01 +0300 Subject: Fix parens in +(+x). Close #475 --- lib/output.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'lib/output.js') diff --git a/lib/output.js b/lib/output.js index adbc9a41..4a3bfd53 100644 --- a/lib/output.js +++ b/lib/output.js @@ -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){ -- cgit v1.2.3