diff options
author | Mihai Bazon <mihai@bazon.net> | 2012-10-12 10:49:41 +0300 |
---|---|---|
committer | Mihai Bazon <mihai@bazon.net> | 2012-10-12 10:49:41 +0300 |
commit | 72cb5328ee58307ccb9bc91ac5826c3a41aac4d2 (patch) | |
tree | fe7f1f302b3fb8ef19aefea7ac2197c2e42a96e4 | |
parent | fc39553714ab747339c11173e11ca95aaea1ed0c (diff) | |
download | tracifyjs-72cb5328ee58307ccb9bc91ac5826c3a41aac4d2.tar.gz tracifyjs-72cb5328ee58307ccb9bc91ac5826c3a41aac4d2.zip |
fix in_boolean_context() (two tests were broken)
-rw-r--r-- | lib/ast.js | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -904,7 +904,7 @@ TreeWalker.prototype = { }, in_boolean_context: function() { var stack = this.stack; - var i = stack.length, self = stack[--i]; + var i = stack.length, self = stack[--i].$self; while (i > 0) { var p = stack[--i]; if ((p instanceof AST_If && p.condition === self) || @@ -917,7 +917,7 @@ TreeWalker.prototype = { } if (!(p instanceof AST_Binary && (p.operator == "&&" || p.operator == "||"))) return false; - self = p; + self = p.$self; } }, loopcontrol_target: function(label) { |