This Lox compiler is an implementation of the book “Crafting Interpreters” from Bob Nystrom. It is not delivered as a complete package to let you play with it as you like.
The code uses Python 3.6 and was developed on OS X. It should work quite easily on Windows.
- You can run the REPL with “python3 -m lox.lox” once you are in the pylox folder (top folder). You can exit the REPL with ‘exit’.
- You can run any test file (extension does not matter) as “python3 -m test.test_lox testfiles/$file”, placing the file in “test/testfiles” folder.
- ‘break’ statement is implemented.
- Closures are implemented.
- Lambdas are implemented (lambdas are supposed to be anonymous function here).