()
| 3093 | None |
| 3094 | } |
| 3095 | } |
| 3096 | |
| 3097 | fn is_eof(&self) -> bool { |
| 3098 | matches!(self.peek(), Some(Token::Eof) | None) |
| 3099 | } |
| 3100 | |
| 3101 | fn current_span(&self) -> Span { |
| 3102 | let idx = self.pos.min(self.spans.len().saturating_sub(1)); |
| 3103 | self.spans.get(idx).cloned().unwrap_or_default() |
| 3104 | } |
| 3105 | |
| 3106 | fn error(&self, message: &str) -> ParserError { |
| 3107 | ParserError { |
| 3108 | message: message.to_owned(), |
| 3109 | span: self.current_span(), |
| 3110 | } |
| 3111 | } |
| 3112 | |
| 3113 | fn error_with_token(&self, message: &str, token: &Token<'a>) -> ParserError { |
| 3114 | ParserError { |
nothing calls this directly
no test coverage detected