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

Function calls

__tests__/cpp-macro-defined-methods.test.ts:39–45  ·  view source on GitHub ↗

`calls` callees of a function or method, as `qualifiedName@file:line`.

(cg: CodeGraph, caller: string)

Source from the content-addressed store, hash-verified

37
38/** `calls` callees of a function or method, as `qualifiedName@file:line`. */
39function calls(cg: CodeGraph, caller: string): string[] {
40 return cg
41 .getCallees(callable(cg, caller).id)
42 .filter((r) => r.edge.kind === 'calls')
43 .map((r) => `${r.node.qualifiedName}@${r.node.filePath}:${r.node.startLine}`)
44 .sort();
45}
46
47/** The methods of a file, as `qualifiedName:line`. */
48function methodsIn(cg: CodeGraph, file: string): string[] {

Calls 3

mapMethod · 0.80
callableFunction · 0.70
getCalleesMethod · 0.45

Tested by

no test coverage detected