- Introduction
- Crash Course on Computing
- Part I: Calculator
- Calculator
- Grammar, Lexer and Parser
- Abstract Syntax Tree (AST) and Interpreter
- Just-In-Time (JIT) Compiler with LLVM
- Basic Example
- AST Traversal Patterns
- Virtual Machine (VM), Bytecode and Interpreter
- Read-Eval-Print Loop (REPL)
- Debugging Your Language
- Exercises
- Part II: Firstlang (Interpreted)
- From Calculator to Real Language
- Firstlang: Your First Real Language
- Python-like Syntax
- Variables and Assignment
- Functions
- Control Flow: If/Else and While
- Recursion
- Building the REPL
- Computing Fibonacci
- Exercises
- Part III: Secondlang (Compiled)
- From Interpreted to Compiled
- Secondlang: Adding Types and Compilation
- Why Types Matter
- Type Annotations
- Type Inference
- AST Optimizations (Visitor Pattern)
- From AST to IR
- LLVM Code Generation
- JIT Compiling Fibonacci
- Exercises
- Part IV: Thirdlang (Object-Oriented)
- From Functions to Objects
- Thirdlang: Adding Classes and Objects
- Why Classes?
- Class Syntax and Parsing
- Constructors and Object Creation
- Methods and Self
- Memory Management
- LLVM Code Generation for Classes
- Optimizing LLVM IR
- Running Thirdlang
- Exercises
- Beyond the Book
- What's Next
- Appendices
- Testing Your Language
- Glossary
- Resources