an AST_If is too a StatementWithBody
This commit is contained in:
@@ -286,16 +286,16 @@ var AST_Continue = DEFNODE("Continue", null, {
|
||||
|
||||
/* -----[ IF ]----- */
|
||||
|
||||
var AST_If = DEFNODE("If", "condition consequent alternative", {
|
||||
var AST_If = DEFNODE("If", "condition alternative", {
|
||||
$documentation: "A `if` statement",
|
||||
_walk: function(visitor) {
|
||||
return visitor._visit(this, function(){
|
||||
this.condition._walk(visitor);
|
||||
this.consequent._walk(visitor);
|
||||
this.body._walk(visitor);
|
||||
if (this.alternative) this.alternative._walk(visitor);
|
||||
});
|
||||
}
|
||||
});
|
||||
}, AST_StatementWithBody);
|
||||
|
||||
/* -----[ SWITCH ]----- */
|
||||
|
||||
|
||||
Reference in New Issue
Block a user