mirror of
https://github.com/Reuh/anselme.git
synced 2025-10-28 09:09:31 +00:00
[language] error on undefined key in struct and table
This commit is contained in:
parent
78f3c6448e
commit
5733b9f74b
2 changed files with 1 additions and 5 deletions
|
|
@ -113,7 +113,7 @@ Struct = ast.abstract.Runtime {
|
||||||
if v ~= nil then
|
if v ~= nil then
|
||||||
return v
|
return v
|
||||||
else
|
else
|
||||||
return Nil:new()
|
error(("key %q is undefined in %s"):format(key:format(), self.type), 0)
|
||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
get_strict = function(self, key)
|
get_strict = function(self, key)
|
||||||
|
|
|
||||||
4
ideas.md
4
ideas.md
|
|
@ -25,10 +25,6 @@ Issue: dispatch is decided before evaluating default values.
|
||||||
|
|
||||||
Multiline string and comments?
|
Multiline string and comments?
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
Error on undefined struct/table key? I copied the Lua behavior but maybe not useful here.
|
|
||||||
|
|
||||||
# Can be done later
|
# Can be done later
|
||||||
|
|
||||||
Translation.
|
Translation.
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue