Various implementations of Robert Nystrom's Lox language from Crafting Interpreters.
In the project subdirectories, there are implementations of the Lox language in a few different languages.
Tree-Walk Interpreters:
- Java : jlox
- Python : plox
- Kotlin : klox
Bytecode Virtual Machines:
- C : clox
From the top-level directory, run
./gradlew build
This will build the jlox and klox projects and run all tests.
My implementation of the Lox language adds the following additional features:
+=
,-=
operators for addition-assignment, subtraction-assignment- Additional built-in functions,
exit(exitCode)
,print(msg)
,printErr(msg)
- Support for integer literals. Number literals without a '.' will be parsed as integer types.
- Built-in property for an object's class, e.g.,
print Foo().klass