feat(tazjin/rlox): Implement single-character scanning
... 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
This commit is contained in:
parent
9d2b001c4c
commit
3d1b116f7f
3 changed files with 139 additions and 0 deletions
|
|
@ -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();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue