diff --git a/schala-lang/language/src/scope_resolution.rs b/schala-lang/language/src/scope_resolution.rs index 58bb8e7..a42d25b 100644 --- a/schala-lang/language/src/scope_resolution.rs +++ b/schala-lang/language/src/scope_resolution.rs @@ -12,6 +12,11 @@ pub struct ScopeResolver<'a> { name_scope_stack: ScopeStack<'a, Rc, FQSNPrefix>, } +impl<'a> ASTVisitor for ScopeResolver<'a> { + fn ast(&mut self, _ast: &AST) { + println!("VISITING AST!!!"); + } +} impl<'a> ScopeResolver<'a> { pub fn new(symbol_table: &'a mut SymbolTable) -> ScopeResolver { @@ -19,6 +24,7 @@ impl<'a> ScopeResolver<'a> { ScopeResolver { symbol_table, name_scope_stack } } pub fn resolve(&mut self, ast: &mut AST) -> Result<(), String> { + walk_ast(self, ast); self.block(&mut ast.statements)?; Ok(()) }