diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/output.js | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/output.js b/lib/output.js index 1bde822e..a3b8f1a7 100644 --- a/lib/output.js +++ b/lib/output.js @@ -1048,8 +1048,9 @@ function OutputStream(options) { output.print(self.operator); }); DEFPRINT(AST_Binary, function(self, output){ + var op = self.operator; self.left.print(output); - if (self.operator == ">" + if (op[0] == ">" /* ">>" ">>>" ">" ">=" */ && self.left instanceof AST_UnaryPostfix && self.left.operator == "--") { // space is mandatory to avoid outputting --> @@ -1058,8 +1059,8 @@ function OutputStream(options) { // the space is optional depending on "beautify" output.space(); } - output.print(self.operator); - if (self.operator == "<" + output.print(op); + if ((op == "<" || op == "<<") && self.right instanceof AST_UnaryPrefix && self.right.operator == "!" && self.right.expression instanceof AST_UnaryPrefix |