diff options
| author | Bruce Hill <bitbucket@bruce-hill.com> | 2017-10-09 03:51:53 -0700 |
|---|---|---|
| committer | Bruce Hill <bitbucket@bruce-hill.com> | 2017-10-09 03:51:53 -0700 |
| commit | ca130f36a5295fb38445de7207459baa8070338f (patch) | |
| tree | 727d6c17f15a9cedda23c34513ca620523802343 | |
| parent | e8c820b8f566297ef2330260c2d092012c3d2622 (diff) | |
Added chain for loaded files.
| -rw-r--r-- | nomsu.lua | 4 | ||||
| -rwxr-xr-x | nomsu.moon | 2 |
2 files changed, 4 insertions, 2 deletions
@@ -802,7 +802,9 @@ do self.repr = function(self, ...) return repr(...) end - self.loaded_files = { } + self.loaded_files = setmetatable({ }, { + __index = parent and parent.loaded_files + }) if not parent then return self:initialize_core() end @@ -189,7 +189,7 @@ class NomsuCompiler @debug = false @utils = utils @repr = (...)=> repr(...) - @loaded_files = {} + @loaded_files = setmetatable({}, {__index:parent and parent.loaded_files}) if not parent @initialize_core! |
