Give a table's current row one owner, the pin set, and return a column's null from its read
This commit is contained in:
+11
-5
@@ -11,14 +11,13 @@ type holdSet struct {
|
||||
}
|
||||
|
||||
// renderScope is where a render reads its reference paths: a hold set, in the draw group of the
|
||||
// template rendering, and the row a table's format is rendering, which its columns read. It passes
|
||||
// by value, and what is read from it reaches a map key, an interface or a func value only as a
|
||||
// copy; else sc, and with it every render's hold set, moves to the heap.
|
||||
// template rendering, and the pin set a table's columns read their row from: a whole read's own,
|
||||
// else the hold's. It passes by value, and what is read from it reaches a map key, an interface or
|
||||
// a func value only as a copy; else sc, and with it every render's hold set, moves to the heap.
|
||||
type renderScope struct {
|
||||
set *holdSet
|
||||
group string
|
||||
t *table
|
||||
row int
|
||||
pins *pinSet
|
||||
}
|
||||
|
||||
func eagerHoldSet() holdSet {
|
||||
@@ -52,6 +51,13 @@ func (sc renderScope) in(t *template) renderScope {
|
||||
return sc
|
||||
}
|
||||
|
||||
func (sc renderScope) rows() *pinSet {
|
||||
if sc.pins != nil {
|
||||
return sc.pins
|
||||
}
|
||||
return &sc.hold().pins
|
||||
}
|
||||
|
||||
func (sc renderScope) hold() *hold {
|
||||
if sc.group == "" {
|
||||
return &sc.set.unnamed
|
||||
|
||||
Reference in New Issue
Block a user