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

Function blankedEnd

src/extraction/languages/pascal-preparse.ts:620–624  ·  view source on GitHub ↗

The end of the furthest-reaching `[from, to)` span in `ranges` that holds `i`, or -1 when none does.

(ranges: readonly number[], i: number)

Source from the content-addressed store, hash-verified

618
619/** The end of the furthest-reaching `[from, to)` span in `ranges` that holds `i`, or -1 when none does. */
620function blankedEnd(ranges: readonly number[], i: number): number {
621 let end = -1;
622 for (let r = 0; r < ranges.length; r += 2) if (ranges[r]! <= i && ranges[r + 1]! > i && ranges[r + 1]! > end) end = ranges[r + 1]!;
623 return end;
624}
625
626/**
627 * Once the bodies are settled, from `i`, the index after a routine header's

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected