Answer architecture round 2: refuse a self-read only inside what the binding lands on, fix the struct.go Layout line, move loneRef beside its caller, and widen item 83 to the link passes

This commit is contained in:
2026-10-05 09:41:20 +02:00
committed by Lillem4n
parent 1a15a139c8
commit 938bbb5c43
6 changed files with 43 additions and 23 deletions
-8
View File
@@ -251,11 +251,3 @@ func refTokens(toks []formatToken) []string {
}
return refs
}
// loneRef is the reference a format of one reference token and nothing else reads.
func loneRef(toks []formatToken) (string, bool) {
if len(toks) != 1 || toks[0].kind != nameRead || len(toks[0].names) != 1 || !isRef(toks[0].names[0]) {
return "", false
}
return toks[0].names[0], true
}