lex: remove unused integer token
This commit is contained in:
parent
f03f905788
commit
5209f8d271
1 changed files with 0 additions and 14 deletions
14
src/lex.rs
14
src/lex.rs
|
@ -19,7 +19,6 @@ pub enum Kind {
|
|||
Nbsp,
|
||||
Hardbreak,
|
||||
Escape,
|
||||
Integer,
|
||||
Open(Delimiter),
|
||||
Close(Delimiter),
|
||||
Sym(Symbol),
|
||||
|
@ -247,11 +246,6 @@ impl<I: Iterator<Item = char> + Clone> Lexer<I> {
|
|||
'#' => self.eat_seq(Hash),
|
||||
'.' => self.eat_seq(Period),
|
||||
|
||||
'0'..='9' => {
|
||||
self.eat_while(|c| c.is_ascii_digit());
|
||||
Integer
|
||||
}
|
||||
|
||||
_ => Text,
|
||||
};
|
||||
|
||||
|
@ -409,12 +403,4 @@ mod test {
|
|||
Seq(Period).l(1),
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn int() {
|
||||
test_lex!("1", Integer.l(1));
|
||||
test_lex!("123", Integer.l(3));
|
||||
test_lex!("1234567890", Integer.l(10));
|
||||
test_lex!("000", Integer.l(3));
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue