The Machine Wakes
Source in, answer out — the assembly line runs end to end for the first time.
What you're wiring up
Evaluation is a tree walk. To evaluate (1 + (2 * 3)) you evaluate the left child, evaluate the right child, then apply the operator. Recursion does all the work, because the parser already baked the order of operations into the tree's shape. That is the payoff for Stage 2.
You also make your first genuine language-design decisions. Values get their own object system — Integer, Boolean, Null behind one interface — and you decide what counts as truthy. In blu, everything is truthy except false and null, and an if with no taken branch yields null. Those are your calls, and they are now the spec.
This stage boots the REPL too. From here on you have a live prompt into your own language, which turns every later stage from a test-running exercise into something you can play with.
Assembly steps
hint
Create exactly one TRUE, one FALSE, one NULL and reuse the pointers. Comparisons become pointer equality and the evaluator gets simpler, not just faster.
hint
This is the one place you must not evaluate both branches eagerly. Evaluate the condition, then walk only the branch you take.
hint
The REPL is about fifteen lines that reuse everything you already have. Never build anything REPL-specific into the evaluator.
Go deeper (after it passes)
Recursive descent plus a tree walk is a masterclass in one-job functions — pair with Clean Code M2 — Functions: Small, Then Smaller Still. The REPL is the same read-parse-execute loop that build-your-own-shell runs over processes instead of expressions.