Make great documentation goal 1.2, and plan the README's reorganisation and the nested-template gaps #33
@@ -544,16 +544,22 @@ in a cell draws digits and `{/misc.uuid}` reads a reference, while `{name}` in a
|
||||
is refused, since a cell has no sibling. Each cell may select its own row of another
|
||||
table, `{/misc.currency[SEK].symbol}` on one row and `{/misc.currency[EUR].symbol}`
|
||||
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 a field or an option a table does not take, a key 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, and a key or name holding `[`, `]`, `{`, `}`,
|
||||
`"` or `|`, which a selector cannot spell; `New` maps the keys, and a name or parent column
|
||||
is mapped on the first draw that selects by name or descends through the table. A `name` needs a `key`, since a name naming several rows is reported by
|
||||
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 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;
|
||||
- a key or name holding `[`, `]`, `{`, `}`, `"` or `|`, which a selector cannot spell.
|
||||
|
||||
`New` maps the keys, and a name or parent column is mapped on the first draw that selects
|
||||
by name or descends through the table. A `name` needs a `key`, since a name naming several rows is reported by
|
||||
their keys, or a `parent`, inside whose row a name names one row, so `first-name[Kim]`
|
||||
is settled by the `sex` selected before it and a name repeating inside one parent row
|
||||
is refused; a name spelling another row's key is refused, since the key would
|
||||
select first and the name never. The table's options are its own — `rows`, `key`,
|
||||
`name`, `weight` and `parent` — so a column may be named `name`, as one usually is.
|
||||
select first and the name never. A table's options are its own, so a column may be named
|
||||
`name`, as one usually is.
|
||||
|
||||
### Row selection
|
||||
|
||||
@@ -787,8 +793,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, which could mean that row whatever the name
|
||||
picked, or that row only inside it;
|
||||
- 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;
|
||||
- `{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.
|
||||
|
||||
+4
-4
@@ -835,10 +835,10 @@ the same whoever references it. Such a read opens the frames around where it lan
|
||||
name from its pick's memo, so `{n}` and `{n.path}` read one pick of each name inside, and a
|
||||
reference or `Fake` fresh ones.
|
||||
|
||||
A name is a closure: it reaches every template nested inside the scope binding it, its
|
||||
fields, choice items and repeats, and keeps one pick through the draw, while a name bound
|
||||
inside a repeat picks anew on each iteration. It never reaches into a category a reference
|
||||
enters. A name an enclosing scope binds may not be bound again, so no name shadows another.
|
||||
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
|
||||
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.
|
||||
|
||||
A pick keeps only the levels a read of the name addresses, so a template draws the same way
|
||||
|
||||
@@ -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 answered item 162 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`. 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 answered item 162 on 2026-10-09. Today `bindOptions` in `internal/rows` refuses such a table, because the ambiguity error lists rows by key; `country[Sweden]` means one row where names are unique.
|
||||
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.
|
||||
|
||||
### 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 answered item 162 on 2026-10-09. Today `checkSelectorCells` in `internal/rows` refuses the whole table; a path naming such a key still fails to parse.
|
||||
The maintainer ruled so on 2026-10-09. Today `checkSelectorCells` in `internal/rows` refuses the whole table.
|
||||
|
||||
### 10. Test that every node kind reaches each switch over node kinds.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user