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

Function routineNode

src/resolution/pascal-scope.ts:432–439  ·  view source on GitHub ↗

The routine a reference comes from, or null when it comes from a file or anything else.

(id: string, context: ResolutionContext)

Source from the content-addressed store, hash-verified

430
431/** The routine a reference comes from, or null when it comes from a file or anything else. */
432function routineNode(id: string, context: ResolutionContext): Node | null {
433 const memo = memos(context).routineNodes;
434 if (memo.has(id)) return memo.get(id)!;
435 const node = context.getNodeById?.(id) ?? null;
436 const routine = node && isRoutine(node) ? node : null;
437 memo.set(id, routine);
438 return routine;
439}
440
441/**
442 * A bare Pascal call (`Inner(1)`) to a routine nested where the call is (see

Callers 2

nestedRoutineInScopeFunction · 0.85
matchPascalNestedCallFunction · 0.85

Calls 6

memosFunction · 0.85
isRoutineFunction · 0.85
hasMethod · 0.80
getMethod · 0.65
getNodeByIdMethod · 0.65
setMethod · 0.45

Tested by

no test coverage detected