[fine] Dump CSTs and an example zoo
This commit is contained in:
parent
757db0ba3e
commit
1f6d7ec131
9 changed files with 357 additions and 32 deletions
|
|
@ -646,8 +646,13 @@ impl<'a> Parser<'a> {
|
|||
fn advance(&mut self) {
|
||||
self.previous = self.current.clone();
|
||||
self.current = self.tokens.next();
|
||||
while self.current.kind == TokenKind::Error {
|
||||
self.error_at_current(self.current.to_string());
|
||||
while self.current.kind == TokenKind::Error
|
||||
|| self.current.kind == TokenKind::Whitespace
|
||||
|| self.current.kind == TokenKind::Comment
|
||||
{
|
||||
if self.current.kind == TokenKind::Error {
|
||||
self.error_at_current(self.current.to_string());
|
||||
}
|
||||
self.current = self.tokens.next();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue