You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jan 26, 2022. It is now read-only.
Missing ReturnIfAbrupt after step 1. (not required if steps 5-6 are placed directly after step 1)
Steps 5-6 should be placed directly after step 1.
Step 10: Calling RegExpCreate with regexp as the pattern parameter is probably not intended. This either needs to be changed to:
Let pattern be ToString(Get(regexp, "source")).
ReturnIfAbrupt(pattern).
Let rx be RegExpCreate(pattern, flags).
Or alternatively Symbol.species should be used like in RegExp.prototype[Symbol.split] (http://tc39.github.io/ecma262/#sec-regexp.prototype-@@split, steps 5-6 and step 13). I guess Symbol.species is actually the correct choice here, even if Symbol.matchAll doesn't get added.
Nit: Missing full stop in step 15.
Note 2 is not correct, e.g. rx is exposed to user script if RegExp.prototype.exec is overridden.
It's not valid to call IsRegExp and Get in steps 1-2 because it can trigger side effects if RegExp.prototype[Symbol.match] or RegExp.prototype.global are not the intrinsic functions.
Thanks for the thorough review! I still need to update the spec text after the latest meeting - specifically, to a) accept either a string or a regex, and b) to create Symbol.matchAll so that subclassing is handled properly. I'll update this issue when I've done so.
https://ljharb.github.io/String.prototype.matchAll/#String.prototype.matchAll
Missing ReturnIfAbrupt after step 1. (not required if steps 5-6 are placed directly after step 1)
Steps 5-6 should be placed directly after step 1.
Step 10: Calling RegExpCreate with
regexp
as the pattern parameter is probably not intended. This either needs to be changed to:Or alternatively
Symbol.species
should be used like inRegExp.prototype[Symbol.split]
(http://tc39.github.io/ecma262/#sec-regexp.prototype-@@split, steps 5-6 and step 13). I guessSymbol.species
is actually the correct choice here, even ifSymbol.matchAll
doesn't get added.Nit: Missing full stop in step 15.
Note 2 is not correct, e.g.
rx
is exposed to user script ifRegExp.prototype.exec
is overridden.https://ljharb.github.io/String.prototype.matchAll/#CreateRegExpStringIterator
It's not valid to call IsRegExp and Get in steps 1-2 because it can trigger side effects if RegExp.prototype[Symbol.match] or RegExp.prototype.global are not the intrinsic functions.
https://ljharb.github.io/String.prototype.matchAll/#%RegExpStringIteratorPrototype%.next
Missing ReturnIfAbrupt after step 6 (modified
RegExp.prototype.exec
!).https://ljharb.github.io/String.prototype.matchAll/#PropertiesOfRegExpStringIteratorInstances
"IsRegExp([[IteratingRegExp]]) is always true." is not correct, same reason as above.
The text was updated successfully, but these errors were encountered: