From b12744d831c4158671fc22401590eaac00f7c141 Mon Sep 17 00:00:00 2001 From: Bruce Hill Date: Thu, 14 Jun 2018 23:25:05 -0700 Subject: Some cleanup and fixes. Simplifying a lot of code, and extending the flexibility of scoping. Redesigned Object system too. --- nomsu.lua | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'nomsu.lua') 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, -- cgit v1.2.3