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

Function cppDefinedName

src/extraction/languages/c-cpp.ts:397–400  ·  view source on GitHub ↗

* A C++ definition's name node, as named: an explicit specialization's * (`template_function`) without its template arguments, so * `ReadPrimitive ` is `ReadPrimitive`, * the name every call to it writes. Mirrored in the kernel (ccpp/mod.rs).

(name: SyntaxNode, source: string)

Source from the content-addressed store, hash-verified

395 * the name every call to it writes. Mirrored in the kernel (ccpp/mod.rs).
396 */
397function cppDefinedName(name: SyntaxNode, source: string): string {
398 const own = name.type === 'template_function' ? getChildByField(name, 'name') : null;
399 return getNodeText(own ?? name, source).trim();
400}
401
402function extractCppQualifiedMethodName(node: SyntaxNode, source: string): string | undefined {
403 const macroDefined = recoverSingleArgMacroDefinedName(node, source) ?? recoverCppMacroDefinedName(node, source);

Callers 2

Calls 2

getChildByFieldFunction · 0.90
getNodeTextFunction · 0.90

Tested by

no test coverage detected