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

Function routineNode

src/resolution/pascal-scope.ts:941–948  ·  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

939
940/** The routine a reference comes from, or null when it comes from a file or anything else. */
941function routineNode(id: string, context: ResolutionContext): Node | null {
942 const memo = memos(context).routineNodes;
943 if (memo.has(id)) return memo.get(id)!;
944 const node = context.getNodeById?.(id) ?? null;
945 const routine = node && isRoutine(node) ? node : null;
946 memo.set(id, routine);
947 return routine;
948}
949
950/**
951 * A bare Pascal call (`Inner(1)`) to a routine nested where the call is (see

Callers 4

matchPascalInheritedCallFunction · 0.85
nestedRoutineInScopeFunction · 0.85
matchPascalNestedCallFunction · 0.85
resultTypeTextFunction · 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