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 handling of numeric backslash escape sequences in ECMAScript mode #33

Merged
merged 2 commits into from
Oct 7, 2020

Conversation

dop251
Copy link
Contributor

@dop251 dop251 commented Oct 7, 2020

In ECMAScript incomplete numeric escape sequences do not cause syntax errors, instead they are treated like an escaped character (which is then unescaped) followed by number(s), so /\x0/ for example is equivalent to /x0/.

Also, there is no support for \x{..} notation.

This PR fixes both issues.

@dlclark dlclark merged commit 694b378 into dlclark:master Oct 7, 2020
@dlclark
Copy link
Owner

dlclark commented Oct 7, 2020

Looks good to me

@dop251 dop251 deleted the fix-ecmascript-num-escape branch October 7, 2020 19:27
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