feat(lang): def REGISTRY from "file.lres" - a game fills an open registry from its own file
The entries are read and checked against the registry's record as a registry ... from file is, errors at the resource file's line, and they are defs of the module that wrote the line: the registry must be open to it, and they take that module's place in the stable order. Reseed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
a09b622a1d
commit
a5f52c4581
13 changed files with 43732 additions and 43470 deletions
|
|
@ -75,9 +75,16 @@ function parse_registry() -> void {
|
|||
if from != null { res_read(v, from) }
|
||||
}
|
||||
# def REGISTRY key { field: value, ... }
|
||||
# def REGISTRY from "file.lres" - every entry of a resource file, as defs of this file's module
|
||||
function parse_def() -> void {
|
||||
pi += 1
|
||||
let reg = eat_id()
|
||||
if is_id("from") and toks[pi + 1].kind == TK_STR {
|
||||
let from = toks[pi + 1].text
|
||||
pi += 2
|
||||
res_read_into(reg, from, `def {reg} from`)
|
||||
return
|
||||
}
|
||||
let key = eat_id()
|
||||
skipnl()
|
||||
let rec = record()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue