Working imports

This commit is contained in:
2026-04-22 09:34:23 +02:00
parent 53b87eb02e
commit ea6aabd896
5 changed files with 42 additions and 27 deletions
+1 -1
View File
@@ -14,7 +14,7 @@ pub mod top_level;
pub fn walk_ast(top_scope: Arc<Scope>, tl: &mut Vec<parser::ast::TopLevel>) {
for tl in tl {
match tl {
parser::ast::TopLevel::Import(package) => {}
parser::ast::TopLevel::Import(_) => {}
parser::ast::TopLevel::Package(_) => {}
parser::ast::TopLevel::FunctionDecl {
+5
View File
@@ -120,6 +120,11 @@ impl LocalScope {
*id = field.name.clone();
current_type = field.var_type.clone();
}
TypeRef::Package(p) => {
let var_ref = p.variables.get(id)?;
*id = var_ref.name.clone();
current_type = var_ref.var_type.clone();
}
_ => unimplemented!(),
},
Postfix::Call(_args) => match &*current_type {