aboutsummaryrefslogtreecommitdiff
path: root/nomsu.lua
diff options
context:
space:
mode:
authorBruce Hill <bitbucket@bruce-hill.com>2018-06-14 23:25:05 -0700
committerBruce Hill <bitbucket@bruce-hill.com>2018-06-14 23:25:34 -0700
commitb12744d831c4158671fc22401590eaac00f7c141 (patch)
tree203b80de68d89c7333172337f8def46ba11294d3 /nomsu.lua
parent49f1eb3d08caf7605046373b7b3a001f28aa8aab (diff)
Some cleanup and fixes. Simplifying a lot of code, and extending the
flexibility of scoping. Redesigned Object system too.
Diffstat (limited to 'nomsu.lua')
-rw-r--r--nomsu.lua10
1 files changed, 10 insertions, 0 deletions
diff --git a/nomsu.lua b/nomsu.lua
index 4d06969..2482e46 100644
--- a/nomsu.lua
+++ b/nomsu.lua
@@ -1305,6 +1305,16 @@ do
self.environment.LOADED = { }
self.environment.AST = AST
self.environment._ENV = self.environment
+ setmetatable(self.environment, {
+ __index = function(self, k)
+ do
+ local _self = rawget(self, "self")
+ if _self then
+ return _self[k]
+ end
+ end
+ end
+ })
return self:initialize_core()
end,
__base = _base_0,