diff options
| author | Mel <einebeere@gmail.com> | 2021-10-20 22:15:08 +0200 |
|---|---|---|
| committer | Mel <einebeere@gmail.com> | 2021-10-20 22:15:08 +0200 |
| commit | a4980b8dbf1394c2b302f1de7c72d2264426b86e (patch) | |
| tree | 97160332c53d8036ea3f6865ff60dabb2c55ef49 /src/lex/token.rs | |
| parent | 8d5a74566beba45f4642838102c5a066ef2aa18d (diff) | |
| download | rabbithole-a4980b8dbf1394c2b302f1de7c72d2264426b86e.tar.zst rabbithole-a4980b8dbf1394c2b302f1de7c72d2264426b86e.zip | |
Statement parsing.
Diffstat (limited to 'src/lex/token.rs')
| -rw-r--r-- | src/lex/token.rs | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/lex/token.rs b/src/lex/token.rs index 3694525..efd4c5a 100644 --- a/src/lex/token.rs +++ b/src/lex/token.rs @@ -10,7 +10,7 @@ pub struct Token { pub variant: TokenVariant, } -#[derive(Clone, Debug)] +#[derive(Clone, Debug, PartialEq)] pub enum TokenVariant { // Basic math operators OpPlus, @@ -45,13 +45,19 @@ pub enum TokenVariant { Int(u32), Float(f32), Str(String), - Identifier(String), + + Ident(String), // Keywords KeywordFn, + KeywordIf, + KeywordElif, + KeywordElse, KeywordForm, KeywordType, KeywordSelf, + KeywordReturn, + KeywordPrint, Unknown(char), Eof, |
