Keep the binding's prose to what its code cannot say
This commit is contained in:
@@ -196,14 +196,13 @@ func inlineScope(n node, label string) nodeScope {
|
||||
return func(fn func(path string, m node) error) error { return eachNode(n, label, fn) }
|
||||
}
|
||||
|
||||
// binding is one entry point's nodes on their way through bind, the load pipeline New,
|
||||
// NewTemplate and FakeStruct share; its fields are where they differ.
|
||||
// binding is one scope's way through bind, the one load pipeline; its fields are where
|
||||
// scopes differ.
|
||||
type binding struct {
|
||||
scope nodeScope
|
||||
link func() error
|
||||
// A loaded tree's cycle fence; an inline node's refusal of a drawGroup at its root.
|
||||
referenceFence func() error
|
||||
// checkField proves a struct's columns instead.
|
||||
// Set by a caller that proves the columns against their Go types itself.
|
||||
typedByGo bool
|
||||
}
|
||||
|
||||
|
||||
+1
-4
@@ -56,10 +56,7 @@ tags and any other caller read one.
|
||||
## An inline template skips the cycle fence
|
||||
|
||||
`New` proves the loaded tree acyclic, an inline node is a finite tree of its own, and
|
||||
nothing in the tree can reference it, so no render of it reaches itself. Every other
|
||||
fence runs over both, from one `binding.bind`, except that struct tags leave column
|
||||
agreement to their Go types, and an inline node refuses a `drawGroup` at its root,
|
||||
which nothing can name.
|
||||
nothing in the tree can reference it, so no render of it reaches itself.
|
||||
|
||||
## An inline template that does not compile is misuse (exit 2), including a reference that resolves to nothing
|
||||
|
||||
|
||||
Reference in New Issue
Block a user