pear::combinators

Function delimited_collect

Source
pub fn delimited_collect<C, I, T, S, O, P>(
    input: &mut Pear<I>,
    start: T,
    item: P,
    separator: S,
    end: T,
) -> Result<C, I>
where C: Collection<O>, I: Input, T: Token<I> + Clone, S: Into<Option<T>>, P: FnMut(&mut Pear<I>) -> Result<O, I>,
Expand description

Parses many separator delimited ps, the entire collection of which must start with start and end with end. item Gramatically, this is:

START (item SEPERATOR)* END