about summary refs log tree commit diff
path: root/users/tazjin/rlox/src/main.rs
diff options
context:
space:
mode:
authorVincent Ambo <mail@tazj.in>2021-01-17T08·59+0300
committertazjin <mail@tazj.in>2021-01-17T09·34+0000
commit06a6aa5dc08ffff2ba82af2254256ea60c6a5bec (patch)
tree255922aa98b3dda00a2f941159bb71400cac27aa /users/tazjin/rlox/src/main.rs
parent9ea76fdf1ac08cd9b594ad37f6b963e78f818efc (diff)
refactor(tazjin/rlox): Call resolver from interpreter r/2118
This makes the interpreter API a bit cleaner and allows for tighter
integration between the two parts (e.g. for static globals, which are
unhandled in the resolver right now).

Change-Id: I363714dc2e13cefa7731b54326573e0b871295d6
Reviewed-on: https://cl.tvl.fyi/c/depot/+/2407
Reviewed-by: tazjin <mail@tazj.in>
Tested-by: BuildkiteCI
Diffstat (limited to 'users/tazjin/rlox/src/main.rs')
-rw-r--r--users/tazjin/rlox/src/main.rs3
1 files changed, 1 insertions, 2 deletions
diff --git a/users/tazjin/rlox/src/main.rs b/users/tazjin/rlox/src/main.rs
index 24ebe503b692..76e4ae8ae78f 100644
--- a/users/tazjin/rlox/src/main.rs
+++ b/users/tazjin/rlox/src/main.rs
@@ -51,8 +51,7 @@ fn run(lox: &mut interpreter::Interpreter, code: &str) {
 
     let result = scanner::scan(&chars)
         .and_then(|tokens| parser::parse(tokens))
-        .and_then(|program| resolver::resolve(program).map_err(|e| vec![e]))
-        .and_then(|program| lox.interpret(&program).map_err(|e| vec![e]));
+        .and_then(|program| lox.interpret(program).map_err(|e| vec![e]));
 
     if let Err(errors) = result {
         report_errors(errors);