interpreter in Java as part of the book Crafting Interpreters
run make bin/lox/Lox.class
run make bin/lox.jar
run make run
(or java -jar bin/lox.jar
)
run make run ARGS=<FILENAME>
- add new definition under
Main
, insrc/lox/GenerateAst.java
- run
make run-GenerateAst
- fill in new visitor methods for
Interpreter
insrc/lox/Interpreter.java
- parser: add newline token for better error handling, unwinding and synchronizing
- interpreter: cast boolean to double for things like
(a == b) * 4
- fully implement
cond ? branch1 : branch2
expressions
- throw some kind of EndOfExpression exception during parsing so we can skip the upward chain of redundant checks when we know the next token (EOF) won't match anything