(line: string, symbolName: string)
| 124 | } |
| 125 | |
| 126 | function isDefinitionLine(line: string, symbolName: string): boolean { |
| 127 | const escaped = escapeRegex(symbolName); |
| 128 | const patterns = [ |
| 129 | new RegExp(`(?:function|class|enum|interface|struct|type|trait|fn|def|func)\\s+${escaped}`), |
| 130 | new RegExp(`(?:const|let|var|pub|export)\\s+(?:async\\s+)?(?:function\\s+)?${escaped}`), |
| 131 | ]; |
| 132 | return patterns.some((pattern) => pattern.test(line)); |
| 133 | } |
| 134 | |
| 135 | function normalizeKinds(kinds?: string[]): Set<string> | null { |
| 136 | if (!kinds || kinds.length === 0) return null; |
no test coverage detected