Invocation argument in visitor

This commit is contained in:
greg 2019-10-15 18:58:51 -07:00
parent 5afdc16f2e
commit 9e64a22328

View File

@ -78,6 +78,22 @@ fn call<V: ASTVisitor>(v: &mut V, f: &Expression, args: &Vec<InvocationArgument>
v.expression(f);
for arg in args.iter() {
v.invocation_argument(arg);
invocation_argument(v, arg);
}
}
fn invocation_argument<V: ASTVisitor>(v: &mut V, arg: &InvocationArgument) {
use InvocationArgument::*;
match arg {
Positional(expr) => {
v.expression(expr);
expression(v, expr);
},
Keyword { expr, .. } => {
v.expression(expr);
expression(v, expr);
},
Ignored => (),
}
}