Janet implementation of Lox from the book Crafting Interpreters
Something went wrong. Try again.
Janet 90%
Nix 9%
<1%
readme.md
This is a Janet implementation of the Lox programming language, from Crafting Interpreters by Robert Nystrom.
It's loosely based on jlox, the Java tree-walking interpreter from the book,
but takes advantage of Janet features to simplify the code when possible.
Notably:
- The scanner is a parsing expression grammar
- Scoping is built on top of dynamic bindings
- The repl uses Janet's
getline, which wraps linenoise - While Janet has support for object-oriented programming, most of the code is written in a more functional style. For instance the visitor pattern is replaced by pattern matching