(private readonly source: string)
| 53 | readonly length: number; |
| 54 | |
| 55 | constructor(private readonly source: string) { |
| 56 | scratch ??= new Int32Array(MAX_SOURCE_FILE_SIZE_BYTES + 2); |
| 57 | let count = 1; |
| 58 | for (let at = source.indexOf('\n'); at >= 0; at = source.indexOf('\n', at + 1)) scratch[count++] = at + 1; |
| 59 | scratch[count] = source.length + 1; |
| 60 | this.starts = scratch.slice(0, count + 1); |
| 61 | this.length = count; |
| 62 | } |
| 63 | |
| 64 | /** Line `index`, 0-based, without its newline; undefined past the last. */ |
| 65 | at(index: number): string | undefined { |
nothing calls this directly
no outgoing calls
no test coverage detected