Function chomp::combinators::bounded::many_till
[−]
[src]
pub fn many_till<I: Input, T, E, R, F, U, N, P, V>(
i: I,
r: R,
p: P,
end: F
) -> ParseResult<I, T, E> where
R: BoundedRange,
T: FromIterator<U>,
E: From<N>,
P: FnMut(I) -> ParseResult<I, U, E>,
F: FnMut(I) -> ParseResult<I, V, N>,
Applies the parser P multiple times until the parser F succeeds and returns a value
populated by the values yielded by P. Consumes the matched part of F. If F does not
succeed within the given range R this combinator will propagate any failure from P.
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.