aboutsummaryrefslogtreecommitdiff
path: root/lib/ast.js
diff options
context:
space:
mode:
authorAlex Lam S.L <alexlamsl@gmail.com>2017-12-01 03:40:46 +0800
committerGitHub <noreply@github.com>2017-12-01 03:40:46 +0800
commit172079a47f2f7bf09d2a5b4e4cf05691a1206358 (patch)
tree609bfabd213310fcac942b7ef68944f8e6d45242 /lib/ast.js
parentc58d3936a3c145b883e3e4537d503c690514a456 (diff)
downloadtracifyjs-172079a47f2f7bf09d2a5b4e4cf05691a1206358.tar.gz
tracifyjs-172079a47f2f7bf09d2a5b4e4cf05691a1206358.zip
improve code reuse (#2542)
Diffstat (limited to 'lib/ast.js')
-rw-r--r--lib/ast.js18
1 files changed, 0 insertions, 18 deletions
diff --git a/lib/ast.js b/lib/ast.js
index a2aa2b40..997486c2 100644
--- a/lib/ast.js
+++ b/lib/ast.js
@@ -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;) {