-
-
Notifications
You must be signed in to change notification settings - Fork 201
Open
Description
fn inner<'src>() -> impl Parser<'src, &'src str, (), extra::Err<Rich<'src, char>>> {
just("!")
.then_ignore(choice((
just("a").contextual().configure(|_cfg, cond| true),
just("b").contextual().configure(|_cfg, cond| false),
)))
.ignored()
}
let p = inner();
let e = p.parse("!");
for e in e.into_errors() {
println!("ERROR: {e}");
}results in this:
ERROR: found end of input expected 'a', or something elseThe something else doesn't make sense here as the other contextual is disabled.
Metadata
Metadata
Assignees
Labels
No labels