attributes: a target the program does not have at all (an @Ref registry, an @Tint / @OneOf constant) is a warning and "unresolved" in the schema, not an error - a package names the game's registry without importing it; a name of another kind is still an error; reseeded
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
dacc0f7280
commit
d82dc3162f
10 changed files with 83635 additions and 82878 deletions
|
|
@ -75,9 +75,7 @@ function at_check_oneof(d: Node, f: Node, j: int) -> void {
|
|||
let names = at_arg_names(g_at_args[j])
|
||||
var i = 0
|
||||
while i < len(names) {
|
||||
if not at_const_exists(names[i]) {
|
||||
perr_at(f.file, f.line, f.col, `field {d.s}.{f.s}: @OneOf names {names[i]}, and there is no constant {names[i]}`)
|
||||
}
|
||||
if not at_const_exists(names[i]) { at_const_target(d, f, j, names[i]) }
|
||||
i += 1
|
||||
}
|
||||
}
|
||||
|
|
@ -105,3 +103,12 @@ function at_const_exists(name: pointer) -> bool {
|
|||
}
|
||||
return false
|
||||
}
|
||||
# a declaration of any kind (a record, a function, a const, a state ...) called name
|
||||
function at_decl_named(name: pointer) -> bool {
|
||||
var i = 0
|
||||
while i < len(prog) {
|
||||
if prog[i].s != null and vis_plain(prog[i].s) == name { return true }
|
||||
i += 1
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue