Split the picks and the name fences out of name.go, state the repeat refusal and the naming rule where they hold, and draw a memo's variants one way

This commit is contained in:
2026-10-03 14:16:57 +02:00
committed by Lillem4n
parent 8c3ee104f6
commit 2bb795e08c
10 changed files with 375 additions and 369 deletions
+1 -10
View File
@@ -427,16 +427,7 @@ func drawVariant(s *generatorState, c *choice, memo *drawMemo, levels []string,
if memo == nil {
return resolveChoice(s, c)
}
level := levels[at]
n, drew := memo.variant[level]
if !drew {
n = resolveChoice(s, c)
if memo.variant == nil {
memo.variant = map[string]node{}
}
memo.variant[level] = n
}
return n
return memo.variantOf(s, c, levels[at])
}
func (t *table) selector(tail []string) (sel string, rest []string, err error) {