Assert that lexer advances over entire input (#560)
This commit is contained in:
parent
20790a0cc7
commit
b5dea44ee7
@ -285,6 +285,9 @@ impl<'src> Lexer<'src> {
|
||||
|
||||
self.token(Eof);
|
||||
|
||||
assert_eq!(self.token_start.offset, self.token_end.offset);
|
||||
assert_eq!(self.token_start.offset, self.src.len());
|
||||
|
||||
Ok(self.tokens)
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user