MCPcopy Create free account
hub / github.com/arktypeio/arktype / tokensIn

Function tokensIn

ark/aot/unwrite.ts:448–455  ·  view source on GitHub ↗
(
	{ statements, tokens }: ModuleTokens,
	from: number,
	to: number
)

Source from the content-addressed store, hash-verified

446
447// the tokens of a module's statements, from one to before another
448const tokensIn = (
449 { statements, tokens }: ModuleTokens,
450 from: number,
451 to: number
452): [start: number, end: number] => {
453 const start = from < statements.length ? statements[from][0] : tokens.length
454 return [start, from === to ? start : statements[to - 1][1]]
455}
456
457type StatementTokens = [start: number, end: number]
458

Callers 1

compareFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected