From 3b8de2886ee733e8872f3418b03651c8d7d41704 Mon Sep 17 00:00:00 2001 From: numzero Date: Sat, 19 Apr 2025 12:43:47 +0300 Subject: [PATCH] lookup table fields --- src/twopass.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/twopass.rs b/src/twopass.rs index 5a6cc04..e5df432 100644 --- a/src/twopass.rs +++ b/src/twopass.rs @@ -137,7 +137,11 @@ fn lookup(scope: &BuildContext<'_>, loc: &ast::Location) -> Location { index: Box::new(Expression::Constant(ast::Constant::String(name.clone()))), } } - ast::Location::Field { table, index } => todo!(), + ast::Location::Field { table, index } => { + let table = Box::new(lookup(scope, &table)); + let index = Box::new(build_expression(scope, &index)); + Location::Field { table, index } + } } }