An implementation of Lox in TypeScript.
Clone the repo and install dependencies:
git clone https://github.com/elimerl/lox
cd lox
yarn install # npm also works
Then run src/cli.ts
to be dropped into a REPL.
To run the test suite, clone this repository, and run something like this:
$ (cd tool && dart pub get)
$ dart ./tool/bin/test.dart chap08_statements --interpreter "node" --arguments '../lox/lib/test'
- Add a bytecode implementation. WASM would be neat too, and have good performance.