Answer product-owner round 1: a table refuses an unknown JSON member, the row-through-a-name refusal shows its two readings, a referenced category sees no name, and items 164 to 166 say what a cell reads and what each error says

This commit is contained in:
2026-10-09 10:44:07 +02:00
committed by Lillem4n
parent a1bfde3e41
commit 9286bf82f5
3 changed files with 10 additions and 9 deletions
+6 -5
View File
@@ -546,8 +546,8 @@ table, `{/misc.currency[SEK].symbol}` on one row and `{/misc.currency[EUR].symbo
on the next, since only one row renders. `New` proves the header, the options and every
cell token, and refuses:
- a JSON key other than `format`, `rows`, `key`, `name`, `weight` and `parent`, which could
be meant as a field or as an option a table does not take;
- a JSON member other than `format`, `rows`, `key`, `name`, `weight` and `parent`, which
could be meant as a field or as an option a table does not take;
- a key cell that is empty or repeats;
- a weight that is negative, not a number, or too close to `0` to tell from it;
- every weight `0`, across the table or inside one parent row;
@@ -781,7 +781,8 @@ A name is drawn on its first read, and lives in the category binding it: any fie
category may read it, and a record's columns read one pick. Each render of the category picks
anew, and so does each bare reference to it. A name a `repeat` binds picks again on every
iteration, and one bound outside the repeat keeps its pick on every line. A name a choice's
item binds lives in that item, and picks anew each time the item is drawn.
item binds lives in that item, and picks anew each time the item is drawn. A category a
reference enters does not see the name; bind it in the category that reads it.
Refused at `New`, each error naming what to write instead:
@@ -793,8 +794,8 @@ Refused at `New`, each error naming what to write instead:
- a read of a name inside the field bound to it: read it outside that field;
- reading a name outside the choice item that binds it, since the other items leave it
unbound;
- a path through a name that selects a row, since it could mean that row whatever the name
picked, or that row only where the name's pick holds it;
- a path through a name that selects a row: `{r.municipality[0180]}` could mean municipality
0180 whatever region `r` picked, or 0180 only where `r` picked the region holding it;
- `{n}` beside `{n.w}` where `n`'s category reads `w` twice, as in `{w}-{w}` or
`{w.a} {w.b}`;
- a binding in a table's format or cell.
+1 -1
View File
@@ -836,7 +836,7 @@ name from its pick's memo, so `{n}` and `{n.path}` read one pick of each name in
reference or `Fake` fresh ones.
A name is a closure. It reaches every field, choice item and repeat nested inside the
scope binding it, and keeps one pick through the draw. A name bound inside a repeat picks
scope binding it, bar the field bound to it, and keeps one pick through the draw. A name bound inside a repeat picks
anew on each iteration. A name an enclosing scope binds may not be bound again, so no name
shadows another.
The maintainer ruled so on 2026-10-09.
+3 -3
View File
@@ -276,7 +276,7 @@ The decision "comprehension floor: every dimension and the overall at 7.0 or abo
### 164. Let a table's format or a cell bind a name, which lives in that format or cell and keeps one pick through the draw.
The maintainer ruled so on 2026-10-09: a name is a lexical closure, as the decision "A name lives in the category binding it, or in the repeat or choice item binding it, and is drawn on its first read" now states. Today `table.go` refuses `{/sv_SE.person as p}{p.first} {p.last}` in a cell with `a table binds no name`. Revise that decision's title and the README's Names list with it.
The maintainer ruled so on 2026-10-09: a name is a lexical closure, as the decision "A name lives in the category binding it, or in the repeat or choice item binding it, and is drawn on its first read" now states. Today `table.go` refuses `{/sv_SE.person as p}{p.first} {p.last}` in a cell with `a table binds no name`. A format's name lives in the format and a cell's in the cell, so a cell reads no name the format binds, since a cell has no sibling. Revise that decision's title and the README's Names list with it.
### 157. Show in the README's CLI section how PowerShell and cmd.exe pipe a template, one line per shell family.
@@ -292,7 +292,7 @@ All 13 seats of the 2026-10-07 panel and scoring run on ad59967 again named the
### 165. Let a table carry `name` with neither `key` nor `parent`, and list the rows a name matches by their line where it matches several.
The maintainer ruled so on 2026-10-09. Today `bindOptions` in `internal/rows` refuses such a table, since its error for a name matching several rows lists them by key.
The maintainer ruled so on 2026-10-09. Today `bindOptions` in `internal/rows` refuses such a table, since its error for a name matching several rows lists them by key. Afterwards that error lists the rows by line, the header being line 1, and ends with "make the names unique, or add a key column".
### 127. Give a Swedish street only postal codes whose delivery digit means street or rural delivery, dropping codes whose delivery digit is 9, or record why they stay.
@@ -304,7 +304,7 @@ Today `Fake("sv_SE.person.")` reports `no field ""`, while `{/sv_SE.person.}` re
### 166. Let a key or name cell hold a bracket, a brace, a double quote or a pipe, so the table loads, its row draws at random, and only a selector cannot reach it.
The maintainer ruled so on 2026-10-09. Today `checkSelectorCells` in `internal/rows` refuses the whole table.
The maintainer ruled so on 2026-10-09. Today `checkSelectorCells` in `internal/rows` refuses the whole table. Afterwards a path such as `{/t[A|B]}` fails saying a selector cannot spell `|`, and the README says a row whose name holds such a character is still selected by its key.
### 10. Test that every node kind reaches each switch over node kinds.