Report an unexpected token
(
&self,
expected: &str,
found: &TokenWithSpan,
)
| 513 | |
| 514 | /// Report an unexpected token |
| 515 | fn expected<T>( |
| 516 | &self, |
| 517 | expected: &str, |
| 518 | found: &TokenWithSpan, |
| 519 | ) -> Result<T, DataFusionError> { |
| 520 | let sql_parser_span = found.span; |
| 521 | let span = Span::try_from_sqlparser_span(sql_parser_span); |
| 522 | let diagnostic = Diagnostic::new_error( |
| 523 | format!("Expected: {expected}, found: {found}{}", found.span.start), |
| 524 | span, |
| 525 | ); |
| 526 | parser_err!( |
| 527 | format!("Expected: {expected}, found: {found}{}", found.span.start); |
| 528 | diagnostic= |
| 529 | diagnostic |
| 530 | ) |
| 531 | } |
| 532 | |
| 533 | fn expect_token( |
| 534 | &mut self, |
no outgoing calls
no test coverage detected