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

Method getLineNumber

src/extraction/mybatis-extractor.ts:299–309  ·  view source on GitHub ↗
(offset: number)

Source from the content-addressed store, hash-verified

297 }
298
299 private getLineNumber(offset: number): number {
300 // Binary search
301 let lo = 0;
302 let hi = this.lineStarts.length - 1;
303 while (lo < hi) {
304 const mid = (lo + hi + 1) >>> 1;
305 if (this.lineStarts[mid]! <= offset) lo = mid;
306 else hi = mid - 1;
307 }
308 return lo + 1;
309 }
310}

Callers 1

extractMapperMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected