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

Function extractCppQualifiedMethodName

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

Source from the content-addressed store, hash-verified

402}
403
404function extractCppQualifiedMethodName(node: SyntaxNode, source: string): string | undefined {
405 const macroDefined = recoverSingleArgMacroDefinedName(node, source) ?? recoverCppMacroDefinedName(node, source);
406 if (macroDefined) return macroDefined;
407 const declarator = getChildByField(node, 'declarator');
408 if (!declarator) return undefined;
409 const qid = findDeclaratorQualifiedId(declarator);
410 if (!qid) return undefined;
411 const name = cppQualifiedIdName(qid);
412 if (name) return cppDefinedName(name, source);
413 const parts = getNodeText(qid, source).trim().split('::').filter(Boolean);
414 return parts[parts.length - 1];
415}
416
417/**
418 * 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