language-ext
language-ext copied to clipboard
Fix error message of notFollowedBy parser
- [BUG] Tests shows that notFollowedBy reports wrong position. Fixed.
- notFollowedBy did output result of p. This might be something different than input string and therefore might hide the problem. As
label
is not available I think it is a better approach to output the problematic part of the input string (at least if something was consumed). - The new version will allow parsers that don't consume anything like
eof
. Might be rare but why not supportnotFollowedBy(eof)
or parsers that are decorated withlookahead
etc.
Notes: I tried handling all cases of ParserResult state correctly, but I'm not sure -- especially about the last case.