diff --git a/src/value.rs b/src/value.rs index 66c6572..0d785aa 100644 --- a/src/value.rs +++ b/src/value.rs @@ -13,17 +13,24 @@ pub enum Value<'a> { Vector(Vec), Map(BTreeMap), Module(Module<'a>), + Function(Function), Symbol(Symbol<'a>), Keyword(Cow<'a, str>), - Function { - // TODO: Fields, - }, Bool(bool), Number(OrderedFloat), String(Cow<'a, str>), Nil, } +#[derive(Debug, Clone, Hash, PartialEq, Eq, PartialOrd, Ord)] +pub struct Module<'a> { + members: BTreeMap>, + symbol_table: BTreeMap, +} + +#[derive(Debug, Clone, Hash, PartialEq, Eq, PartialOrd, Ord)] +pub struct Function {} + #[derive(Debug, Clone, Hash, PartialEq, Eq, PartialOrd, Ord)] pub enum Symbol<'a> { Interned(u64), @@ -45,12 +52,6 @@ impl<'a> Display for Symbol<'a> { } } -#[derive(Debug, Clone, Hash, PartialEq, Eq, PartialOrd, Ord)] -pub struct Module<'a> { - members: BTreeMap>, - symbol_table: BTreeMap, -} - impl<'a> Display for Value<'a> { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { match self {