diff options
| author | Mel <einebeere@gmail.com> | 2021-11-21 14:52:50 +0100 |
|---|---|---|
| committer | Mel <einebeere@gmail.com> | 2021-11-21 14:52:50 +0100 |
| commit | abaa72af8a1be00f3f84d7771a7994bfbbccf719 (patch) | |
| tree | b47edcef38cf7bdebae99428510b9fc8857f41bd /src/lex/token.rs | |
| parent | 395d086f0dce355ccdcf3da149c309826c539b48 (diff) | |
| download | rabbithole-abaa72af8a1be00f3f84d7771a7994bfbbccf719.tar.zst rabbithole-abaa72af8a1be00f3f84d7771a7994bfbbccf719.zip | |
Rename all Variants to Kinds
Diffstat (limited to 'src/lex/token.rs')
| -rw-r--r-- | src/lex/token.rs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/lex/token.rs b/src/lex/token.rs index c771b4a..f3dafa7 100644 --- a/src/lex/token.rs +++ b/src/lex/token.rs @@ -7,11 +7,11 @@ pub struct Location { #[derive(Clone, Debug)] pub struct Token { pub location: Location, - pub variant: TokenVariant, + pub kind: TokenKind, } #[derive(Clone, Debug, PartialEq)] -pub enum TokenVariant { +pub enum TokenKind { // Basic math operators OpPlus, OpMinus, @@ -49,7 +49,7 @@ pub enum TokenVariant { // Literals Int(u32), Float(f32), - + // String Literal Tokens Str(String), // StrOpen and StrClose are necessary for string embeds. @@ -59,7 +59,7 @@ pub enum TokenVariant { StrClose, // The string embed has to be lexed by a *seperate* lexer. StrEmbed(String), - + Ident(String), // Keywords @@ -80,4 +80,4 @@ pub enum TokenVariant { Unknown(char), Eof, -} \ No newline at end of file +} |
