From 630ead289c03a105904b711627016120ee60512d Mon Sep 17 00:00:00 2001 From: greg Date: Fri, 1 Dec 2017 03:00:42 -0800 Subject: [PATCH] Change Symbol -> Word for token --- src/rukka_lang/mod.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/rukka_lang/mod.rs b/src/rukka_lang/mod.rs index 0127635..45778c1 100644 --- a/src/rukka_lang/mod.rs +++ b/src/rukka_lang/mod.rs @@ -58,7 +58,7 @@ fn read(input: &str) -> Result, String> { enum Token { LParen, RParen, - Symbol(String) + Word(String) } #[derive(Debug)] @@ -90,7 +90,7 @@ fn tokenize(input: &mut Peekable) -> Vec { _ => true } }).collect(); - tokens.push(Symbol(format!("{}{}", c, sym))); + tokens.push(Word(format!("{}{}", c, sym))); } } } @@ -100,7 +100,7 @@ fn tokenize(input: &mut Peekable) -> Vec { fn parse(tokens: &mut Peekable>) -> Result { use self::Token::*; match tokens.next() { - Some(Symbol(s)) => Ok(Sexp::Atom(AtomT::Symbol(s))), + Some(Word(s)) => Ok(Sexp::Atom(AtomT::Symbol(s))), Some(LParen) => parse_sexp(tokens), Some(RParen) => Err(format!("Unexpected ')'")), None => Err(format!("Unexpected end of input")),