diff --git a/src/interpreter/value/mod.rs b/src/interpreter/value/mod.rs index 840ac1d..43d5226 100644 --- a/src/interpreter/value/mod.rs +++ b/src/interpreter/value/mod.rs @@ -1,7 +1,9 @@ mod function; +mod pair; mod string; pub use function::Function; +pub use pair::DotPair; pub use string::Str; use std::{collections::BTreeMap, rc::Rc}; @@ -10,7 +12,7 @@ pub type OrderedF64 = ordered_float::OrderedFloat; #[derive(Debug, Clone, PartialEq, Eq)] pub enum Value<'s> { - List(/* TODO: List impl (or dotted pair) */), + DotPair(Rc>), Vector(Rc>), Map(Rc>), Symbol(Str<'s>), @@ -19,4 +21,5 @@ pub enum Value<'s> { String(Str<'s>), Function(Function), Macro(Function), + Nil, } diff --git a/src/interpreter/value/pair.rs b/src/interpreter/value/pair.rs new file mode 100644 index 0000000..6923cc7 --- /dev/null +++ b/src/interpreter/value/pair.rs @@ -0,0 +1,4 @@ +use super::Value; + +#[derive(Debug, Clone, PartialEq, Eq)] +pub struct DotPair<'s>(pub Value<'s>, pub Value<'s>);