Open ErichDonGubler opened 9 months ago
A relevant chumsky
upstream discussion: https://github.com/zesterer/chumsky/discussions/522
GitHub
Let's say that I have this parser: it either parses a function definition or an expression. let fn_ = keyword("fn").padded() .ignore_then(ident_) .then(args) .then(fn_body); choice(( fn_, expr, )) ...
Right now, diagnostics are pretty bad. TODO: show examples, they're pretty easy to make, like with parens, empty intermittents, etc.
Current leads to fix this:
chumsky
to say, "Actually, you should report issues you have with the inner property or subtest parsers, and not just bail with an error trying to parse another top-level test as a last resort." a lanom::prelude::cut
.