This is an in progress project aiming to implement both versions of the Lox Language from the book Crafting Interpreters in Rust.
- Chapter 1: Introduction
- Chapter 2: A Tree-Walk Interpreter
- Chapter 3: The Lox Language
- 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
- Chapter 14: Chunks Of Bytecode
- How to implement an approximation of abstract classes and the visitor pattern in Rust using traits, generics and enums. Here and Here
- How to generate a source file by mapping over a grammar configuration. Here
- Scanning text to produce tokens. Here
- Parsing tokens to produce an abstract syntax tree for expressions. Here
- Enums in C are represented as integer constants.