Summary
Populate the indices property on RegExp match results when the d flag is set.
Why
18 test262 tests fail. The d flag is accepted but exec() does not populate result.indices.
Current behavior
/a(b)c/d.exec("abc").indices is undefined.
Expected behavior
Result includes indices: [[0,3],[1,2]] with indices.groups for named captures.
Scope notes
- Capture slot positions already tracked by VM
- Convert to 0-based character indices in BuildMatchArray (Goccia.RegExp.Runtime.pas)
Summary
Populate the indices property on RegExp match results when the d flag is set.
Why
18 test262 tests fail. The d flag is accepted but exec() does not populate result.indices.
Current behavior
/a(b)c/d.exec("abc").indices is undefined.
Expected behavior
Result includes indices: [[0,3],[1,2]] with indices.groups for named captures.
Scope notes