- Notifications
You must be signed in to change notification settings - Fork131
Open
Description
When both branches of a|||
combinator produce aFailure
as a result, the resulting error message is the one coming from the branch that matched the longest chain. This can lead to confusing error messages in situations like this one:
lazyvalparser= (intKeyword~ ...)||| (doubleKeyword~ ...)
where the parser outputs an error message likeexpected 'int'
. I think that it would be much less confusing to issue an error message that contains all the possible tokens:expected 'int' or 'double'
.
Am I using the API the wrong way, or is there no way of configuring the parser to output such error messages? In the latter case, the addition of such a feature would be much appreciated.
Metadata
Metadata
Assignees
Labels
No labels