diff --git a/src/main.rs b/src/main.rs index ec22849..e482046 100644 --- a/src/main.rs +++ b/src/main.rs @@ -58,12 +58,8 @@ use crate::base::*; pub fn main() { let src = " -let foo = :foo -let bar = 42 -let baz = \"foo bar baz\" -let quux = (1, 2, [3, 4, #{:five 6, :seven 8}]) -\"{foo} {bar} {baz} -{quux} {fuzz} TADA!\" +let foo = \"foo\" +eq (\"foo\", \"{foo}\") "; let (tokens, lex_errs) = lexer().parse(src).into_output_errors(); if !lex_errs.is_empty() { diff --git a/src/value.rs b/src/value.rs index 87f08d5..f434639 100644 --- a/src/value.rs +++ b/src/value.rs @@ -160,6 +160,9 @@ impl<'src> PartialEq for Value<'src> { (Value::Boolean(x), Value::Boolean(y)) => x == y, (Value::Number(x), Value::Number(y)) => x == y, (Value::InternedString(x), Value::InternedString(y)) => x == y, + (Value::AllocatedString(x), Value::AllocatedString(y)) => x == y, + (Value::InternedString(x), Value::AllocatedString(y)) => *x == **y, + (Value::AllocatedString(x), Value::InternedString(y)) => **x == *y, (Value::Keyword(x), Value::Keyword(y)) => x == y, (Value::Tuple(x), Value::Tuple(y)) => x == y, (Value::List(x), Value::List(y)) => x == y,