Define descended where table.route takes it

This commit is contained in:
2026-09-29 03:24:44 +02:00
committed by Lillem4n
parent 0ad94089e2
commit 05bc56fe75
2 changed files with 4 additions and 5 deletions
+4 -3
View File
@@ -156,9 +156,10 @@ type tableRoute struct {
descends bool
}
// route is how tail passes t, reached from another table where descended. The path
// reads a row wherever a segment follows or the table was reached from another; a
// table reached whole, with no selector, is left to a render's own draw.
// route is how tail passes t. descended means the previous route stepped into t
// from a row of an ancestor table, so t reads a row even where tail is empty; a
// table reached otherwise, with no selector and an empty tail, is left to a render's
// own draw.
func (t *table) route(tail []string, descended bool) (tableRoute, error) {
sel, tail, err := t.selector(tail)
if err != nil {
-2
View File
@@ -26,8 +26,6 @@ least modify.
This round, in order:
- Define `descended` where `table.route` takes it: five seats reverse-engineered it from
the `draw` expression and the four walks' loop condition.
- Keep a template's table in one field: `template.table` and `template.cell.table` both
answer which table it belongs to, and `checkOwnFamily` and `traceRead` branch on both.
- Stop `readField` dereferencing a nil `held`: `renderLeaf` passes nil, safe only