fix lex test

This commit is contained in:
nora 2021-12-31 14:14:53 +01:00
parent dc26b52bd2
commit bc218efe0e
22 changed files with 437 additions and 160 deletions

View file

@ -42,7 +42,7 @@ impl<T: ?Sized> Clone for Gc<T> {
impl<T: ?Sized> Copy for Gc<T> {}
/// An interned String. Hashing and Equality are O(1) and just look at the pointer address
#[derive(Debug, Clone, Copy)]
#[derive(Clone, Copy)]
pub struct Symbol {
gc: Gc<str>,
}
@ -83,6 +83,12 @@ impl Deref for Symbol {
}
}
impl Debug for Symbol {
fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result {
self.as_str().fmt(f)
}
}
#[derive(Debug)]
struct Object {
kind: ObjectKind,