Kill then, else keywords
This commit is contained in:
parent
1fa56800c5
commit
5923cc2317
@ -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),
|
||||||
|
Loading…
Reference in New Issue
Block a user