Assert that lexer advances over entire input (#560)

This commit is contained in:
Casey Rodarmor 2019-12-10 13:24:30 -08:00 committed by GitHub
parent 20790a0cc7
commit b5dea44ee7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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)
}