MCPcopy Create free account
hub / github.com/MaterializeInc/materialize / expected

Method expected

src/sql-parser/src/parser.rs:1822–1838  ·  view source on GitHub ↗

Report unexpected token

(
        &self,
        pos: usize,
        expected: D,
        found: Option<Token>,
    )

Source from the content-addressed store, hash-verified

1820
1821 /// Report unexpected token
1822 fn expected<D, T>(
1823 &self,
1824 pos: usize,
1825 expected: D,
1826 found: Option<Token>,
1827 ) -> Result<T, ParserError>
1828 where
1829 D: fmt::Display,
1830 {
1831 parser_err!(
1832 self,
1833 pos,
1834 "Expected {}, found {}",
1835 expected,
1836 found.display_or("EOF"),
1837 )
1838 }
1839
1840 /// Look for an expected keyword and consume it if it exists
1841 #[must_use]

Callers 15

parse_statementsMethod · 0.80
parse_statement_innerMethod · 0.80
parse_prefixMethod · 0.80
parse_extract_exprMethod · 0.80
parse_infixMethod · 0.80
parse_operatorMethod · 0.80
expect_keywordMethod · 0.80
expect_tokenMethod · 0.80
expect_one_of_tokensMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected