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

reduce escape sequences in regular expressions #90

Open
michaelficarra opened this issue Sep 26, 2013 · 1 comment
Open

reduce escape sequences in regular expressions #90

michaelficarra opened this issue Sep 26, 2013 · 1 comment

Comments

@michaelficarra
Copy link
Member

We already do something similar with strings, reducing '\x20' to ' ' (escodegen handles this for us automatically). It gets trickier with regular expressions, though, because we will need to avoid control characters such as [](){}-\. When expressed as \u????, these control characters can still be reduced to \x??.

@Constellation
Copy link
Member

It breaks the regexp.source result.
So we need to provide advance mode to do such optimizations.

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

No branches or pull requests

2 participants