aboutsummaryrefslogtreecommitdiff
path: root/lib/ast.js
diff options
context:
space:
mode:
authorAlex Lam S.L <alexlamsl@gmail.com>2018-05-24 14:29:30 +0800
committerGitHub <noreply@github.com>2018-05-24 14:29:30 +0800
commit24d9633a355ff0fac64dee2b356b99661079e921 (patch)
treef7ba20c3142952f536788f715f21023c8fd52e59 /lib/ast.js
parent7963b96681869a2a3b3d0873c8df1100fe2b36a5 (diff)
downloadtracifyjs-24d9633a355ff0fac64dee2b356b99661079e921.tar.gz
tracifyjs-24d9633a355ff0fac64dee2b356b99661079e921.zip
fix corner cases with `eval()` (#3147)
fixes #3146
Diffstat (limited to 'lib/ast.js')
-rw-r--r--lib/ast.js3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/ast.js b/lib/ast.js
index b4b47651..331d340b 100644
--- a/lib/ast.js
+++ b/lib/ast.js
@@ -314,6 +314,9 @@ var AST_Scope = DEFNODE("Scope", "variables functions uses_with uses_eval parent
if (this.functions) node.functions = this.functions.clone();
if (this.enclosed) node.enclosed = this.enclosed.slice();
return node;
+ },
+ pinned: function() {
+ return this.uses_eval || this.uses_with;
}
}, AST_Block);