The Compiler Pipeline of Pug
summary
Pug is a small compiler with explicit stages and a working pipeline that actually produces output HTML or component code. It claims a clear split: lexer, parser, codegen handle tokenization, AST construction and string generation; loader and linker resolve includes and extends by producing one merged AST; plugins can intercept between stages. The project renames Jade to pug, compiles the same source into HTML or React components, and demonstrates the system working end to end.
AI-written summary · about
chapters (7)
- 0:00Introduction to compilers
- 1:28The lexer phase
- 2:47Lexer implementation details
- 6:33The parser phase
- 9:58The code generation phase
- 12:14Modular compiler pipeline
- 13:27Advanced architecture benefits
related talks
28mPureScript & Pux -- a safer, more expressive way to React
27mParsing, Compiling, and Static Metaprogramming
45mFront-End Workflows with Gulp
31mJavaScript Compilers For Fun and Profit
30mExcuse Me, I Have to Assemble the Frontend
20mJavaScript Transformation
32mBuilding a High Performance JavaScript Compiler
26mMake Your Own Programming Language!
