| 169 | } |
| 170 | |
| 171 | function mapKind(typeStr: string): SymbolKind { |
| 172 | const kinds: Record<string, string> = { |
| 173 | function: "function", method: "method", class: "class", |
| 174 | struct: "struct", enum: "enum", interface: "interface", |
| 175 | type: "type", trait: "trait", const: "const", variable: "variable", |
| 176 | export: "export", |
| 177 | }; |
| 178 | return (kinds[typeStr] ?? "function") as SymbolKind; |
| 179 | } |
| 180 | |
| 181 | function walkTree(rootNode: TSNode, defTypes: Record<string, string>, maxDepth: number = 3): CodeSymbol[] { |
| 182 | const symbols: CodeSymbol[] = []; |