Still more visitor work

This commit is contained in:
greg 2019-10-15 03:51:36 -07:00
parent f818e86f48
commit 5afdc16f2e

View File

@ -187,7 +187,23 @@ fn if_expression_body<V: ASTVisitor>(v: &mut V, body: &IfExpressionBody) {
}
fn condition_arm<V: ASTVisitor>(v: &mut V, arm: &ConditionArm) {
use Condition::*;
v.condition_arm(arm);
match arm.condition {
Pattern(ref pat) => {
v.pattern(pat);
walk_pattern(v, pat);
},
TruncatedOp(ref _binop, ref expr) => {
v.expression(expr);
expression(v, expr);
},
Expression(ref expr) => {
v.expression(expr);
expression(v, expr);
},
_ => ()
}
}
fn walk_pattern<V: ASTVisitor>(v: &mut V, pat: &Pattern) {