risingwave_sqlparser::parser_v2

Trait ParserExt

source
pub trait ParserExt<I, O, E>: Parser<I, O, E> {
    // Provided method
    fn expect(
        self,
        expected: &'static str,
    ) -> Context<Self, I, O, E, StrContext>
       where Self: Sized,
             I: Stream,
             E: AddContext<I, StrContext> { ... }
}

Provided Methods§

source

fn expect(self, expected: &'static str) -> Context<Self, I, O, E, StrContext>
where Self: Sized, I: Stream, E: AddContext<I, StrContext>,

Add a context to the error message.

This is a shorthand for context(StrContext::Expected(StrContextValue::Description(expected))).

Implementors§

source§

impl<I, O, E, T> ParserExt<I, O, E> for T
where T: Parser<I, O, E>,