3
0
mirror of https://github.com/larvit/adf-codec.git synced 2026-11-19 06:35:44 +01:00

Answer architecture round 2: every builder joins its pieces through one bounded join, the readers take the engine guard, every refusal stands at the document's path, and a portable list's refusal names its own place

This commit is contained in:
2026-10-12 17:42:24 +02:00
committed by Lillem4n
parent 2b5d22cbc6
commit 3414c8690a
25 changed files with 379 additions and 249 deletions
+9 -4
View File
@@ -36,12 +36,17 @@ export function pipeCells(line: string): string[] | undefined {
return claimsPipeLine(line) ? splitPipeCells(line, 1) : undefined
}
export function spellPipeDelimiter(columns: number): string {
return spellPipeRow(Array.from({ length: columns }, () => '---'))
export function delimiterCells(columns: number): string[] {
return Array.from({ length: columns }, () => '---')
}
export function spellPipeRow(cells: readonly string[]): string {
return `| ${cells.join(' | ')} |`
export function* pipeRowPieces(cells: readonly string[]): Generator<string> {
yield '|'
for (const cell of cells) {
yield ' '
yield cell
yield ' |'
}
}
function splitPipeCells(line: string, start: number): string[] {