aboutsummaryrefslogtreecommitdiff
path: root/lib/ast.js
diff options
context:
space:
mode:
authorMihai Bazon <mihai@bazon.net>2012-09-03 12:11:44 +0300
committerMihai Bazon <mihai@bazon.net>2012-09-03 12:11:44 +0300
commit6d0db4ce14fd67681bdda1d1861517763eff4c6e (patch)
treeeae00c1f5d5408888e9dfd3b61798b040f0d091a /lib/ast.js
parentd7c1dc6c0578b55eefc3bc94556146dce6e1a8cb (diff)
downloadtracifyjs-6d0db4ce14fd67681bdda1d1861517763eff4c6e.tar.gz
tracifyjs-6d0db4ce14fd67681bdda1d1861517763eff4c6e.zip
an AST_If is too a StatementWithBody
Diffstat (limited to 'lib/ast.js')
-rw-r--r--lib/ast.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/ast.js b/lib/ast.js
index c93ed4f3..9dd92cb2 100644
--- a/lib/ast.js
+++ b/lib/ast.js
@@ -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 ]----- */