The line of the nearest routine header at column 0 at or above a line, else the line itself.
(filePath: string, line: number, context: ResolutionContext)
| 716 | |
| 717 | /** The line of the nearest routine header at column 0 at or above a line, else the line itself. */ |
| 718 | function routineHeaderAt(filePath: string, line: number, context: ResolutionContext): number { |
| 719 | headerClassAt(filePath, line, context); |
| 720 | const headers = memos(context).headerClasses.get(filePath) ?? []; |
| 721 | let found = line; |
| 722 | for (const h of headers) { |
| 723 | if (h.line > line) break; |
| 724 | if (h.routine) found = h.line; |
| 725 | } |
| 726 | return found; |
| 727 | } |
| 728 | |
| 729 | /** |
| 730 | * Whether a declaration is inside an `{$IFDEF}`, `{$IFNDEF}`, `{$IF}` or |
no test coverage detected