Skip to content

Misleading error message when using optional or repeatedly parser #34

Closed
@ashihaby

Description

@ashihaby

I have tried to parse this string aaa bbb using this parser ident ~ "(?i)AND".r.*. I was expecting to see this error [1.5] failure: string matching regex '(?i)AND' expected but 'b' found, but I received this error [1.5] failure: string matching regex '\z' expected but 'b' found.
After Investigating in this bug, I found that this problem happens only when using * to repeat the same parser.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions