diff --git a/src/twopass.rs b/src/twopass.rs index e5df432..66c1888 100644 --- a/src/twopass.rs +++ b/src/twopass.rs @@ -150,7 +150,7 @@ fn build_expression(scope: &BuildContext<'_>, code: &ast::Expression) -> Express ast::Expression::Constant(c) => Expression::Constant(c.clone()), ast::Expression::Variable(loc) => Expression::Variable(lookup(scope, loc)), ast::Expression::Call(call) => Expression::Call(build_call(scope, call)), - ast::Expression::Function(f) => Expression::Function(build_in_scope(scope, f)), + ast::Expression::Function(f) => Expression::Function(build_function(scope, f)), } } @@ -170,7 +170,7 @@ fn build_call(scope: &BuildContext<'_>, code: &ast::Call) -> Call { } } -fn build_in_scope(parent: &BuildContext<'_>, code: &ast::Function) -> Function { +fn build_function(parent: &BuildContext<'_>, code: &ast::Function) -> Function { let scope = BuildContext { parent: Some(parent), scope: Default::default(), @@ -218,5 +218,5 @@ pub fn build(code: &ast::Function) -> Function { parent: None, scope: RefCell::new(Scope::new_toplevel()), }; - build_in_scope(&mut root, &code) + build_function(&mut root, &code) }