Give a pick key one type, pickKey, and key every read's levels from the head its steps start at to its leaf

This commit is contained in:
2026-10-05 23:25:46 +02:00
committed by Lillem4n
parent b726edd7cb
commit 44b6f1ef89
10 changed files with 75 additions and 73 deletions
+1 -1
View File
@@ -146,7 +146,7 @@ func expand(s *drawstate.State, t *template, sc renderScope) string {
// a level that a read of the name being rendered addresses; every other read draws afresh, so
// {word} {word} draws twice and {p.a} {p.b} reads two draws of p.
// A fresh read clears sc.pick. Kept, a read nested in the fresh one would key the pick's memo by
// sc.pickKey, the path from the name to what the pick renders, and share a value with a different
// sc.pickAt, where in the pick it renders, and share a value with a different
// node at that path.
func readField(s *drawstate.State, t *template, sc renderScope, a arm) readValue {
switch {