1
0
Fork 0
mirror of https://github.com/Reuh/anselme.git synced 2025-10-28 17:19:31 +00:00

Translation system first draft

This commit is contained in:
Étienne Fildadut 2023-12-23 21:09:12 +01:00
parent ffadc0dd69
commit c4636343b4
15 changed files with 215 additions and 18 deletions

View file

@ -112,7 +112,17 @@ Struct = ast.abstract.Runtime {
has = function(self, key)
local hash = key:hash()
return not not self.table[hash]
end
end,
iter = function(self)
local t, h = self.table, nil
return function()
local e
h, e = next(t, h)
if h == nil then return nil
else return e[1], e[2]
end
end
end,
}
package.loaded[...] = Struct