MCPcopy Create free account
hub / github.com/PatrickSys/codebase-context / getNodeKind

Function getNodeKind

src/utils/tree-sitter.ts:183–193  ·  view source on GitHub ↗
(nodeType: string)

Source from the content-addressed store, hash-verified

181}
182
183function getNodeKind(nodeType: string): string {
184 if (nodeType.includes('class')) return 'class';
185 if (nodeType.includes('interface')) return 'interface';
186 if (nodeType.includes('enum')) return 'enum';
187 if (nodeType.includes('struct')) return 'struct';
188 if (nodeType.includes('trait')) return 'trait';
189 if (nodeType.includes('constructor')) return 'method';
190 if (nodeType.includes('method')) return 'method';
191 if (nodeType.includes('type_alias') || nodeType === 'type_spec') return 'type';
192 return 'function';
193}
194
195function normalizeSymbolName(rawName: string): string {
196 return rawName

Callers 1

buildSymbolFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected