* A routine of a unit's declaration's name that its unit declares too: two * declarations of one name in one unit are `{$ifdef}` alternatives, and the * routine is the one with a body to read — mORMot's `MoveFast`, a variable * holding `Move` or the asm procedure `mormot.core.base.asmx64.inc` *
(decl: Node, context: ResolutionContext)
| 431 | * implements, and `ToByte`, a type or an inline function. |
| 432 | */ |
| 433 | function routineAlternative(decl: Node, context: ResolutionContext): Node | null { |
| 434 | if (decl.qualifiedName.includes('::')) return null; |
| 435 | const unit = unitFilesOf(decl.filePath, context)[0]; |
| 436 | return pascalNamed(decl.name.toLowerCase(), context).find((n) => n.kind === 'function' && |
| 437 | n.qualifiedName.toLowerCase() === decl.qualifiedName.toLowerCase() && unitFilesOf(n.filePath, context)[0] === unit) ?? null; |
| 438 | } |
| 439 | |
| 440 | /** Whether a member is a helper's (`TFooHelper = class helper for TFoo`). */ |
| 441 | function helperOwned(member: Node, context: ResolutionContext): boolean { |
no test coverage detected