Answer architecture round 2: a keyed walk position, a plainer Above test, and docs naming the owner and the key-name refusal
This commit is contained in:
+1
-1
@@ -839,7 +839,7 @@ each value one writer would spread that knot across packages, behind forwarding
|
|||||||
every public method. The draw state, the grammar, `DataType`, what a proof knows of a
|
every public method. The draw state, the grammar, `DataType`, what a proof knows of a
|
||||||
value, the builtins, the reading of data files and a table's rows read no engine type, so
|
value, the builtins, the reading of data files and a table's rows read no engine type, so
|
||||||
each sits in a package under `internal/`, behind the import list `imports_test.go` checks.
|
each sits in a package under `internal/`, behind the import list `imports_test.go` checks.
|
||||||
A table's rows reach the engine table owning them as a payload of a type parameter. Valid
|
A table's rows reach the engine table owning them as their owner, a value of a type parameter. Valid
|
||||||
until `todo.md` item 107 moves the engine.
|
until `todo.md` item 107 moves the engine.
|
||||||
|
|
||||||
## Goal 5.1's `{…}` covers `{{`, `}}` and a lone `}`, so the goal names no escape
|
## Goal 5.1's `{…}` covers `{{`, `}}` and a lone `}`, so the goal names no escape
|
||||||
|
|||||||
@@ -141,8 +141,8 @@ func (t *Table[O]) appendRow(row string, line int) error {
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// bindOptions resolves each option to its column and proves what it claims of the
|
// bindOptions resolves each option to its column, refuses a name reading the key column, and
|
||||||
// cells: a key is unique, a weight a positive number.
|
// proves what the options claim of the cells: a key is unique, a weight a positive number.
|
||||||
func (t *Table[O]) bindOptions() error {
|
func (t *Table[O]) bindOptions() error {
|
||||||
o := t.options
|
o := t.options
|
||||||
if o.Key != "" && o.Key == o.Name {
|
if o.Key != "" && o.Key == o.Name {
|
||||||
|
|||||||
@@ -110,7 +110,7 @@ func TestDrawInDrawsInsideThePinnedParentAndPinsItsAncestors(t *testing.T) {
|
|||||||
if pr := q.MustRow(country); country.Cell(pr, 0) != city.Cell(r, 0) {
|
if pr := q.MustRow(country); country.Cell(pr, 0) != city.Cell(r, 0) {
|
||||||
t.Fatalf("DrawIn pinned country %s above a city of %s", country.Cell(pr, 0), city.Cell(r, 0))
|
t.Fatalf("DrawIn pinned country %s above a city of %s", country.Cell(pr, 0), city.Cell(r, 0))
|
||||||
}
|
}
|
||||||
if above := q.Above(country); func() bool { _, ok := above.Pinned(city); return ok }() {
|
if _, ok := q.Above(country).Pinned(city); ok {
|
||||||
t.Fatal("Above(country) kept the city's pin")
|
t.Fatal("Above(country) kept the city's pin")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -164,7 +164,7 @@ func takeStep(at *pathPos, whole []string, level string, steps []pathStep, pins
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return steps, err
|
return steps, err
|
||||||
}
|
}
|
||||||
*at = pathPos{r.next, r.rest, r.descends}
|
*at = pathPos{n: r.next, tail: r.rest, descended: r.descends}
|
||||||
return routeSteps(steps, pins, x, r, i)
|
return routeSteps(steps, pins, x, r, i)
|
||||||
case *template:
|
case *template:
|
||||||
if x.repeat > 1 && !grammar.IsSelector(at.tail[0]) {
|
if x.repeat > 1 && !grammar.IsSelector(at.tail[0]) {
|
||||||
|
|||||||
Reference in New Issue
Block a user