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

Function matchPascalSystemCall

src/resolution/pascal-scope.ts:164–171  ·  view source on GitHub ↗
(ref: UnresolvedRef, context: ResolutionContext)

Source from the content-addressed store, hash-verified

162 * most likely built with one that has it.
163 */
164export function matchPascalSystemCall(ref: UnresolvedRef, context: ResolutionContext): ResolvedRef | null {
165 const decl = declarationInScope(ref.referenceName.toLowerCase(), classOfCall(ref, context), ref, context);
166 if (!decl) return null;
167 if (DATA_KINDS.has(decl.node.kind) && !isProceduralData(decl.node, context)) return null;
168 if (!decl.node.qualifiedName.includes('::') && declaredUnderCondition(decl.node, context)) return null;
169 context.rememberNode?.(decl.node);
170 return { original: ref, targetNodeId: decl.node.id, confidence: decl.confidence, resolvedBy: decl.resolvedBy };
171}
172
173/**
174 * What a Pascal call another strategy resolved stands for, when it landed on

Callers 1

resolveOneInnerMethod · 0.90

Calls 6

declarationInScopeFunction · 0.85
classOfCallFunction · 0.85
isProceduralDataFunction · 0.85
declaredUnderConditionFunction · 0.85
hasMethod · 0.80
rememberNodeMethod · 0.80

Tested by

no test coverage detected