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
@@ -34,9 +34,9 @@ type renderedRow struct {
func (sc renderScope) at(n node, pins *pinSet) renderScope {
switch n := n.(type) {
case *tableRow:
sc.row = renderedRow{n.t, pins.mustRow(n.t)}
sc.row = renderedRow{n.t, pins.MustRow(n.t.rows)}
case *tableColumn:
sc.row = renderedRow{n.t, pins.mustRow(n.t)}
sc.row = renderedRow{n.t, pins.MustRow(n.t.rows)}
}
return sc
}
@@ -44,7 +44,7 @@ func (sc renderScope) at(n node, pins *pinSet) renderScope {
// rowOf is the row of t its columns render from.
func (sc renderScope) rowOf(t *table) int {
if sc.row.t != t {
panic(invariant.Broken("a column of %s renders in a scope holding no row of it", t.segment))
panic(invariant.Broken("a column of %s renders in a scope holding no row of it", t.rows.Segment()))
}
return sc.row.index
}