Function separated_list0
fn separated_list0<I, E, F, G>(sep: G, f: F) -> impl Parser<I, Output = crate::lib::std::vec::Vec<<F as Parser<I>>::Output>, Error = E>
where
I: Clone + Input,
F: Parser<I, Error = E>,
G: Parser<I, Error = E>,
E: ParseError<I>
Alternates between two parsers to produce a list of elements.
This stops when either parser returns Err::Error and returns the results that were accumulated. To instead chain an error up, see
[cut][crate::combinator::cut].
Arguments
sepParses the separator between list elements.fParses the elements of the list.
# use ;
use separated_list0;
use tag;
assert_eq!;
assert_eq!;
assert_eq!;
assert_eq!;
assert_eq!;