diff --git a/src/syntax/ast.rs b/src/syntax/ast.rs index b6f0dcb..50f0122 100644 --- a/src/syntax/ast.rs +++ b/src/syntax/ast.rs @@ -12,10 +12,8 @@ pub enum Expr<'a> { Map(Vec<(Self, Self)>), Symbol(Cow<'a, str>), Keyword(Cow<'a, str>), - Bool(bool), Number(OrderedFloat), String(Cow<'a, str>), - Nil, } impl<'a> Display for Expr<'a> { @@ -31,10 +29,8 @@ impl<'a> Display for Expr<'a> { ), Self::Symbol(sym) => write!(f, "{sym}"), Self::Keyword(kw) => write!(f, ":{kw}"), - Self::Bool(b) => write!(f, "{b}"), Self::Number(n) => write!(f, "{n}"), Self::String(s) => write!(f, "\"{s}\""), - Self::Nil => write!(f, "nil"), } } } diff --git a/src/syntax/parser.rs b/src/syntax/parser.rs index 8c0a443..0cfd7b1 100644 --- a/src/syntax/parser.rs +++ b/src/syntax/parser.rs @@ -12,9 +12,6 @@ pub fn read(src: &str) -> Result, Vec>>> { fn parser<'a>() -> impl Parser, Vec>, Error = Simple>> { recursive(|expr| { let atom = select! { - Token::Symbol("true") => Expr::Bool(true), - Token::Symbol("false") => Expr::Bool(false), - Token::Symbol("nil") => Expr::Nil, Token::Symbol(s) => Expr::Symbol(s.into()), Token::Keyword(k) => Expr::Keyword(k.into()), Token::String(s) => Expr::String(s.into()),