From an opening `[`, the bracket-balanced body up to its matching `]`.
(src: string, openIdx: number)
| 5137 | |
| 5138 | /** From an opening `[`, the bracket-balanced body up to its matching `]`. */ |
| 5139 | function phpArrayBody(src: string, openIdx: number): string | null { |
| 5140 | let depth = 0; |
| 5141 | for (let i = openIdx; i < src.length; i++) { |
| 5142 | if (src[i] === '[') depth++; |
| 5143 | else if (src[i] === ']' && --depth === 0) return src.slice(openIdx + 1, i); |
| 5144 | } |
| 5145 | return null; |
| 5146 | } |
| 5147 | |
| 5148 | async function laravelEventEdges(ctx: ResolutionContext, onYield: MaybeYield): Promise<Edge[]> { |
| 5149 | let scannedFiles = 0; |