Link each template in steps that each return what they build, create a name scope with its owner in one place, and settle each record's columns at load, so Generator.records goes

This commit is contained in:
2026-10-05 22:21:10 +02:00
committed by Lillem4n
parent cdc82a99c6
commit cd7f0a04dc
16 changed files with 339 additions and 313 deletions
+3 -3
View File
@@ -67,7 +67,7 @@ func checkColumns(s nodeScope) error {
checked[column] = true
items, _ := columnItems(column)
for _, it := range items {
if r := it.link.readsColumn; r != nil && r.category != "" {
if r := it.readsColumn; r != nil && r.category != "" {
if err := check(r.category, r.field, r.column); err != nil {
return err
}
@@ -110,8 +110,8 @@ func columnDatatype(n node) DataType {
// itemDatatype is the datatype a column item declares, else that of the column it reads.
func itemDatatype(t *template) DataType {
if t.datatype == DataTypeString && t.link.readsColumn != nil {
return columnDatatype(t.link.readsColumn.column)
if t.datatype == DataTypeString && t.readsColumn != nil {
return columnDatatype(t.readsColumn.column)
}
return t.datatype
}