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

Add support for the RegExp set notation proposal #20

Merged
merged 4 commits into from Sep 29, 2021

Conversation

nicolo-ribaudo
Copy link
Contributor

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.

@nicolo-ribaudo nicolo-ribaudo marked this pull request as ready for review September 6, 2021 17:34
@nicolo-ribaudo
Copy link
Contributor Author

regjsparser has been published, this is ready to be reviewed now!

(cc @mathiasbynens @bnjmnt4n)

tests/tests.js Outdated Show resolved Hide resolved
regjsgen.js Outdated
var i = -1,
length = terms.length,
result = '',
term;

if (separator == null) separator = '';
Copy link

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.

Copy link
Contributor Author

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.

@nicolo-ribaudo
Copy link
Contributor Author

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% 🤔

@bnjmnt4n
Copy link
Owner

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.

@bnjmnt4n bnjmnt4n merged commit b3c31ee into bnjmnt4n:master Sep 29, 2021
@nicolo-ribaudo nicolo-ribaudo deleted the proposal-unicode-set branch September 29, 2021 12:40
@nicolo-ribaudo
Copy link
Contributor Author

Thank you!

@bnjmnt4n
Copy link
Owner

Thanks for the PR @nicolo-ribaudo and for the reviews everyone! I'll do a version bump in a bit.

@bnjmnt4n
Copy link
Owner

bnjmnt4n commented Oct 1, 2021

Tagged v0.6.0 and published to npm: let me know if there are any issues.

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.

None yet

3 participants