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

Function interfaceRoutineNames

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

* The names of the routines a unit file's interface section declares, * lowercased, the include files it pulls in there too; null when it has no * implementation section. Only code counts (a comment may start a line with * "implementation"), and a `{$ifdef}` branch that starts the implementation

(unitFile: string, context: ResolutionContext)

Source from the content-addressed store, hash-verified

2224 * … {$endif}`. A name any branch declares there counts.
2225 */
2226function interfaceRoutineNames(unitFile: string, context: ResolutionContext): Set<string> | null {
2227 const memo = memos(context).interfaceNames;
2228 if (memo.has(unitFile)) return memo.get(unitFile)!;
2229 const names = new Set<string>();
2230 const sections = scanInterface(unitFile, true, names, context, 0);
2231 const result = sections.implementation ? names : null;
2232 memo.set(unitFile, result);
2233 return result;
2234}
2235
2236/**
2237 * Adds the routine names a Pascal file declares while in an interface

Callers 1

exportedRoutineFunction · 0.85

Calls 5

memosFunction · 0.85
scanInterfaceFunction · 0.85
hasMethod · 0.80
getMethod · 0.65
setMethod · 0.45

Tested by

no test coverage detected