From 582789005561c3ba5eff294cc6d24a6f441e25f9 Mon Sep 17 00:00:00 2001 From: Noah Hellman Date: Fri, 27 Jan 2023 17:15:20 +0100 Subject: [PATCH] lex: rm unused hash token --- src/lex.rs | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/lex.rs b/src/lex.rs index 1f55cc4..660e68e 100644 --- a/src/lex.rs +++ b/src/lex.rs @@ -55,7 +55,6 @@ pub enum Symbol { pub enum Sequence { Backtick, Dollar, - Hash, Hyphen, Period, } @@ -65,7 +64,6 @@ impl Sequence { match self { Self::Backtick => '`', Self::Dollar => '$', - Self::Hash => '#', Self::Period => '.', Self::Hyphen => '-', } @@ -229,7 +227,6 @@ impl + Clone> Lexer { '`' => self.eat_seq(Backtick), '$' => self.eat_seq(Dollar), - '#' => self.eat_seq(Hash), '.' => self.eat_seq(Period), _ => Text, @@ -376,10 +373,9 @@ mod test { test_lex!("`", Seq(Backtick).l(1)); test_lex!("```", Seq(Backtick).l(3)); test_lex!( - "`$#-.", + "`$-.", Seq(Backtick).l(1), Seq(Dollar).l(1), - Seq(Hash).l(1), Seq(Hyphen).l(1), Seq(Period).l(1), );