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

Function isProceduralData

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

* Whether data holds a routine, by its declared type: one written in place * (`FProc: procedure of object`, `F: reference to function: Integer`), a * project type declared as one (`TOnLog = procedure(...) of object;`), or a * type the project doesn't declare that the RTL's names say is one * (`T

(node: Node, context: ResolutionContext)

Source from the content-addressed store, hash-verified

1138 * (`TNotifyEvent`, `TWndMethod`, `TProc<T>`).
1139 */
1140function isProceduralData(node: Node, context: ResolutionContext): boolean {
1141 const memo = memos(context).procedural;
1142 const hit = memo.get(node.id);
1143 if (hit !== undefined) return hit;
1144 const procedural = isProceduralTypeText(declaredTypeText(node, context), context, 0);
1145 memo.set(node.id, procedural);
1146 return procedural;
1147}
1148
1149/**
1150 * Whether a written type is a routine's: written out

Callers 5

matchPascalSystemCallFunction · 0.85
gatePascalDataCallFunction · 0.85
matchPascalNestedCallFunction · 0.85
gatePascalNestedTargetFunction · 0.85
memberThroughPathFunction · 0.85

Calls 5

memosFunction · 0.85
isProceduralTypeTextFunction · 0.85
declaredTypeTextFunction · 0.85
getMethod · 0.65
setMethod · 0.45

Tested by

no test coverage detected