-
Notifications
You must be signed in to change notification settings - Fork 93
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Successful parser will not clear the error stack #355
Comments
That is expected behavior. At the point where it fails another |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Not sure if this is intended behavior or a bug. The operations such as
many
will parse success 0 or N times and will stop at the last failed parse. The parse will generate some error. The parsing operation will be successful but the error stack is not cleared. A subsequentskip
fails will cause the errors from the failedmany
theN+1
failed parse to show up.Consider the following example:
The input is a
"a"
, and the parser is to parsemany
'a'
followed by ab
(which will fail). The expected error is:But the actual output is:
The
Expected(Token('a'))
error is from themany
parser parsing"a"
. It should be cleared once themany
parser is deemed successful.The text was updated successfully, but these errors were encountered: