1
0
Fork 0
mirror of https://github.com/Reuh/anselme.git synced 2025-10-27 08:39:30 +00:00

[language] error on undefined key in struct and table

This commit is contained in:
Étienne Fildadut 2024-01-16 14:33:47 +01:00
parent 78f3c6448e
commit 5733b9f74b
2 changed files with 1 additions and 5 deletions

View file

@ -113,7 +113,7 @@ Struct = ast.abstract.Runtime {
if v ~= nil then
return v
else
return Nil:new()
error(("key %q is undefined in %s"):format(key:format(), self.type), 0)
end
end,
get_strict = function(self, key)

View file

@ -25,10 +25,6 @@ Issue: dispatch is decided before evaluating default values.
Multiline string and comments?
---
Error on undefined struct/table key? I copied the Lua behavior but maybe not useful here.
# Can be done later
Translation.