diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/ast.js | 18 |
1 files changed, 12 insertions, 6 deletions
@@ -205,21 +205,27 @@ var AST_DWLoop = DEFNODE("DWLoop", "condition", { $documentation: "Base class for do/while statements", $propdoc: { condition: "[AST_Node] the loop condition. Should not be instanceof AST_Statement" - }, - _walk: function(visitor) { - return visitor._visit(this, function(){ - this.condition._walk(visitor); - this.body._walk(visitor); - }); } }, AST_IterationStatement); var AST_Do = DEFNODE("Do", null, { $documentation: "A `do` statement", + _walk: function(visitor) { + return visitor._visit(this, function(){ + this.body._walk(visitor); + this.condition._walk(visitor); + }); + } }, AST_DWLoop); var AST_While = DEFNODE("While", null, { $documentation: "A `while` statement", + _walk: function(visitor) { + return visitor._visit(this, function(){ + this.condition._walk(visitor); + this.body._walk(visitor); + }); + } }, AST_DWLoop); var AST_For = DEFNODE("For", "init condition step", { |