Lox bytecode compiler and interpreter written in Rust.
My implementation has a few QoL improvements over the vanilla language:
nil->nullfun->fnvar->let+=,-=,*=, and/=for operation and assignment%for modulobreaksupport insideforandwhileloopsprintas a built-in function instead of a statement
Some possible optimizations to implement once everything is up and running so I can measure them:
- Use tries for matching keywords (https://docs.rs/trie-match/latest/trie_match/)
- Sprinkle some pointer + unsafe magic around
- Use data structures that go more brrr (FxHash{Set, Map}, ArrayVec...)