diff options
Diffstat (limited to 'lib/ast.js')
-rw-r--r-- | lib/ast.js | 12 |
1 files changed, 2 insertions, 10 deletions
@@ -182,21 +182,13 @@ var AST_BlockStatement = DEFNODE("BlockStatement", null, { }, AST_Block); var AST_EmptyStatement = DEFNODE("EmptyStatement", null, { - $documentation: "The empty statement (empty block or simply a semicolon)", - _walk: function(visitor) { - return visitor._visit(this); - } + $documentation: "The empty statement (empty block or simply a semicolon)" }, AST_Statement); var AST_StatementWithBody = DEFNODE("StatementWithBody", "body", { $documentation: "Base class for all statements that contain one nested body: `For`, `ForIn`, `Do`, `While`, `With`", $propdoc: { body: "[AST_Statement] the body; this should always be present, even if it's an AST_EmptyStatement" - }, - _walk: function(visitor) { - return visitor._visit(this, function(){ - this.body._walk(visitor); - }); } }, AST_Statement); @@ -551,11 +543,11 @@ var AST_Call = DEFNODE("Call", "expression args", { }, _walk: function(visitor) { return visitor._visit(this, function(){ - this.expression._walk(visitor); var args = this.args; for (var i = 0, len = args.length; i < len; i++) { args[i]._walk(visitor); } + this.expression._walk(visitor); }); } }); |