Answer prose round 1: plainer linkTemplates, ownScope, resolveReads, compileArm and settleRecords docs, recordOf naming its three entry points, a plainer engine decision, and item 117 read as a path's last step

This commit is contained in:
2026-10-05 22:42:30 +02:00
committed by Lillem4n
parent b0cd3fea16
commit 338358c70e
8 changed files with 28 additions and 28 deletions
+3 -3
View File
@@ -83,7 +83,7 @@ func checkReads(t grammar.Token, fields map[string]node, operands bool) ([]unbou
if _, _, err := grammar.RefShape(name); err != nil {
return nil, fmt.Errorf("token {%s}: %w", t.Body, err)
}
continue // its target is checked at New (see linkCategories)
continue // resolveLink checks its target once the tree is assembled
}
missing, err := checkArm(name, fields, !operands && len(names) == 1)
if err == nil {
@@ -316,8 +316,8 @@ func (t *template) compileArms(names []string, targets map[*nameBinding]nameTarg
return arms, nil
}
// compileArm compiles one read: a path from the head it names, or from what the name it reads
// through binds.
// compileArm compiles one read into a path: from the head it names, or, for a read through a
// name, from what that name binds.
func (t *template) compileArm(name string, targets map[*nameBinding]nameTarget) (arm, error) {
a := splitArm(name, t.link.refs)
if !t.isName(a.head) {