Kill then, else keywords

This commit is contained in:
greg 2017-01-09 20:34:14 -08:00
parent 1fa56800c5
commit 5923cc2317

View File

@ -31,10 +31,8 @@ pub struct OpTok(pub Rc<String>);
#[derive(Debug, Clone, PartialEq)] #[derive(Debug, Clone, PartialEq)]
pub enum Kw { pub enum Kw {
If, If,
Then,
Else, Else,
While, While,
End,
Let, Let,
Fn, Fn,
Null, Null,
@ -140,10 +138,8 @@ fn tokenize_identifier(c: char, iter: &mut Peekable<Chars>) -> Result<Token, Tok
Ok(match &buffer[..] { Ok(match &buffer[..] {
"if" => Keyword(Kw::If), "if" => Keyword(Kw::If),
"then" => Keyword(Kw::Then),
"else" => Keyword(Kw::Else), "else" => Keyword(Kw::Else),
"while" => Keyword(Kw::While), "while" => Keyword(Kw::While),
"end" => Keyword(Kw::End),
"let" => Keyword(Kw::Let), "let" => Keyword(Kw::Let),
"fn" => Keyword(Kw::Fn), "fn" => Keyword(Kw::Fn),
"null" => Keyword(Kw::Null), "null" => Keyword(Kw::Null),