Make great documentation goal 1.2, and plan the README's reorganisation and the nested-template gaps #33
@@ -1239,9 +1239,8 @@ the Development section below, and who ships a register the four above then draw
|
||||
- **`misc` is what every locale shares.** A category whose facts differ by country
|
||||
belongs in that country's locale, read from the register that country's own
|
||||
records use; `misc` takes only sources that are international. NHTSA vPIC and
|
||||
Mobility Sweden's registrations are national, so they build `en_US.car` and
|
||||
`sv_SE.car`; `misc.car` waits for an international source rather than take one
|
||||
of theirs.
|
||||
Mobility Sweden's registrations are national, so they are for `en_US.car` and
|
||||
`sv_SE.car`, and `misc.car` waits for an international source.
|
||||
- **A register's canonical spelling loses to the one its domain writes.** Where a
|
||||
source offers several spellings of one fact, the shipped one is what records in
|
||||
that domain carry. `misc.timezone` reads `zone.tab` and not the `zone1970.tab`
|
||||
|
||||
+2
-2
@@ -4,8 +4,8 @@
|
||||
# docker compose run --rm vet
|
||||
# docker compose run --rm build
|
||||
#
|
||||
# The full gate — vet, formatting and tests — is `docker build .`, which is what
|
||||
# CI runs.
|
||||
# The full gate — vet, formatting, cyclomatic complexity and tests — is
|
||||
# `docker build .`, which is what CI runs.
|
||||
#
|
||||
# Build caches persist in the `gocache` volume, so re-runs are fast and the
|
||||
# host tree stays clean. Commands that rewrite source (fmt, tidy) keep your
|
||||
|
||||
+4
-3
@@ -60,8 +60,8 @@ func eachToken(format string, fn func(ftoken) error) error {
|
||||
// builtin is a format-string function invoked as {name(args)}. It receives the
|
||||
// session (its rng, and the {seq()} counters), the output emitted so far in the
|
||||
// current expansion (for derivations such as a checksum over preceding digits), and
|
||||
// the values of the operands it named (only calc names any). All must stay pure
|
||||
// over (rng, emitted, args) so seeded output is reproducible; seq advances
|
||||
// the values of the operands it named (calc and the transforms name them). All must
|
||||
// stay pure over (rng, emitted, args) so seeded output is reproducible; seq advances
|
||||
// per-session counter state, which is itself deterministic. arity is the exact arg
|
||||
// count, or -1 for variadic (then check does all the validation).
|
||||
type builtin struct {
|
||||
@@ -121,7 +121,8 @@ func plural(n int) string {
|
||||
|
||||
// checkFunc validates a function token at compile time: well-formed, naming a
|
||||
// known builtin, with the arg count that builtin takes and args its check accepts.
|
||||
// fields is passed through for the one builtin (calc) that validates against them.
|
||||
// fields is passed through for the builtins (calc, the transforms) that validate
|
||||
// against them.
|
||||
func checkFunc(body string, fields map[string]node) error {
|
||||
name, args, ok := funcCall(body)
|
||||
if !ok {
|
||||
|
||||
Reference in New Issue
Block a user