Function separated_list1
fn separated_list1<I, E, F, G>(separator: G, parser: 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 until Err::Error.
Fails if the element parser does not produce at least one element.
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_list1;
use tag;
assert_eq!;
assert_eq!;
assert_eq!;
assert_eq!;
assert_eq!;