-
Notifications
You must be signed in to change notification settings - Fork 20
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 ClassSetCharacter parsing #143
Fix ClassSetCharacter parsing #143
Conversation
_ was removed from ClassSetReservedPunctuator See tc39/proposal-regexp-v-flag#60
4e4ba86
to
af5ee57
Compare
@@ -914,76 +914,10 @@ | |||
"raw": "[[a-z]&&[p-s]]" | |||
}, | |||
"[AB&&CD]": { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is invalid in unicode sets mode. V8 12.6 also throws "Invalid set operation in character class".
"message": "Invalid set operation in character class at position 3\n [@@]\n ^", | ||
"input": "[@@]" | ||
}, | ||
"[^^^]": { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/[^^]/v
is actually valid due to the negation. To test the reserved double punctuator we have to construct a case where ^^
is seen in the middle.
Hi @JLHwung , thanks for your PR! From a coding side, this looks good to me. Waiting in case @nicolo-ribaudo has comments. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, thanks!
Thank you for the PR @JLHwung and thank you @nicolo-ribaudo for the review! |
In this PR we fixed two spec compliance issues about the regexp unicode sets mode.
We also aligned the production names in comments to the latest ES2025 draft, so it is easier to check the implementation.
Please review this PR by commits. The second and third one are the actual fixes.
/cc @nicolo-ribaudo