Posts tagged crafting-interpreters
-
Crafting Interpreters (III): Resolving a Name Before It Runs
Resolver freezes variable identity before execution: each variable-use node gets either a fixed local depth or a deliberate global lookup, so mutable closure environments can change without changing lexical binding.

-
Crafting Interpreters (IV): Resolver Lays the Track, Interpreter Fills the Values
jlox's object system stays inside the same runtime model: classes, instances, methods, this, inheritance, and super are built from LoxClass, LoxInstance, LoxFunction, environments, closures, and resolver distances.

-
Crafting Interpreters (II): The Tree Begins to Run
An AST becomes a run when the interpreter walks it: expressions produce values, statements create effects, environments hold state, control flow chooses subtrees, and closures preserve captured scope.

-
Crafting Interpreters (I): When Source Text Becomes Structure
Source text becomes executable structure in phases: scanning creates token boundaries, parsing turns precedence and associativity into an AST, and later phases consume that preserved tree.
-
Crafting Interpreters: Chapter 2 - A Map of the Territory
TLDR: This note maps the interpreter pipeline from source text through tokens, parsing, semantic analysis, code generation, and runtime choices.
-
Crafting Interpreters: Chapter 3 - The Lox Language
TLDR: Lox is the small language that carries the book: expressive enough for classes, closures, and control flow, but compact enough to implement twice.
-
Crafting Interpreters: Chapter 4 - Scanning
Scanning is the first structural boundary in an interpreter: raw characters become tokens, so the parser can work with language units instead of individual bytes.