MCPcopy Create free account
hub / github.com/QodeXcli/QodeX / getName

Function getName

src/codegraph/extractor.ts:94–104  ·  view source on GitHub ↗
(node: any)

Source from the content-addressed store, hash-verified

92 }
93
94 function getName(node: any): string | null {
95 const nameNode = node.childForFieldName('name');
96 if (nameNode) return nameNode.text;
97 for (let i = 0; i < node.childCount; i++) {
98 const c = node.child(i);
99 if (c && (c.type === 'identifier' || c.type === 'property_identifier' || c.type === 'type_identifier')) {
100 return c.text;
101 }
102 }
103 return null;
104 }
105
106 function getEnclosingNamedSymbol(node: any): string | null {
107 let cur = node.parent;

Callers 2

getEnclosingNamedSymbolFunction · 0.85
visitFunction · 0.85

Calls 1

childMethod · 0.80

Tested by

no test coverage detected