Vibe Coding a Lox Compiler, Part 3: Parsing & the Abstract Syntax Tree
Written with AI This post — and all the code behind it — was built with Claude Code. Read Part 0 for the full story of how this AI-assisted project came together. Previously in this series, Part 1 introduced the overall pipeline — scanner, parser, AST, and the multiple backends (tree-walk interpreter, bytecode VM, and LLVM codegen) — and Part 2 covered tokenization: how winnow turns raw source text into a flat stream of typed tokens. Now we have that token stream in hand. The parser’s job is to take that flat sequence and build a tree that captures the actual structure and meaning of the program. ...