432e7a7ddd
This is again a step closer to the book, but there are some notable differences: * Only constants encountered by the compiler are interned, all other string operations (well, concatenation) happen with heap objects. * OpReturn will always ensure that a returned string value is newly heap allocated and does not reference the interner. Change-Id: If4f04309446e01b8ff2db51094e9710d465dbc50 Reviewed-on: https://cl.tvl.fyi/c/depot/+/2582 Reviewed-by: tazjin <mail@tazj.in> Tested-by: BuildkiteCI |
||
---|---|---|
.. | ||
src | ||
.gitignore | ||
Cargo.lock | ||
Cargo.toml | ||
default.nix | ||
README.md | ||
rustfmt.toml |
This is an interpreter for the Lox language, based on the book "Crafting Interpreters".
The book's original code uses Java, but I don't want to use Java, so I've decided to take on the extra complexity of porting it to Rust.
Note: This implements the first of two Lox interpreters.