I'm reading Crafting Interpreters book by Bob Nystrom and writing Lox interpreter in C++ as I do this (the original code in the book is written in Java and some is in C). It's fun!
Some day I will return to it... Maybe in another language?
- Scanning
- Represening code
- Parsing Expressions
- Evaluating Expressions
- Statements and State
- Control flow
- Functions (in progress)
Just run CMake like this:
# in build dir
cmake <src-dir>
and then
cmake --build . --target lox
To build with tests:
# in build dir
cmake <src-dir> -DBUILD_TESTING=ON
To run tests:
cmake --build . --target check
Alternatively:
ctest .
Run a simple example:
lox examples/test.lox
TODO
This project is licensed under the MIT License, see LICENSE for more information.