Generate all combinations of `k` indices from `0..n-1`
(n: number, k: number)
| 1334 | |
| 1335 | result = |
| 1336 | capture === null |
| 1337 | ? null |
| 1338 | : matchRemaining( |
| 1339 | patterns.slice(nextAppPatternIndex), |
| 1340 | capture |
| 1341 | ); |
| 1342 | |
| 1343 | // A complete overall match with this sequence capturing 'j' operands. |
| 1344 | if (result) break; |
| 1345 | |
| 1346 | // No match: restore the shared ops array to its exact |
| 1347 | // pre-attempt state. |
| 1348 | ops.length = 0; |
| 1349 | ops.push(...savedOps); |
| 1350 | |
| 1351 | j++; |
| 1352 | if (j >= ops.length) break; |
| 1353 | |
| 1354 | // If the next pattern matches yet another/subsequent operand, move to the next |
| 1355 | // iteration and try to match remaining patterns. |
no test coverage detected