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