lex: rm unused equal token

This commit is contained in:
Noah Hellman 2023-01-27 17:05:45 +01:00
parent da74f09de0
commit bdf35ca7d1

View file

@ -42,7 +42,6 @@ pub enum Delimiter {
pub enum Symbol { pub enum Symbol {
Asterisk, Asterisk,
Caret, Caret,
Equal,
ExclaimBracket, ExclaimBracket,
Gt, Gt,
Lt, Lt,
@ -208,7 +207,7 @@ impl<I: Iterator<Item = char> + Clone> Lexer<I> {
} }
'*' => self.maybe_eat_close_brace(Sym(Asterisk), BraceAsterisk), '*' => self.maybe_eat_close_brace(Sym(Asterisk), BraceAsterisk),
'^' => self.maybe_eat_close_brace(Sym(Caret), BraceCaret), '^' => self.maybe_eat_close_brace(Sym(Caret), BraceCaret),
'=' => self.maybe_eat_close_brace(Sym(Equal), BraceEqual), '=' => self.maybe_eat_close_brace(Text, BraceEqual),
'+' => self.maybe_eat_close_brace(Sym(Plus), BracePlus), '+' => self.maybe_eat_close_brace(Sym(Plus), BracePlus),
'~' => self.maybe_eat_close_brace(Sym(Tilde), BraceTilde), '~' => self.maybe_eat_close_brace(Sym(Tilde), BraceTilde),
'_' => self.maybe_eat_close_brace(Sym(Underscore), BraceUnderscore), '_' => self.maybe_eat_close_brace(Sym(Underscore), BraceUnderscore),
@ -360,11 +359,10 @@ mod test {
#[test] #[test]
fn sym() { fn sym() {
test_lex!( test_lex!(
r#"'*^=![><%|+"~_"#, r#"'*^![><%|+"~_"#,
Sym(Quote1).l(1), Sym(Quote1).l(1),
Sym(Asterisk).l(1), Sym(Asterisk).l(1),
Sym(Caret).l(1), Sym(Caret).l(1),
Sym(Equal).l(1),
Sym(ExclaimBracket).l(2), Sym(ExclaimBracket).l(2),
Sym(Gt).l(1), Sym(Gt).l(1),
Sym(Lt).l(1), Sym(Lt).l(1),