Don't special-case choices2
This commit is contained in:
parent
60141dd766
commit
502bfa9587
@ -7,10 +7,7 @@ where
|
||||
P2: Parser<I, O, E>,
|
||||
I: ParserInput + Clone,
|
||||
{
|
||||
move |input: I| match parser1.parse(input.clone()) {
|
||||
ok @ Ok(..) => ok,
|
||||
Err(_e) => parser2.parse(input),
|
||||
}
|
||||
choice((parser1, parser2))
|
||||
}
|
||||
|
||||
pub fn choice<C, I, O, E>(choices: C) -> (impl Parser<I, O, E>, Bnf)
|
||||
|
Loading…
Reference in New Issue
Block a user