From 97981c8772d3cd68e362c33af297cb0e95931209 Mon Sep 17 00:00:00 2001 From: Erin Date: Tue, 22 Feb 2022 22:31:05 +0100 Subject: [PATCH] Removed unused tokens from Lexer Uh, they were lying there with no use for 9 months! --- ablescript/src/lexer.rs | 7 ------- ablescript/src/parser.rs | 2 -- 2 files changed, 9 deletions(-) diff --git a/ablescript/src/lexer.rs b/ablescript/src/lexer.rs index 75200160..729a016d 100644 --- a/ablescript/src/lexer.rs +++ b/ablescript/src/lexer.rs @@ -26,9 +26,6 @@ pub enum Token { #[token(";")] Semicolon, - #[token(".")] - Dot, - #[token(",")] Comma, @@ -124,10 +121,6 @@ pub enum Token { #[regex("always|sometimes|never", get_abool)] Abool(Abool), - /// Base52 based character ('a') - #[token("'.*'")] - Char, - /// String #[regex("\"(\\.|[^\"])*\"", get_string)] String(String), diff --git a/ablescript/src/parser.rs b/ablescript/src/parser.rs index 9fd351e9..7597e794 100644 --- a/ablescript/src/parser.rs +++ b/ablescript/src/parser.rs @@ -95,7 +95,6 @@ impl<'source> Parser<'source> { )), Token::Identifier(_) - | Token::Char | Token::String(_) | Token::Integer(_) | Token::Abool(_) @@ -496,7 +495,6 @@ impl<'source> Parser<'source> { match self.checked_next()? { Token::Plus | Token::Minus - | Token::Dot | Token::Comma | Token::LeftBracket | Token::RightBracket