Skip to content

Conversation

rbuckton
Copy link

@rbuckton rbuckton commented Oct 1, 2019

This adds the specification text from https://github.com/tc39/proposal-regexp-match-indices, currently at Stage 3.

@ljharb ljharb changed the title Add spec text for regexp-match-indices Normative: add RegExp Match Indices Oct 1, 2019
@ljharb ljharb added needs test262 tests The proposal should specify how to test an implementation. Ideally via github.com/tc39/test262 normative change Affects behavior required to correctly evaluate some ECMAScript source text pending stage 4 This proposal has not yet achieved stage 4, but may otherwise be ready to merge. proposal This is related to a specific proposal, and will be closed/merged when the proposal reaches stage 4. labels Oct 1, 2019
@rbuckton
Copy link
Author

rbuckton commented Oct 2, 2019

Test262 Tests have already been merged: tc39/test262#2309

@ljharb ljharb added has test262 tests and removed needs test262 tests The proposal should specify how to test an implementation. Ideally via github.com/tc39/test262 labels Oct 2, 2019
@jmdyck
Copy link
Collaborator

jmdyck commented Oct 3, 2019

I've submitted an editorial PR against this PR's branch.

@ljharb ljharb marked this pull request as draft July 15, 2020 21:56
rbuckton added a commit to rbuckton/ecma262 that referenced this pull request Jan 15, 2021
@rbuckton
Copy link
Author

rbuckton commented Jan 15, 2021

NOTE: I still need to update the specification text based on the changes in tc39/proposal-regexp-match-indices#49

This has now been completed.

@rbuckton rbuckton marked this pull request as ready for review February 23, 2021 02:11
@rbuckton rbuckton force-pushed the regexp-match-indices branch from 48f9a15 to 683300e Compare February 23, 2021 02:31
@rbuckton
Copy link
Author

@ljharb, I know you approved this prior to the addition of the d flag. Can you take another look to make sure I haven't missed any thing editorially in the process of updating this PR?

Copy link
Member

@ljharb ljharb left a comment

Choose a reason for hiding this comment

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

still LGTM

@bakkot bakkot removed the editor call to be discussed in the next editor call label Feb 9, 2022
Copy link
Member

@michaelficarra michaelficarra left a comment

Choose a reason for hiding this comment

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

LGTM otherwise.

@michaelficarra
Copy link
Member

@rbuckton I've rebased your PR and applied my editorial changes.

1. Assert: _match_.[[StartIndex]] is an integer value ≥ 0 and < the length of _S_.
1. Assert: _match_.[[EndIndex]] is an integer value ≥ _match_.[[StartIndex]] and ≤ the length of _S_.
1. Return ! CreateArrayFromList(« 𝔽(_match_.[[StartIndex]]), 𝔽(_match_.[[EndIndex]]) »).
1. Assert: _match_.[[StartIndex]] is a non-negative integer less than or equal to the length of _S_.
Copy link
Member

Choose a reason for hiding this comment

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

This was totally on purpose and not an accident.

Copy link
Contributor

@syg