Compiler Internals
Pipeline
- Tokenize
- Parse
- Validate
- Type check
- Bytecode
- VM
Key Files
- Lexer
- Parser
- Type checker
- Bytecode generator
- VM
- Component validation
- Class validation
Extension Points
- New syntax
- New built-ins
- New VM opcodes
Sections
📄️ Lexer
The lexer (tokenizer) is responsible for converting raw source code into a sequence of tokens. These tokens form the input to the parser.
📄️ Parser
The parser transforms a sequence of tokens into an Abstract Syntax Tree (AST), representing the structure of the program.