-
Notifications
You must be signed in to change notification settings - Fork 13
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 support for the RegExp set notation proposal #20
Add support for the RegExp set notation proposal #20
Conversation
(cc @mathiasbynens @bnjmnt4n) |
regjsgen.js
Outdated
var i = -1, | ||
length = terms.length, | ||
result = '', | ||
term; | ||
|
||
if (separator == null) separator = ''; |
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.
nit: We could explicitly provide the third parameter and get rid of the condition branch here.
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.
Since this function is used in many (6) places and only one needs to specify a separator, I changed the impl to just work with an undefined separator.
From https://codecov.io/gh/bnjmnt4n/regjsgen/compare/8c434bb31f938cb297c5f10211aa8dc48d29cae4...da1639acdce7b2a00cb8acf3d080d029ee073fd7/diff it looks like every new line is covered, I don't understand why codecov reports it as dropped by 0.07% 🤔 |
Hey @nicolo-ribaudo thanks for the PR and sorry for the delay! I'll try to review and merge by the end of the week. |
Thank you! |
Thanks for the PR @nicolo-ribaudo and for the reviews everyone! I'll do a version bump in a bit. |
Tagged v0.6.0 and published to npm: let me know if there are any issues. |
Proposal: https://github.com/tc39/proposal-regexp-set-notation
RegJSParser PR: jviereck/regjsparser#113
I'm marking this as a draft because the parser PR hasn't been reviewed and published yet.