(source, calleeName)
| 468 | } |
| 469 | |
| 470 | function findCallObjectSource(source, calleeName) { |
| 471 | const regex = new RegExp(`\\b${calleeName}\\s*\\(`, 'm') |
| 472 | const match = regex.exec(source) |
| 473 | if (!match) return null |
| 474 | const braceStart = source.indexOf('{', match.index) |
| 475 | if (braceStart === -1) return null |
| 476 | return extractBalancedSegment(source, braceStart, '{', '}') |
| 477 | } |
| 478 | |
| 479 | function findInlineCommandObjectSource(source, symbol) { |
| 480 | const regex = new RegExp(`(?:export\\s+)?const\\s+${symbol}\\b[\\s\\S]*?=\\s*`, 'm') |
no test coverage detected