Skip to content

Keep single char-classes single char-classes in regex #10

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

Merged
merged 3 commits into from
Aug 20, 2024

Conversation

DavyLandman
Copy link
Member

@DavyLandman DavyLandman commented Jul 22, 2024

Right now [a-zA-Z] in rascal would get mapped to (?:[a-z]|[A-Z]). This made the regex bigger than needed. This PR now generates single character classes for single character classes in rascal (so the example becomes [a-zA-Z]).

@DavyLandman DavyLandman requested a review from sungshik July 22, 2024 14:57
Copy link
Collaborator

@sungshik sungshik left a comment

Choose a reason for hiding this comment

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

Thank you, nice improvement!

@sungshik sungshik merged commit cd31e74 into main Aug 20, 2024
2 checks passed
@sungshik sungshik deleted the merge-char-ranges branch August 20, 2024 13:24
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