Interpreter wrote with the guidance of Crafting interpreter. One of the new projects.
Have Rust installed.
Start the repl with:
cargo run
With a file pass the path as the argument:
cargo run test1.lox
test1.lox Assign values to variables and handle scopes.
test2.lox Handle if-cases.
test3.lox For-loops.
test4.lox While-loops.
test5.lox Functions.
test6.lox Fibonacci (My favorite).
test7.lox Assigning functions to variables.
There are still few chapters to be done and some TODO's here and there.
- Improve
Interpreter.rs
error handling. Currently it's quite bad. - Code generation.
- Tests.
- Fix errors that come from the
.lox
files.
- Scanning
- Representing Code.
- Parsing Expressions
- Evaluating Expressions
- Statements and State
- Control flow
- Functions
- Resolving and binding