diff options
Diffstat (limited to 'users/tazjin/rlox/src/interpreter')
-rw-r--r-- | users/tazjin/rlox/src/interpreter/tests.rs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/users/tazjin/rlox/src/interpreter/tests.rs b/users/tazjin/rlox/src/interpreter/tests.rs index 875116593e44..4698583dfc11 100644 --- a/users/tazjin/rlox/src/interpreter/tests.rs +++ b/users/tazjin/rlox/src/interpreter/tests.rs @@ -1,10 +1,13 @@ use super::*; +use crate::resolver; /// Evaluate a code snippet, returning a value. fn parse_eval(code: &str) -> Value { let chars: Vec<char> = code.chars().collect(); let tokens = scanner::scan(&chars).expect("could not scan code"); - let program = parser::parse(tokens).expect("could not parse code"); + let mut program = parser::parse(tokens).expect("could not parse code"); + program = resolver::resolve(program).expect("could not resolve code"); + Interpreter::create() .interpret(&program) .expect("could not eval code") |