Awesome
Lox-rs
A Lox Interpreter in Rust based on the Crafting Interpreters book.
Run the interpreter with cargo run -p interpreter -- examples/class.lox
. The bytecode VM is run with cargo run -p bytcode -- examples/class.lox
.
Each commit corresponds to one chapter in the book:
Part II: A Tree-Walk Interpreter
- Chapter 4: Scanning
- Chapter 5: Representing Code
- Chapter 6: Parsing Expressions
- Chapter 7: Evaluating Expressions
- Chapter 8: Statements and State
- Chapter 9: Control Flow
- Chapter 10: Functions
- Chapter 11: Resolving and Binding
- Chapter 12: Classes
- Chapter 13: Inheritance