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 bug: Replace * with *? in QuantifierToken regex pattern #181

Merged
merged 5 commits into from
Oct 31, 2023

Conversation

christopher-hampson
Copy link
Contributor

Greedy matching for the QuantifierToken appears to cause issues for patterns with more than one quantifier.

@eliotwrobson eliotwrobson changed the base branch from main to develop October 29, 2023 20:04
@coveralls
Copy link

Coverage Status

coverage: 99.847% (+0.2%) from 99.639% when pulling 4de4b6d on christopher-hampson:main into b469f41 on caleb531:develop.

@eliotwrobson
Copy link
Collaborator

eliotwrobson commented Oct 29, 2023

@christopher-hampson thank you for your contribution! Do you happen to have any examples where the old code had issues fixed by the new code? It would be nice to have a test case for the behavior this change is specifically addressing.

Copy link
Owner

@caleb531 caleb531 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@christopher-hampson Yes, I would agree with @eliotwrobson that an additional test case to verify these changes would be preferable, if you could please provide one. This would demonstrate, in a TDD fashion, that the hypothetical omission of these lexer changes would break this new test.

@christopher-hampson
Copy link
Contributor Author

Thanks @eliotwrobson @caleb531, I've added a couple additional tests to test_quantifier which seemed the most appropriate place for this but apologies if not.

@eliotwrobson
Copy link
Collaborator

@christopher-hampson it looks like the tests are failing

@eliotwrobson eliotwrobson merged commit 0173f8b into caleb531:develop Oct 31, 2023
7 checks passed
@caleb531 caleb531 mentioned this pull request Dec 31, 2023
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.

4 participants