aboutsummaryrefslogtreecommitdiff
path: root/lib/output.js
diff options
context:
space:
mode:
authorMihai Bazon <mihai@bazon.net>2014-04-27 20:51:01 +0300
committerMihai Bazon <mihai@bazon.net>2014-04-27 20:51:01 +0300
commit8258edd8a54cd5ed5d15a3a674f2cc716b304aeb (patch)
tree4c7fd935b4b22df13378b8d9232df7c22ac97f95 /lib/output.js
parent8669ca219b8e271c5b822f89f46d16067f0802cd (diff)
downloadtracifyjs-8258edd8a54cd5ed5d15a3a674f2cc716b304aeb.tar.gz
tracifyjs-8258edd8a54cd5ed5d15a3a674f2cc716b304aeb.zip
Fix parens in +(+x). Close #475
Diffstat (limited to 'lib/output.js')
-rw-r--r--lib/output.js3
1 files changed, 2 insertions, 1 deletions
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){