Working imports
This commit is contained in:
+1
-1
@@ -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 {
|
||||
|
||||
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user