registry NAME of RECORD [as PREFIX] from "file.lres" fills a registry from a data
file of key { field: value } entries, read at compile time with the record as its
schema: every entry is checked like a def, errors name the resource file's line,
nested records and lists of them are bare { } / [{ }] typed by their fields, and
values are expressions in the registry's module. The entries are compiled in, so
nothing parses at start-up and a build that succeeds has validated its resources.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
8 lines
554 B
Markdown
8 lines
554 B
Markdown
bump: minor
|
|
type: feature
|
|
**Resource files.** `registry Tools of Tool as TL from "data/tools.lres"` fills a registry from a
|
|
data file of `key { field: value }` entries. It is read at compile time with the registry's record as
|
|
its schema - a misspelt field, a wrong type or a repeated key is a compile error at the resource
|
|
file's line - and compiled in, so nothing parses at start-up. Nested records and lists of them are
|
|
bare `{ ... }` / `[{ ... }]`, typed by the schema; values are expressions, so an entry names another
|
|
table's entry by its constant.
|