risingwave_sqlparser::parser_v2

Function with_state

source
fn with_state<S, State, O, ParseNext>(
    parse_next: ParseNext,
) -> impl Parser<S, O, ContextError>
where S: TokenStream, State: Default, ParseNext: Parser<Stateful<S, State>, O, ContextError>,
Expand description

Accept a subparser contains a given state.

The state will be constructed using Default::default().