The commit expands the source location tracking through the AST by:
1. Switching from raw Expr/Stmt nodes to AstNode wrappers containing
source slices 2. Updating interpreter and parser to preserve location
info through node traversal 3. Enhancing error reporting with richer
source context information
The commit adds while loop statements and improves token display
formatting:
- Implements while loop syntax and evaluation - Adds a new token pretty
printing module with configurable formatting - Improves token display
with colors and different output modes
This initial commit sets up the basic structure for a Rust
implementation of the Lox interpreter, including:
- Lexer for tokenizing source code - Parser for building AST - Basic
interpreter functionality - Environment for variable storage
The core components include source tracking, error handling, and basic
expression evaluation.