[−][src]Function nom_supreme::multi::parse_separated_terminated_res
pub fn parse_separated_terminated_res<Input, ParseOutput, SepOutput, TermOutput, ParseErr, Accum, FoldErr>(
parser: impl Parser<Input, ParseOutput, ParseErr>,
separator: impl Parser<Input, SepOutput, ParseErr>,
terminator: impl Parser<Input, TermOutput, ParseErr>,
init: impl FnMut() -> Accum,
fold: impl FnMut(Accum, ParseOutput) -> Result<Accum, FoldErr>
) -> impl Parser<Input, Accum, ParseErr> where
Input: Clone + PartialEq,
ParseErr: ParseError<Input> + FromExternalError<Input, FoldErr>,
The perfected folding parser. Parses a series of 1 more more things,
separated by some separator
, terminated by some terminator
, folding
all of them together with a fallible fold function.
This function is identical to parse_separated_terminated
, except that
the fold function may return an error. See its documentation for more
details about the precise behavior of this parser.