Fix other operator output related to <!-- or -->
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user