Skip to content
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

Fix pattern error report bug #46

Closed

Conversation

ltratt
Copy link
Member

@ltratt ltratt commented Jun 3, 2024

Bug fix in ba7da28, which made me realise I could then do a minor simplification (2f9d8f2). I then spotted another related pattern reporting error in 9794e4e.

When using the `..~` operator, it could eventually match after having
failed several times, and accidentally increment the apparent line the
pattern failed to match at. This didn't affect the matching algorithm,
but meant that a failure to match would report the wrong position in the
pattern. The new test line below incorrectly reported `(8, 6)` before
the fix in this commit.
When `...` fails to match it (sensibly) tells you that the error was on
the of the pattern *after* the `...`, but `..~` reported the pattern
line itself. This commit makes `..~` follow `...`s behaviour.
@ltratt
Copy link
Member Author

ltratt commented Jun 3, 2024

Closing as I've spotted another one, so I might as well try and do this in one shot.

@ltratt ltratt closed this Jun 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants