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

Function extractCppQualifiedMethodName

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

Source from the content-addressed store, hash-verified

400}
401
402function extractCppQualifiedMethodName(node: SyntaxNode, source: string): string | undefined {
403 const macroDefined = recoverSingleArgMacroDefinedName(node, source) ?? recoverCppMacroDefinedName(node, source);
404 if (macroDefined) return macroDefined;
405 const declarator = getChildByField(node, 'declarator');
406 if (!declarator) return undefined;
407 const qid = findDeclaratorQualifiedId(declarator);
408 if (!qid) return undefined;
409 const name = cppQualifiedIdName(qid);
410 if (name) return cppDefinedName(name, source);
411 const parts = getNodeText(qid, source).trim().split('::').filter(Boolean);
412 return parts[parts.length - 1];
413}
414
415/**
416 * The name of a C++ function an explicit specialization defines, without its

Callers 1

c-cpp.tsFile · 0.85

Calls 7

getChildByFieldFunction · 0.90
getNodeTextFunction · 0.90
cppQualifiedIdNameFunction · 0.85
cppDefinedNameFunction · 0.85

Tested by

no test coverage detected