-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Editorial: String.prototype.matchAll iterators won't return null #3423
Editorial: String.prototype.matchAll iterators won't return null #3423
Conversation
spec.html
Outdated
@@ -34894,7 +34894,7 @@ <h1>String.prototype.match ( _regexp_ )</h1> | |||
|
|||
<emu-clause id="sec-string.prototype.matchall"> | |||
<h1>String.prototype.matchAll ( _regexp_ )</h1> | |||
<p>This method performs a regular expression match of the String representing the *this* value against _regexp_ and returns an iterator. Each iteration result's value is an Array containing the results of the match, or *null* if the String did not match.</p> | |||
<p>This method performs a regular expression match of the String representing the *this* value against _regexp_ and returns an iterator. Each iteration result's value is an Array containing the results of the match.</p> |
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 fine, but I would probably say a bit more.
<p>This method performs a regular expression match of the String representing the *this* value against _regexp_ and returns an iterator. Each iteration result's value is an Array containing the results of the match.</p> | |
<p>This method performs a regular expression match of the String representing the *this* value against _regexp_ and returns an iterator that yields match results. Each match result is an Array containing the matched portion of the String as the first element, followed by the portions matched by any capturing groups. If the regular expression never matches, the returned iterator does not yield any match results.</p> |
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.
We could also <dfn>
a term for these match result arrays constructed and returned by RegExpBuiltinExec
. /cc @tc39/ecma262-editors
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.
In the editor call today, @syg agreed that we should probably <dfn>
this thing. We could do it as part of this PR or as a follow-up, doesn't matter to me.
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.
Thank you for the review!
I'm totally not sure how to add a definition for the term, so I'd prefer not to address that in this PR.
ea3f999
to
b688e11
Compare
b688e11
to
76814cb
Compare
Closes #3421