Function chomp::combinators::bounded::sep_by
[−]
[src]
pub fn sep_by<I: Input, T, E, R, F, U, N, P, V>(
i: I,
r: R,
p: P,
sep: F
) -> ParseResult<I, T, E> where
T: FromIterator<U>,
E: From<N>,
R: BoundedRange,
P: FnMut(I) -> ParseResult<I, U, E>,
F: FnMut(I) -> ParseResult<I, V, N>,
Applies the parser p multiple times, separated by the parser sep and returns a value
populated with the values yielded by p. If the number of items yielded by p does not fall
into the range r and the separator or parser registers error or incomplete failure is
propagated.
Panics
Will panic if the end of the range is smaller than the start of the range.
Notes
- Will allocate depending on the
FromIteratorimplementation. - Will never yield more items than the upper bound of the range.