lex: rm unused percentage token

This commit is contained in:
Noah Hellman 2023-01-27 17:07:13 +01:00
parent bc787a1553
commit 961086dc5d

View file

@ -44,7 +44,6 @@ pub enum Symbol {
Caret, Caret,
ExclaimBracket, ExclaimBracket,
Lt, Lt,
Percentage,
Pipe, Pipe,
Plus, Plus,
Quote1, Quote1,
@ -226,7 +225,6 @@ impl<I: Iterator<Item = char> + Clone> Lexer<I> {
self.eat_char(); self.eat_char();
Sym(ExclaimBracket) Sym(ExclaimBracket)
} }
'%' => Sym(Percentage),
'<' => Sym(Lt), '<' => Sym(Lt),
'|' => Sym(Pipe), '|' => Sym(Pipe),
'\'' => Sym(Quote1), '\'' => Sym(Quote1),
@ -357,13 +355,12 @@ 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(ExclaimBracket).l(2), Sym(ExclaimBracket).l(2),
Sym(Lt).l(1), Sym(Lt).l(1),
Sym(Percentage).l(1),
Sym(Pipe).l(1), Sym(Pipe).l(1),
Sym(Plus).l(1), Sym(Plus).l(1),
Sym(Quote2).l(1), Sym(Quote2).l(1),