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

Function headerRoutineAt

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

The qualified name of the routine the nearest routine header at or above a line names (`TFoo::Bar`), or null as for headerClassAt.

(filePath: string, line: number, context: ResolutionContext)

Source from the content-addressed store, hash-verified

816
817/** The qualified name of the routine the nearest routine header at or above a line names (`TFoo::Bar`), or null as for headerClassAt. */
818function headerRoutineAt(filePath: string, line: number, context: ResolutionContext): string | null {
819 headerClassAt(filePath, line, context);
820 return headerAt(memos(context).headerClasses.get(filePath) ?? [], line)?.qn ?? null;
821}
822
823/** The last of a file's header lines (see headerClassAt) at or above a line. */
824function headerAt<T extends { line: number }>(headers: T[], line: number): T | undefined {

Callers 1

nestedRoutineInScopeFunction · 0.85

Calls 4

headerClassAtFunction · 0.85
headerAtFunction · 0.85
memosFunction · 0.85
getMethod · 0.65

Tested by

no test coverage detected