(list: Array<number>, start: number)
| 768 | let next: Array<number> = [] |
| 769 | const stack: Array<number> = [] |
| 770 | const add = (list: Array<number>, start: number) => { |
| 771 | stack.push(start) |
| 772 | while (stack.length > 0) { |
| 773 | const state = stack.pop()! |
| 774 | if (seen[state] === generation) { |
| 775 | continue |
| 776 | } |
| 777 | seen[state] = generation |
| 778 | list.push(state) |
| 779 | const token = tokens[state] |
| 780 | if (token?._tag === "Star" || token?._tag === "StarAll") { |
| 781 | stack.push(state + 1) |
| 782 | } else if (token?._tag === "GroupStart") { |
| 783 | stack.push(state + 2, state + 1) |
| 784 | } |
| 785 | } |
| 786 | } |
| 787 | add(current, 0) |
| 788 | for (let c = 0; c < path.length;) { |
| 789 | const code = path.codePointAt(c)! |
no test coverage detected