feat(lang): L9 resource files - registry ... from
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>
This commit is contained in:
parent
7e7f3ab297
commit
e543525eb7
15 changed files with 46229 additions and 44690 deletions
8
changes/resources.md
Normal file
8
changes/resources.md
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
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.
|
||||
Loading…
Add table
Add a link
Reference in a new issue