-
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
Add unicodeSet
option for the RegExp set notation proposal
#113
Add unicodeSet
option for the RegExp set notation proposal
#113
Conversation
Thanks for your PR! I am on holidays this week and will look at this next week. |
This looks very good. I took a closer look at the PR and there were zero review comments needed (!). Well done @nicolo-ribaudo . @nicolo-ribaudo do you have any second thoughts in the meantime about this PR or do you want me to merge and create a new release? |
Awesome, thanks! During the last TC39 meeting (last week) there has been some discussion about this proposal. From what I understood it was only about semantics and not about the syntax, but I'd like to wait for @mathiasbynens to confirm it. |
Confirmed. The main syntax hasn't changed. It might of course still change on the way to Stage 3 (as with all proposals) but high-level changes are unlikely at this point. I would love to see this land! |
This PR considers the If the answer is yes, then this is good to land and I'll update the |
They are independent, indeed. The only "gotcha" is that they cannot be combined, i.e. |
Ok, I have to add that error 👍 |
@jviereck If the last commit looks good this can be merged. |
I released v0.7.0 including this PR, which was published to npm. |
* Add support for the RegExp set notation proposal Proposal: https://github.com/tc39/proposal-regexp-set-notation RegJSParser PR: jviereck/regjsparser#113 * Use `regjsparser` from npm * `u` and `v` cannot be used together * Avoid default value for `separator`
@jviereck I didn't notice that the proposal was updated, and now uses |
Thanks for the heads-up @nicolo-ribaudo . I will wait for your change before drafting a new release then. |
https://github.com/tc39/proposal-regexp-set-notation
I implemented support for the proposed
v
flag, which can only be used when theunicodeSet: true
option is enabled. I updated the AST in a bakward-compatible way:characterClass
nodes now have akind
property that can be"union"
(default),"intersection"
or"subtraction"
.If you have ideas for new tests please let me know!
After that this PR is merged, I will add support in
regjsgen
andregexpu-core
.cc @mathiasbynens @bnjmnt4n @jviereck (no hurry for reviews, since starting from Wednesday I'm on vacation for two weeks)