Move a table's rows, links and pins into internal/rows, and walk every path through one per-step function, so Fake refuses a level carrying a repeat

This commit is contained in:
2026-10-05 21:33:30 +02:00
committed by Lillem4n
parent 05d9fcd8c1
commit 707cd6b203
22 changed files with 840 additions and 607 deletions
+3 -3
View File
@@ -162,11 +162,11 @@ func tableRecord(s *drawstate.State, t *table, tail []string) (node, renderedRow
}
switch n := n.(type) {
case *table:
return n, renderedRow{n, n.drawIn(s, &pins)}, nil
return n, renderedRow{n, n.rows.DrawIn(s, &pins)}, nil
case *tableRow:
return n.t, renderedRow{n.t, pins.mustRow(n.t)}, nil
return n.t, renderedRow{n.t, pins.MustRow(n.t.rows)}, nil
case *tableColumn:
return nil, renderedRow{}, fmt.Errorf("descends into %q, a column; a record is a table's row", n.t.header[n.i])
return nil, renderedRow{}, fmt.Errorf("descends into %q, a column; a record is a table's row", n.name())
}
return n, renderedRow{}, nil
}