* 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)
| 146 | * too (`Reset` in `GetKey(P).Reset`), and its scope is its receiver's type. |
| 147 | */ |
| 148 | function 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 |
no test coverage detected