aboutsummaryrefslogtreecommitdiff
path: root/lib/ast.js
diff options
context:
space:
mode:
authorAlex Lam S.L <alexlamsl@gmail.com>2017-09-20 05:23:20 +0800
committerGitHub <noreply@github.com>2017-09-20 05:23:20 +0800
commit00f509405b44882bab5d63d97caacb21691cdad6 (patch)
treeff012be29cdd0e1aa458d31007c0fb98f581b3b8 /lib/ast.js
parentaceb0af36b8c89ae76b18c63a32b600156e4766e (diff)
downloadtracifyjs-00f509405b44882bab5d63d97caacb21691cdad6.tar.gz
tracifyjs-00f509405b44882bab5d63d97caacb21691cdad6.zip
suppress `collapse_vars` of `this` into "use strict" (#2326)
fixes #2319
Diffstat (limited to 'lib/ast.js')
-rw-r--r--lib/ast.js6
1 files changed, 2 insertions, 4 deletions
diff --git a/lib/ast.js b/lib/ast.js
index 0918574d..9b243f16 100644
--- a/lib/ast.js
+++ b/lib/ast.js
@@ -134,11 +134,10 @@ var AST_Debugger = DEFNODE("Debugger", null, {
$documentation: "Represents a debugger statement",
}, AST_Statement);
-var AST_Directive = DEFNODE("Directive", "value scope quote", {
+var AST_Directive = DEFNODE("Directive", "value quote", {
$documentation: "Represents a directive, like \"use strict\";",
$propdoc: {
value: "[string] The value of this directive as a plain string (it's not an AST_String!)",
- scope: "[AST_Scope/S] The scope that this directive affects",
quote: "[string] the original quote character"
},
}, AST_Statement);
@@ -299,10 +298,9 @@ var AST_With = DEFNODE("With", "expression", {
/* -----[ scope and functions ]----- */
-var AST_Scope = DEFNODE("Scope", "directives variables functions uses_with uses_eval parent_scope enclosed cname", {
+var AST_Scope = DEFNODE("Scope", "variables functions uses_with uses_eval parent_scope enclosed cname", {
$documentation: "Base class for all statements introducing a lexical scope",
$propdoc: {
- directives: "[string*/S] an array of directives declared in this scope",
variables: "[Object/S] a map of name -> SymbolDef for all variables/functions defined in this scope",
functions: "[Object/S] like `variables`, but only lists function declarations",
uses_with: "[boolean/S] tells whether this scope uses the `with` statement",