build_expression!
This commit is contained in:
parent
03e8673b6f
commit
d1e1d8ee5c
|
|
@ -128,7 +128,12 @@ fn lookup(scope: &BuildContext<'_>, loc: &ast::Location) -> Location {
|
||||||
}
|
}
|
||||||
|
|
||||||
fn build_expression(scope: &BuildContext<'_>, code: &ast::Expression) -> Expression {
|
fn build_expression(scope: &BuildContext<'_>, code: &ast::Expression) -> Expression {
|
||||||
todo!()
|
match code {
|
||||||
|
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)),
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn build_call(scope: &BuildContext<'_>, code: &ast::Call) -> Call {
|
fn build_call(scope: &BuildContext<'_>, code: &ast::Call) -> Call {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user