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

Function unitsParser

ark/aot/flat.ts:1508–1517  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1506
1507// a pass reuses the parse before it where that one changed nothing
1508const unitsParser = (): UnitsParser => {
1509 let last: ParsedUnits | undefined
1510 return code => {
1511 if (last?.code !== code) {
1512 const { program } = parseUnits(code)
1513 last = { code, program, scopes: new ModuleScopes(program) }
1514 }
1515 return last
1516 }
1517}
1518
1519interface WrittenUnits {
1520 body: string

Callers 1

writtenUnitsOfFunction · 0.85

Calls 1

parseUnitsFunction · 0.85

Tested by

no test coverage detected