Answer architecture round 2: a read through a name reaching a repeat names the level from the name, a split arm is built by pathArm alone, and the three pick-key terms share one Vocabulary line

This commit is contained in:
2026-10-09 11:04:48 +02:00
committed by Lillem4n
parent 78bbc27fea
commit 4e63044c03
5 changed files with 21 additions and 21 deletions
+3 -3
View File
@@ -39,13 +39,13 @@ func splitArm(name string, refs map[string]resolvedRef) arm {
if resolved {
head = r.head
}
return arm{spelling: name, head: head, levels: levelKeys([]string{head}, 1)}
return pathArm(name, head, nil)
}
return pathArm(name, r.head, r.tail)
}
segs, err := grammar.SplitPath(name)
if err != nil || len(segs) == 1 {
return arm{spelling: name, head: name, levels: levelKeys([]string{name}, 1)}
return pathArm(name, name, nil)
}
return pathArm(name, segs[0], segs[1:])
}
@@ -109,7 +109,7 @@ func (t *template) compileArm(name string, targets map[*nameBinding]nameTarget)
}
target := targets[b]
full := append(target.tail[:len(target.tail):len(target.tail)], a.tail...)
if err := provePath(target.start, full, a.head); err != nil {
if err := provePath(target.start, full, a.head, len(target.tail)); err != nil {
return a, err
}
w := compilePath(target.start, full)