Vibe Coding a Lox Compiler, Part 7: The REPL
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 — Introduction, Part 2 — Tokenization, Part 3 — Parsing, Part 4 — The Tree-Walk Interpreter, Part 5 — The Bytecode VM, and Part 6 — LLVM Compilation. This is the final post in the series. Over six posts we have built the complete compiler pipeline: a winnow-based scanner, a recursive-descent parser, an AST, a tree-walk interpreter, a bytecode VM with its own compiler, and an LLVM IR code generator. What we have not talked about yet is the part that most users will touch first — typing something at a prompt and seeing what happens. This post is about the REPL. ...