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

Function namesOf

__tests__/extraction.test.ts:4668–4671  ·  view source on GitHub ↗
(code: string)

Source from the content-addressed store, hash-verified

4666 // "& getRef() const" instead of "getRef", polluting search and callers. Very
4667 // common in Unreal Engine headers (`const FGameplayTagContainer& GetActiveTags() const`).
4668 const namesOf = (code: string) =>
4669 extractFromSource('r.cpp', code).nodes
4670 .filter((n) => n.kind === 'method' || n.kind === 'function')
4671 .map((n) => n.name);
4672
4673 it('names an inline reference-returning method by its identifier, not the declarator', () => {
4674 const names = namesOf('class C {\npublic:\n const int& getRef() const { return x; }\n int& mutRef() { return x; }\n int x;\n};');

Callers 1

extraction.test.tsFile · 0.70

Calls 2

extractFromSourceFunction · 0.90
mapMethod · 0.80

Tested by

no test coverage detected