Keep the transform's arity inside its operand func, skip calls in compileWhole's column check, and file the two tokens for renaming

This commit is contained in:
2026-09-24 23:33:05 +02:00
committed by Lillem4n
parent 2a7499e93c
commit bb2bbe9697
4 changed files with 11 additions and 4 deletions
+4 -1
View File
@@ -329,9 +329,12 @@ func (t *table) compileWhole(format string) error {
return err
}
for _, tok := range toks {
if tok.kind != 'f' {
continue
}
for _, name := range tok.names {
a := splitArm(name, nil)
if _, ok := t.col[a.key]; tok.kind == 'f' && !ok && !isRef(a.key) && a.key != "" {
if _, ok := t.col[a.key]; !ok && !isRef(a.key) && a.key != "" {
return fmt.Errorf("format names no column %q of %s; the columns are %v", a.key, t.file, t.columns)
}
}