diff --git a/data.go b/data.go index f12e9c5..28bd9be 100644 --- a/data.go +++ b/data.go @@ -27,13 +27,6 @@ func (s dataSource) labelled(p string) string { return path.Join(s.label, p) } -// loadData loads every source into one namespace tree and returns its root -// children. A directory becomes a folder; each *.json file in it compiles to a node -// keyed by its base name (address.json -> "address"); each subdirectory becomes a -// nested folder, so folders turn into dot-path segments. Sources merge left to right: -// matching folders merge by their children, and any other clash is won by the last -// source loaded. Once merged, linkRefs binds every reference against the -// final tree. func loadData(sources []dataSource) (map[string]node, error) { root := map[string]node{} for _, src := range sources { diff --git a/path.go b/path.go index 02037ab..59b7c16 100644 --- a/path.go +++ b/path.go @@ -418,7 +418,6 @@ func (w *pathDraw) variant(c *choice, rest []string) node { return n } -// selector splits the selector a tail starts with from the rest of it. func (t *table) selector(tail []string) (sel string, rest []string, err error) { if len(tail) == 0 || !isSelector(tail[0]) { return "", tail, nil diff --git a/render.go b/render.go index e05ca5c..86a3aa2 100644 --- a/render.go +++ b/render.go @@ -105,8 +105,7 @@ func expandAnew(s *generatorState, t *template) string { } // pick selects one item. Uniform choices are O(1); weighted choices are an -// O(log n) search over precomputed cumulative weights. compile guarantees a -// non-empty choice and a finite positive total, so the index is always in range. +// O(log n) search over precomputed cumulative weights. func pick(s *generatorState, c *choice) node { if c.cum == nil { return c.items[s.IntN(len(c.items))] @@ -114,8 +113,7 @@ func pick(s *generatorState, c *choice) node { return c.items[pickCum(s, c.cum)] } -// expand renders a template's compiled ops. compile validated every token, so this -// cannot fail. +// expand renders a template's compiled ops. func expand(s *generatorState, t *template, sc renderScope) string { var b strings.Builder b.Grow(t.compiled.grow) diff --git a/table.go b/table.go index 71c4fc8..6a7e9cd 100644 --- a/table.go +++ b/table.go @@ -471,7 +471,6 @@ func (t *table) builtLookup() *rowLookup { return &t.lookup } -// drawRow picks a row over the whole table. func (t *table) drawRow(s *generatorState) int { if t.cum == nil { return s.IntN(t.rowCount()) diff --git a/todo.md b/todo.md index fb77657..107ef1b 100644 --- a/todo.md +++ b/todo.md @@ -31,9 +31,6 @@ on 2026-09-29 a third time (Navigation 7.0, Locality 5.6, Shape 6.3, Self-suffic This round, in order: -- Delete the prose two or more seats found empty: `loadData`'s comment, which also names - `linkRefs` where `bind` runs, `table.drawRow`'s, `table.selector`'s, and `render.go`'s - second and third "compile validated" notes. - Run the nine-seat panel again and file what it names here. ### Data