From b65779fb93dcfa2220b24faf4b508e5630fae030 Mon Sep 17 00:00:00 2001 From: greg Date: Mon, 9 Sep 2019 18:12:14 -0700 Subject: [PATCH] Add symbol_table to scope_resolution --- schala-lang/language/src/eval/test.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/schala-lang/language/src/eval/test.rs b/schala-lang/language/src/eval/test.rs index 07053d8..54aff6c 100644 --- a/schala-lang/language/src/eval/test.rs +++ b/schala-lang/language/src/eval/test.rs @@ -12,8 +12,11 @@ fn evaluate_all_outputs(input: &str) -> Vec> { let mut state = State::new(symbol_table); let mut ast = crate::util::quick_ast(input); state.symbol_table_handle.borrow_mut().add_top_level_symbols(&ast).unwrap(); - let mut scope_resolver = crate::scope_resolution::ScopeResolver::new(); + { + let t = &state.symbol_table_handle.borrow(); + let mut scope_resolver = crate::scope_resolution::ScopeResolver::new(&t); let _ = scope_resolver.resolve(&mut ast); + } let reduced = ast.reduce(&state.symbol_table_handle.borrow()); let all_output = state.evaluate(reduced, true);