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

implement regex sticky support #1181

Merged
merged 1 commit into from
Feb 14, 2022
Merged

implement regex sticky support #1181

merged 1 commit into from
Feb 14, 2022

Conversation

rbri
Copy link
Collaborator

@rbri rbri commented Feb 11, 2022

Closes #961

@p-bakker
Copy link
Collaborator

Nice 👍

Will look over the changes coming week

Could you link this PR to the matching issue?

@rbri rbri changed the title împlement regex sticky support implement regex sticky support Feb 12, 2022
@p-bakker
Copy link
Collaborator

Looks good to me

@@ -1432,19 +1440,16 @@ built-ins/RegExp 925/1464 (63.18%)
prototype/source/value-empty.js
prototype/source/value-line-terminator.js
prototype/source/value-u.js
prototype/sticky 8/8 (100.0%)
prototype/sticky/cross-realm.js {unsupported: [cross-realm]}
prototype/sticky/length.js
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

BTW: this test + the next 2 fail because the 'sticky' property you added is of the wrong type.

Having said that, so are all the existing properties like multiline for example.

Not sure if we should continue as is, just do this new property properly (and fix the other ones later) or fix them all now

Copy link
Collaborator Author

@rbri rbri Feb 14, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@p-bakker what do you mean by wrong type?
Do you mean this disabled test?

org.mozilla.javascript.tests.NativeRegExpTest.flagsPropery()

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See #963: the global/multiline/ignoreCase properties and now the new sticky property ought to be accessor properties, but they are implemented as data properties

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, will have a look at #963 and try to fix it also.
But from my point of view we should merge this, if i find a fix for #963 i will make another pr.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Got no problem with that.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Once you merge I'll rebase my Regex unicode flag WIP and create a draft PR for it (not 100% complete yet)

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Merged, fix for the proprties is also on the way

@rbri rbri merged commit 376e744 into mozilla:master Feb 14, 2022
@rbri rbri deleted the regex_sticky branch February 14, 2022 21:40
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.

Support ES2015 Regex y flag (Sticky)
3 participants