Delete loadData's, drawRow's and selector's comments, and render.go's second and third compile notes
This commit is contained in:
@@ -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 {
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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())
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user