Answer architecture round 1: calls carry no operands in the grammar, ParseCalc returns its operands, one empty-segment check, sorted token kinds, and file items 110 and 111

This commit is contained in:
2026-10-05 12:25:22 +02:00
committed by Lillem4n
parent 3479f9cf98
commit 6fd7da19e5
14 changed files with 103 additions and 103 deletions
+2 -2
View File
@@ -109,8 +109,8 @@ func fieldPathTo(t, target *template) ([]string, bool) {
// calcReads reports whether a calc reads spelling as one operand.
func calcReads(spelling string) bool {
n, err := grammar.ParseCalc(spelling)
v, isVar := n.(grammar.CalcVar)
c, err := grammar.ParseCalc(spelling)
v, isVar := c.Expr.(grammar.CalcVar)
return err == nil && isVar && v.Name == spelling
}