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

Function refsFrom

__tests__/pascal-chained-calls.test.ts:76–83  ·  view source on GitHub ↗
(code: string, qualifiedName: string, kind = 'calls')

Source from the content-addressed store, hash-verified

74`;
75
76function refsFrom(code: string, qualifiedName: string, kind = 'calls'): string[] {
77 const result = extractFromSource('Unit1.pas', code);
78 const from = result.nodes.find((n) => n.qualifiedName === qualifiedName);
79 return result.unresolvedReferences
80 .filter((r) => r.referenceKind === kind && r.fromNodeId === from?.id)
81 .map((r) => `${r.referenceName}:${r.line}`)
82 .sort();
83}
84
85/**
86 * The outer methods of chains through members and calls, which resolution

Callers 2

chainsFromFunction · 0.70

Calls 2

extractFromSourceFunction · 0.90
mapMethod · 0.80

Tested by

no test coverage detected