Give check, children, column, columns, draw, drawn, fields, format, head, index, key, n, name, named, names, null, number, op, reads, record, root, row, t and whole one meaning each

This commit is contained in:
2026-09-25 19:10:18 +02:00
committed by Lillem4n
parent cfe8124cc3
commit d6ac8ed9fd
29 changed files with 324 additions and 326 deletions
+5 -5
View File
@@ -44,8 +44,8 @@ func shippedShape(f *Generator) string {
case *choice:
facts[prefix] = readsFact(n)
case *table:
facts[prefix] = "\tformat " + strconv.Quote(n.format.format) + tableFacts(n) + readsFact(n)
for _, name := range n.columns {
facts[prefix] = "\tformat " + strconv.Quote(n.formatTemplate.format) + tableFacts(n) + readsFact(n)
for _, name := range n.header {
facts[join(prefix, name)] = "\tstring"
}
case *template:
@@ -77,9 +77,9 @@ func tableFacts(t *table) string {
for _, o := range []struct {
name string
col int
}{{"key", t.key}, {"name", t.name}, {"weight", t.weight}, {"parent", t.parent}} {
}{{"key", t.keyCol}, {"name", t.nameCol}, {"weight", t.weightCol}, {"parent", t.parentCol}} {
if o.col >= 0 {
b.WriteString("\t" + o.name + " " + t.columns[o.col])
b.WriteString("\t" + o.name + " " + t.header[o.col])
}
}
return b.String()
@@ -96,7 +96,7 @@ func readsFact(n node) string {
collect(it)
}
case *table:
collect(n.format)
collect(n.formatTemplate)
for _, cell := range n.cellTemplates {
collect(cell)
}