pear::parsers

Function delimited

Source
pub fn delimited<I, T, F>(
    input: &mut Pear<I>,
    start: T,
    cond: F,
    end: T,
) -> Result<I::Many, I>
where I: Input, T: Token<I>, F: FnMut(&I::Token) -> bool,
Expand description

Parse a token stream that starts with start and ends with end, returning all of the tokens in between. The tokens in between must match cond. Succeeds even if there are no tokens between start and end.