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-14T00·15+0300
committertazjin <mail@tazj.in>2021-01-14T00·31+0000
commita03b509fb85ee4fb3b397b3e279ca77d625bc5f6 (patch)
tree261d6515c9caa40ac42677ba6a805a465654cfb1 /users/tazjin/rlox/src/main.rs
parent26544aa5f05021ed95eca77966738a84d8be902e (diff)
refactor(tazjin/rlox): Constructor for interpreter with globals r/2097
Change-Id: Id8242c22500c8e2781cc656d3faabb28d9bdf091
Reviewed-on: https://cl.tvl.fyi/c/depot/+/2383
Reviewed-by: tazjin <mail@tazj.in>
Tested-by: BuildkiteCI
Diffstat (limited to '')
-rw-r--r--users/tazjin/rlox/src/main.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/users/tazjin/rlox/src/main.rs b/users/tazjin/rlox/src/main.rs
index c56d345862..8970349bfa 100644
--- a/users/tazjin/rlox/src/main.rs
+++ b/users/tazjin/rlox/src/main.rs
@@ -25,14 +25,14 @@ fn main() {
 // Run Lox code from a file and print results to stdout
 fn run_file(file: &str) {
     let contents = fs::read_to_string(file).expect("failed to read the input file");
-    let mut lox = interpreter::Interpreter::default();
+    let mut lox = interpreter::Interpreter::create();
     run(&mut lox, &contents);
 }
 
 // Evaluate Lox code interactively in a shitty REPL.
 fn run_prompt() {
     let mut line = String::new();
-    let mut lox = interpreter::Interpreter::default();
+    let mut lox = interpreter::Interpreter::create();
 
     loop {
         print!("> ");