(ast: SchemaAST.AST)
| 2428 | const leaf = (kind: LeafKind): LeafLayout => ({ _: kind, slot: kind === "string" ? stringSlots++ : 0 }) |
| 2429 | |
| 2430 | function compile(ast: SchemaAST.AST): Layout { |
| 2431 | const hit = memo.get(ast) |
| 2432 | if (hit !== undefined) return hit |
| 2433 | const layout = go(ast) |
| 2434 | memo.set(ast, layout) |
| 2435 | return layout |
| 2436 | } |
| 2437 | |
| 2438 | function go(ast: SchemaAST.AST): Layout { |
| 2439 | switch (ast._tag) { |
no test coverage detected