Make great documentation goal 1.2, and plan the README's reorganisation and the nested-template gaps #33
@@ -235,9 +235,9 @@ func (b binding) bind() error {
|
|||||||
return checkNodeFences(b.scope)
|
return checkNodeFences(b.scope)
|
||||||
}
|
}
|
||||||
|
|
||||||
// checkNodeFences runs the per-node fences over a scope, each over the whole scope
|
// checkNodeFences runs the per-node fences every binding needs over a scope, each
|
||||||
// before the next, so which of several broken nodes is reported does not depend on
|
// over the whole scope before the next, so which of several broken nodes is reported
|
||||||
// the walk. Its walks terminate only where nothing renders itself.
|
// does not depend on the walk. Its walks terminate only where nothing renders itself.
|
||||||
func checkNodeFences(s nodeScope) error {
|
func checkNodeFences(s nodeScope) error {
|
||||||
mem := renderCounts{}
|
mem := renderCounts{}
|
||||||
if err := s(func(path string, n node) error { return repeatCheck(path, n, mem) }); err != nil {
|
if err := s(func(path string, n node) error { return repeatCheck(path, n, mem) }); err != nil {
|
||||||
|
|||||||
@@ -367,7 +367,7 @@ func checkSegments(a arm) error {
|
|||||||
// values of the operands it named, which expand read for it.
|
// values of the operands it named, which expand read for it.
|
||||||
type callFn func(s *session, emitted string, operands []string) string
|
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
|
// or a builtin already prepared with its args. compile builds these so render never
|
||||||
// re-scans the format.
|
// re-scans the format.
|
||||||
type op struct {
|
type op struct {
|
||||||
|
|||||||
@@ -26,10 +26,6 @@ least modify.
|
|||||||
|
|
||||||
This round, in order:
|
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
|
- Correct the false comments: `node` says rendering never re-sums weights, which
|
||||||
`builtLookup` does on first draw; `Generator` claims immutable after `New`, while
|
`builtLookup` does on first draw; `Generator` claims immutable after `New`, while
|
||||||
`Fake` sets `root.children` each call, which belongs in `New`; `renders` credits
|
`Fake` sets `root.children` each call, which belongs in `New`; `renders` credits
|
||||||
|
|||||||
Reference in New Issue
Block a user