Answer stability round 1: the readField comment names both directions of the shared value, and readName drops what namedPick states

This commit is contained in:
2026-10-05 23:11:43 +02:00
committed by Lillem4n
parent 977431b1e3
commit 3a29bdb1f0
3 changed files with 8 additions and 8 deletions
+2 -2
View File
@@ -145,8 +145,8 @@ func expand(s *drawstate.State, t *template, sc renderScope) string {
// readField renders one arm of a token. A read of a name, or of a level a read of the name
// rendering addresses, is kept in that name's pick; every other read draws afresh, so {word}
// {word} draws twice and {p.a} {p.b} reads two draws of p. A fresh read leaves the pick: a read
// below it would key the pick's memo by sc.pickKey, the level the pick rendered, and read the
// pick's value for a node the pick never drew.
// below it would key the pick's memo by sc.pickKey, the level the pick rendered, so it and the
// pick would read one value for two nodes.
func readField(s *drawstate.State, t *template, sc renderScope, a arm) readValue {
switch {
case a.kind == namedRead: