Helper function to push the given error, updating the current range with the error location and return the [`TokenKind::Unknown`] token.
(&mut self, error: LexicalError)
| 137 | /// Helper function to push the given error, updating the current range with the error location |
| 138 | /// and return the [`TokenKind::Unknown`] token. |
| 139 | fn push_error(&mut self, error: LexicalError) -> TokenKind { |
| 140 | self.current_range = error.location(); |
| 141 | self.errors.push(error); |
| 142 | TokenKind::Unknown |
| 143 | } |
| 144 | |
| 145 | /// Lex the next token. |
| 146 | pub fn next_token(&mut self) -> TokenKind { |
no test coverage detected