Lox
C++ implementation of Lox interpreter (based on the book Crafting Interpreters by Bob Nystrom)
Install / Use
/learn @eliasdaler/LoxREADME
C++ implementation of Lox (WIP)
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?
Chapters complete
- Scanning
- Represening code
- Parsing Expressions
- Evaluating Expressions
- Statements and State
- Control flow
- Functions (in progress)
Building
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 .
Usage
Run a simple example:
lox examples/test.lox
TODO
License
This project is licensed under the MIT License, see LICENSE for more information.
Related Skills
node-connect
339.1kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
83.8kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
339.1kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
commit-push-pr
83.8kCommit, push, and open a PR
