From 05bc56fe75049299b2b3efcfc4fbf0c77a8dc247 Mon Sep 17 00:00:00 2001 From: Lilleman auf Larv Date: Tue, 29 Sep 2026 03:24:44 +0200 Subject: [PATCH] Define descended where table.route takes it --- path.go | 7 ++++--- todo.md | 2 -- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/path.go b/path.go index 771248c..2e015cb 100644 --- a/path.go +++ b/path.go @@ -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 { diff --git a/todo.md b/todo.md index ef8e9c9..158eaaf 100644 --- a/todo.md +++ b/todo.md @@ -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