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

Function edgesByLine

__tests__/pascal-reference-boundaries.test.ts:518–523  ·  view source on GitHub ↗

The edges a routine makes, as `line kind:Target`, in line order.

(qualifiedName: string)

Source from the content-addressed store, hash-verified

516
517/** The edges a routine makes, as `line kind:Target`, in line order. */
518function edgesByLine(qualifiedName: string): string[] {
519 return graph!.getOutgoingEdges(routine(qualifiedName).id)
520 .filter((e) => e.kind === 'calls' || e.kind === 'references')
521 .map((e) => `${e.line} ${e.kind}:${graph!.getNode(e.target)!.qualifiedName}`)
522 .sort((a, b) => parseInt(a, 10) - parseInt(b, 10) || a.localeCompare(b));
523}
524
525describe('Delphi chains, method pointers, nested scopes and forward routines (#2550)', () => {
526 it('calls the method of what a constructor makes, the class\'s own or inherited', async () => {

Calls 4

mapMethod · 0.80
getNodeMethod · 0.80
routineFunction · 0.70
getOutgoingEdgesMethod · 0.45

Tested by

no test coverage detected