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

Function unnamedTypeVariableName

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

Source from the content-addressed store, hash-verified

218 * shares it (objc.ts), and has no kernel walker.
219 */
220export function unnamedTypeVariableName(node: SyntaxNode, source: string): string | undefined {
221 if (getChildByField(node, 'name')) return undefined;
222 const declaration = definingDeclaration(node);
223 if (!declaration) return undefined;
224 for (const declarator of declaration.childrenForFieldName('declarator')) {
225 const identifier = cDeclaratorIdentifier(declarator);
226 if (identifier) return getNodeText(identifier, source);
227 }
228 return undefined;
229}
230
231/**
232 * 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