fix in_boolean_context() (two tests were broken)
This commit is contained in:
@@ -904,7 +904,7 @@ TreeWalker.prototype = {
|
|||||||
},
|
},
|
||||||
in_boolean_context: function() {
|
in_boolean_context: function() {
|
||||||
var stack = this.stack;
|
var stack = this.stack;
|
||||||
var i = stack.length, self = stack[--i];
|
var i = stack.length, self = stack[--i].$self;
|
||||||
while (i > 0) {
|
while (i > 0) {
|
||||||
var p = stack[--i];
|
var p = stack[--i];
|
||||||
if ((p instanceof AST_If && p.condition === self) ||
|
if ((p instanceof AST_If && p.condition === self) ||
|
||||||
@@ -917,7 +917,7 @@ TreeWalker.prototype = {
|
|||||||
}
|
}
|
||||||
if (!(p instanceof AST_Binary && (p.operator == "&&" || p.operator == "||")))
|
if (!(p instanceof AST_Binary && (p.operator == "&&" || p.operator == "||")))
|
||||||
return false;
|
return false;
|
||||||
self = p;
|
self = p.$self;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
loopcontrol_target: function(label) {
|
loopcontrol_target: function(label) {
|
||||||
|
|||||||
Reference in New Issue
Block a user