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>2020-11-23T01·00+0100
committertazjin <mail@tazj.in>2020-11-23T01·15+0000
commit3d1b116f7fdcdd7af77a4abc7dbedef4df8fd0a4 (patch)
treef0f0aa71e199da39daefe3f218b4d619fe56238f /users/tazjin/rlox/src/main.rs
parent9d2b001c4cc86cc57bdb890037c80b7a1c766ecd (diff)
feat(tazjin/rlox): Implement single-character scanning r/1914
... still not that interesting, but at this point slightly divergent
from the book:

The book embraces mutability for interpreter state, initially for
tracking whether an error condition has occured.

I avoid this by instead defining an error type and collecting the
error values, to be handled later on.

Notes: So far nothing special, but this is just the beginning of the
book. I like the style it is written in and it has pointed to some
interesting resources, such as a 1965 paper titled "The Next 700
Languages".

Change-Id: I030b38438fec9eb55372bf547af225138908230a
Reviewed-on: https://cl.tvl.fyi/c/depot/+/2144
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.rs2
1 files changed, 2 insertions, 0 deletions
diff --git a/users/tazjin/rlox/src/main.rs b/users/tazjin/rlox/src/main.rs
index 83d220c81631..b14ed97d5eda 100644
--- a/users/tazjin/rlox/src/main.rs
+++ b/users/tazjin/rlox/src/main.rs
@@ -4,7 +4,9 @@ use std::io;
 use std::io::Write;
 use std::process;
 
+mod errors;
 mod interpreter;
+mod scanner;
 
 fn main() {
     let mut args = env::args();