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

Function isBareCall

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

* Whether a Pascal call named by a bare name is written bare: its expression * starts with the name (`Reset(F)`). The last call of a chain is named bare * too (`Reset` in `GetKey(P).Reset`), and its scope is its receiver's type.

(ref: UnresolvedRef, context: ResolutionContext)

Source from the content-addressed store, hash-verified

146 * too (`Reset` in `GetKey(P).Reset`), and its scope is its receiver's type.
147 */
148function isBareCall(ref: UnresolvedRef, context: ResolutionContext): boolean {
149 if (!/^[A-Za-z_]\w*$/.test(ref.referenceName)) return false;
150 const line = fileLines(ref.filePath!, context)[ref.line - 1] ?? '';
151 return /^[A-Za-z_]\w*/.exec(line.slice(ref.column ?? 0))?.[0].toLowerCase() === ref.referenceName.toLowerCase();
152}
153
154/**
155 * A call to one of the System unit's names is the System unit's, which the

Callers 4

isPascalSystemCallFunction · 0.85
gatePascalDataCallFunction · 0.85
matchPascalNestedCallFunction · 0.85
gatePascalNestedTargetFunction · 0.85

Calls 2

fileLinesFunction · 0.85
execMethod · 0.65

Tested by

no test coverage detected