MCPcopy
hub / github.com/colbymchenry/codegraph / namesOf

Function namesOf

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

Source from the content-addressed store, hash-verified

2872 // "& getRef() const" instead of "getRef", polluting search and callers. Very
2873 // common in Unreal Engine headers (`const FGameplayTagContainer& GetActiveTags() const`).
2874 const namesOf = (code: string) =>
2875 extractFromSource('r.cpp', code).nodes
2876 .filter((n) => n.kind === 'method' || n.kind === 'function')
2877 .map((n) => n.name);
2878
2879 it('names an inline reference-returning method by its identifier, not the declarator', () => {
2880 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.85

Calls 1

extractFromSourceFunction · 0.90

Tested by

no test coverage detected