A Lox interpreter written in C++, based on Bob Nystrom's excellent book Crafting Interpreters. The associated GitHub repo for the book is https://github.com/munificent/craftinginterpreters.
See cslox for the tree-walk interpreter written in C#.
- Chapter 14. Chunks of Bytecode (Tag Chapter14_ChunksOfBytecode)
- Chapter 15. A Virtual Machine (Tag Chapter15_AVirtualMachine)
- Chapter 16. Scanning on Demand
- Chapter 17. Compiling Expressions
- Chapter 18. Types of Values
- Chapter 19. Strings
- Chapter 20. Hash Tables
- Chapter 21. Global Variables
- Chapter 22. Local Variables
- Chapter 23. Jumping Back and Forth
- Chapter 24. Calls and Functions
- Chapter 25. Closures
- Chapter 26. Garbage Collection
- Chapter 27. Classes and Instances
- Chapter 28. Methods and Initializers
- Chapter 29. Superclasses
- Chapter 30. Optimization