Function som_parser_core::combinators::alternative
source · pub fn alternative<A, I: Clone>(
fst: impl Parser<A, I>,
snd: impl Parser<A, I>
) -> impl Parser<A, I>
Expand description
Tries to apply the first parser, if it fails, it tries to apply the second parser.