fix bug when ||, && then yield, should has () wrap the code.
This commit is contained in:
parent
014f873ec1
commit
426cebc0e1
|
|
@ -1068,7 +1068,10 @@ function OutputStream(options) {
|
||||||
// the space is optional depending on "beautify"
|
// the space is optional depending on "beautify"
|
||||||
output.space();
|
output.space();
|
||||||
}
|
}
|
||||||
|
var isYield = (self.right.operator == "yield" || self.right.operator === "yield*");
|
||||||
|
isYield && output.print("(");
|
||||||
self.right.print(output);
|
self.right.print(output);
|
||||||
|
isYield && output.print(")");
|
||||||
});
|
});
|
||||||
DEFPRINT(AST_Conditional, function(self, output){
|
DEFPRINT(AST_Conditional, function(self, output){
|
||||||
self.condition.print(output);
|
self.condition.print(output);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user