MCPcopy Index your code
hub / github.com/codeaashu/claude-code / buildPositionSet

Function buildPositionSet

src/utils/bash/treeSitterAnalysis.ts:142–150  ·  view source on GitHub ↗

* Builds a Set of all character positions covered by the given spans.

(spans: Array<[number, number]>)

Source from the content-addressed store, hash-verified

140 * Builds a Set of all character positions covered by the given spans.
141 */
142function buildPositionSet(spans: Array<[number, number]>): Set<number> {
143 const set = new Set<number>()
144 for (const [start, end] of spans) {
145 for (let i = start; i < end; i++) {
146 set.add(i)
147 }
148 }
149 return set
150}
151
152/**
153 * Drops spans that are fully contained within another span, keeping only the

Callers 1

extractQuoteContextFunction · 0.85

Calls 1

addMethod · 0.45

Tested by

no test coverage detected