diff --git a/data.go b/data.go index 019d678..c3fd37a 100644 --- a/data.go +++ b/data.go @@ -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 { diff --git a/format.go b/format.go index 18d947b..133bb7b 100644 --- a/format.go +++ b/format.go @@ -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 { diff --git a/todo.md b/todo.md index 9f08fd1..052f2b3 100644 --- a/todo.md +++ b/todo.md @@ -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