Initial commit

This commit is contained in:
rxi
2019-12-28 11:17:56 +00:00
commit d8c4bfa6ba
486 changed files with 146040 additions and 0 deletions
+26
View File
@@ -0,0 +1,26 @@
local strict = {}
strict.defined = {}
-- used to define a global variable
function global(t)
for k, v in pairs(t) do
strict.defined[k] = true
rawset(_G, k, v)
end
end
function strict.__newindex(t, k, v)
error("cannot set undefined variable: " .. k, 2)
end
function strict.__index(t, k)
if not strict.defined[k] then
error("cannot get undefined variable: " .. k, 2)
end
end
setmetatable(_G, strict)