summaryrefslogtreecommitdiff
path: root/src/syntax/visit.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/syntax/visit.rs')
-rw-r--r--src/syntax/visit.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/syntax/visit.rs b/src/syntax/visit.rs
index 2d3c683f..1bf260c7 100644
--- a/src/syntax/visit.rs
+++ b/src/syntax/visit.rs
@@ -61,6 +61,7 @@ visit! {
Expr::Call(e) => v.visit_call(e),
Expr::Let(e) => v.visit_let(e),
Expr::If(e) => v.visit_if(e),
+ Expr::While(e) => v.visit_while(e),
Expr::For(e) => v.visit_for(e),
}
}
@@ -132,6 +133,11 @@ visit! {
}
}
+ fn visit_while(v, node: &ExprWhile) {
+ v.visit_expr(&node.condition);
+ v.visit_expr(&node.body);
+ }
+
fn visit_for(v, node: &ExprFor) {
v.visit_expr(&node.iter);
v.visit_expr(&node.body);