aboutsummaryrefslogtreecommitdiff
path: root/lib/ast.js
diff options
context:
space:
mode:
Diffstat (limited to 'lib/ast.js')
-rw-r--r--lib/ast.js20
1 files changed, 2 insertions, 18 deletions
diff --git a/lib/ast.js b/lib/ast.js
index c38b3277..bb2a07c0 100644
--- a/lib/ast.js
+++ b/lib/ast.js
@@ -156,16 +156,7 @@ var AST_With = DEFNODE("With", "expression", {
/* -----[ scope and functions ]----- */
var AST_Scope = DEFNODE("Scope", null, {
- $documentation: "Base class for all statements introducing a lexical scope",
- initialize: function() {
- this.variables = {}; // map name to AST_SymbolVar (variables defined in this scope; includes functions)
- this.functions = {}; // map name to AST_SymbolDefun (functions defined in this scope)
- this.uses_with = false; // will be set to true if this or some nested scope uses the `with` statement
- this.uses_eval = false; // will be set to true if this or nested scope uses the global `eval`
- this.parent_scope = null; // the parent scope
- this.enclosed = []; // a list of variables from this or outer scope(s) that are referenced from this or inner scopes
- this.cname = -1; // the current index for mangling functions/variables
- }
+ $documentation: "Base class for all statements introducing a lexical scope"
}, AST_BlockStatement);
var AST_Toplevel = DEFNODE("Toplevel", null, {
@@ -174,10 +165,6 @@ var AST_Toplevel = DEFNODE("Toplevel", null, {
var AST_Lambda = DEFNODE("Lambda", "name argnames", {
$documentation: "Base class for functions",
- initialize: function() {
- AST_Scope.prototype.initialize.call(this);
- this.uses_arguments = false;
- },
_walk: function(visitor) {
return visitor._visit(this, function(){
if (this.name) this.name._walk(visitor);
@@ -479,10 +466,7 @@ var AST_ObjectGetter = DEFNODE("ObjectGetter", null, {
var AST_Symbol = DEFNODE("Symbol", "scope name", {
});
-var AST_SymbolDeclaration = DEFNODE("SymbolDeclaration", "references", {
- initialize: function() {
- this.references = [];
- }
+var AST_SymbolDeclaration = DEFNODE("SymbolDeclaration", null, {
}, AST_Symbol);
var AST_SymbolVar = DEFNODE("SymbolVar", null, {