MCPcopy Index your code
hub / github.com/CodeGraphContext/CodeGraphContext / getNodeDisplayLabel

Function getNodeDisplayLabel

website/src/lib/parser.worker.ts:431–440  ·  view source on GitHub ↗
(nodeType: string)

Source from the content-addressed store, hash-verified

429
430// Label a definition node type as Class / Function / Interface / etc.
431function getNodeDisplayLabel(nodeType: string): string {
432 if (nodeType.includes('class')) return 'Class';
433 if (nodeType.includes('interface')) return 'Interface';
434 if (nodeType.includes('trait')) return 'Trait';
435 if (nodeType.includes('enum')) return 'Enum';
436 if (nodeType.includes('module')) return 'Module';
437 if (nodeType.includes('struct')) return 'Class'; // treat struct as class-like
438 if (nodeType.includes('impl')) return 'Class';
439 return 'Function';
440}
441
442function valForLabel(label: string): number {
443 switch (label) {

Callers 1

processNextBatchFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected