Add the geo trees for SE and US as linked tables, and build each locale's address on them #20

Merged
lilleman merged 14 commits from geo-tables into main 2026-09-18 01:44:02 +02:00
2 changed files with 4 additions and 1 deletions
Showing only changes of commit 7993e04d95 - Show all commits
+3
View File
@@ -63,6 +63,9 @@ func contained(n node) []namedNode {
case *table: case *table:
return append([]namedNode{{node: n.format}}, named(n.fields)...) return append([]namedNode{{node: n.format}}, named(n.fields)...)
case *column: case *column:
if len(n.t.tokens) == 0 {
return nil
}
var out []namedNode var out []namedNode
for r := 0; r < n.t.rows(); r++ { for r := 0; r < n.t.rows(); r++ {
if cell := n.t.cellNode(r, n.i); cell != nil { if cell := n.t.cellNode(r, n.i); cell != nil {
+1 -1
View File
@@ -285,7 +285,7 @@ func (t *table) checkCells() error {
if (col == t.key || col == t.name) && strings.ContainsAny(cell, inSelector) { if (col == t.key || col == t.name) && strings.ContainsAny(cell, inSelector) {
return fmt.Errorf("line %d: %s %q contains %q, which a selector cannot spell", row+2, t.columns[col], cell, cell[strings.IndexAny(cell, inSelector):][:1]) return fmt.Errorf("line %d: %s %q contains %q, which a selector cannot spell", row+2, t.columns[col], cell, cell[strings.IndexAny(cell, inSelector):][:1])
} }
if !strings.ContainsAny(cell, "{}") { if strings.IndexByte(cell, '{') < 0 && strings.IndexByte(cell, '}') < 0 {
continue continue
} }
n, err := compileString(cell) n, err := compileString(cell)