diff options
author | Alex Lam S.L <alexlamsl@gmail.com> | 2017-12-01 03:40:46 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-12-01 03:40:46 +0800 |
commit | 172079a47f2f7bf09d2a5b4e4cf05691a1206358 (patch) | |
tree | 609bfabd213310fcac942b7ef68944f8e6d45242 /lib/ast.js | |
parent | c58d3936a3c145b883e3e4537d503c690514a456 (diff) | |
download | tracifyjs-172079a47f2f7bf09d2a5b4e4cf05691a1206358.tar.gz tracifyjs-172079a47f2f7bf09d2a5b4e4cf05691a1206358.zip |
improve code reuse (#2542)
Diffstat (limited to 'lib/ast.js')
-rw-r--r-- | lib/ast.js | 18 |
1 files changed, 0 insertions, 18 deletions
@@ -898,24 +898,6 @@ TreeWalker.prototype = { } } }, - in_boolean_context: function() { - var stack = this.stack; - var i = stack.length, self = stack[--i]; - while (i > 0) { - var p = stack[--i]; - if ((p instanceof AST_If && p.condition === self) || - (p instanceof AST_Conditional && p.condition === self) || - (p instanceof AST_DWLoop && p.condition === self) || - (p instanceof AST_For && p.condition === self) || - (p instanceof AST_UnaryPrefix && p.operator == "!" && p.expression === self)) - { - return true; - } - if (!(p instanceof AST_Binary && (p.operator == "&&" || p.operator == "||"))) - return false; - self = p; - } - }, loopcontrol_target: function(node) { var stack = this.stack; if (node.label) for (var i = stack.length; --i >= 0;) { |