Answer prose round 2: resolveReads says it resolves fields before the format, and a plainer item 117

This commit is contained in:
2026-10-05 22:45:19 +02:00
committed by Lillem4n
parent 338358c70e
commit bcc6858922
2 changed files with 5 additions and 5 deletions
+3 -3
View File
@@ -166,9 +166,9 @@ func eachContained(n node, where string, fn func(c node, where string) error) er
}
// resolveReads answers each unbound read under root with a name its template sees, and returns
// the set of bindings some read answers to. It refuses a field spelling a name, fields before the
// format, as compile reports them. A refusal searches scopes, every scope of the category, for a
// name bound where the read cannot see it.
// the set of bindings some read answers to. It resolves a template's fields before its format, the
// order compile reports in, and refuses a field spelling a name. A refusal searches scopes, every
// scope of the category, for a name bound where the read cannot see it.
func resolveReads(root node, scopes []*nameScope) (map[*nameBinding]bool, error) {
read := map[*nameBinding]bool{}
var resolve func(n node, where string) error