feat(tazjin/rlox): Add initial support for strings
... including concatenation. This diverges significantly from the book, as I'm using std::String instead of implementing the book's whole heap object management system. It's possible that Lox in Rust actually doesn't need a GC and the ownership model works just fine. Change-Id: I374a0461d627cfafc26b2b54bfefac8b7c574d00 Reviewed-on: https://cl.tvl.fyi/c/depot/+/2577 Tested-by: BuildkiteCI Reviewed-by: tazjin <mail@tazj.in>
This commit is contained in:
parent
3b33c1bd76
commit
6f600c8300
3 changed files with 40 additions and 1 deletions
|
|
@ -3,6 +3,7 @@ pub enum Value {
|
|||
Nil,
|
||||
Bool(bool),
|
||||
Number(f64),
|
||||
String(String),
|
||||
}
|
||||
|
||||
impl Value {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue