MCPcopy Create free account
hub / github.com/colbymchenry/codegraph / unnamedTypeVariableName

Function unnamedTypeVariableName

src/extraction/languages/c-cpp.ts:217–226  ·  view source on GitHub ↗
(node: SyntaxNode, source: string)

Source from the content-addressed store, hash-verified

215 * shares it (objc.ts), and has no kernel walker.
216 */
217export function unnamedTypeVariableName(node: SyntaxNode, source: string): string | undefined {
218 if (getChildByField(node, 'name')) return undefined;
219 const declaration = definingDeclaration(node);
220 if (!declaration) return undefined;
221 for (const declarator of declaration.childrenForFieldName('declarator')) {
222 const identifier = cDeclaratorIdentifier(declarator);
223 if (identifier) return getNodeText(identifier, source);
224 }
225 return undefined;
226}
227
228/**
229 * Find the function NAME's `qualified_identifier` (`Foo::bar`) inside a

Callers 2

objc.tsFile · 0.90
c-cpp.tsFile · 0.85

Calls 4

getChildByFieldFunction · 0.90
getNodeTextFunction · 0.90
definingDeclarationFunction · 0.85
cDeclaratorIdentifierFunction · 0.85

Tested by

no test coverage detected