Drop the last field-alternation wording, say checkNodeFences holds the fences every binding needs, and tick the rename off

This commit is contained in:
2026-09-29 04:22:39 +02:00
committed by Lillem4n
parent f0992e7151
commit fe2fea5da2
3 changed files with 4 additions and 8 deletions
+3 -3
View File
@@ -235,9 +235,9 @@ func (b binding) bind() error {
return checkNodeFences(b.scope)
}
// checkNodeFences runs the per-node fences over a scope, each over the whole scope
// before the next, so which of several broken nodes is reported does not depend on
// the walk. Its walks terminate only where nothing renders itself.
// checkNodeFences runs the per-node fences every binding needs over a scope, each
// over the whole scope before the next, so which of several broken nodes is reported
// does not depend on the walk. Its walks terminate only where nothing renders itself.
func checkNodeFences(s nodeScope) error {
mem := renderCounts{}
if err := s(func(path string, n node) error { return repeatCheck(path, n, mem) }); err != nil {
+1 -1
View File
@@ -367,7 +367,7 @@ func checkSegments(a arm) error {
// values of the operands it named, which expand read for it.
type callFn func(s *session, emitted string, operands []string) string
// op is one compiled unit of a format string: a literal run, a field alternation,
// op is one compiled unit of a format string: a literal run, a name read,
// or a builtin already prepared with its args. compile builds these so render never
// re-scans the format.
type op struct {
-4
View File
@@ -26,10 +26,6 @@ least modify.
This round, in order:
- Rename the names that mislead: `table.pinnedRow` is the row node, not a pinned row;
`table.category` is a bare name beside the dotted `category` of `resolveLink`;
`checkRenders` renders nothing; `fieldAlternation` is a plain `{name}` too; and
`referenceFence` is the cycle check for a tree and a drawGroup check inline.
- Correct the false comments: `node` says rendering never re-sums weights, which
`builtLookup` does on first draw; `Generator` claims immutable after `New`, while
`Fake` sets `root.children` each call, which belongs in `New`; `renders` credits