diff --git a/libs/green_t.lua b/libs/green_t.lua index d7b3fb6..80f6cfe 100644 --- a/libs/green_t.lua +++ b/libs/green_t.lua @@ -37,11 +37,12 @@ pool, pool_size, overflow_pool, tmp = {}, 0, setmetatable({}, {__mode='k'}), {} public.empty = setmetatable({}, {__metatable=false, __newindex=nop}) +--select(1, 2, 3, END, kek()) -- TODO do local f = loadstring([[ local setmetatable, setn = setmetatable, table.setn return function(t) - ]]..wipe_chunk..'return t end') -- like with a cloth or something + ]]..wipe_chunk..'return t end') setfenv(f, M) public.wipe = f() end diff --git a/libs/module.lua b/libs/module.lua index bd21813..35201d1 100644 --- a/libs/module.lua +++ b/libs/module.lua @@ -26,10 +26,10 @@ local function prototype() local eq = const(true) return setmetatable({__metatable=false, __eq=eq}, {__metatable=false, __eq=eq, __call=function(self, t) return setmetatable(t, self) end}) end -local state = {} - local INTERFACE, ENVIRONMENT, DECLARATOR = prototype(), prototype(), prototype() +local state = {} + function INTERFACE:__index(key) self=state[self] if self.access[key] == PUBLIC then local getter = self[INDEX][key] @@ -112,7 +112,7 @@ function module(name) access = {inspect=PRIVATE, _=PRIVATE, error=PRIVATE, nop=PRIVATE, _G=PRIVATE, M=PRIVATE, I=PRIVATE, public=PRIVATE, private=PRIVATE}, [CALL] = {inspect=inspect, import=function(interface) import(self, interface) end, error=error, nop=nop}, [INDEX] = {_G=const(_G), M=const(env), I=const(interface), public=function() return declarator.public end, private=function() return declarator.private end}, - [NEWINDEX] = {_=nop}, + [NEWINDEX] = {inspect=inspect, _=nop}, declarator = declarator, default_access = PRIVATE, } diff --git a/tabs/search/frame.lua b/tabs/search/frame.lua index 3d6257f..464fa4c 100644 --- a/tabs/search/frame.lua +++ b/tabs/search/frame.lua @@ -517,7 +517,7 @@ function create_frames() if filter_util.filters[text] and filter_util.filters[text].input_type ~= '' then local _, _, suggestions = filter_util.parse_filter_string(text..'/') filter_parameter_input:SetNumeric(filter_util.filters[text].input_type == 'number') - filter_parameter_input.complete = completion.complete(function() return suggestions or O end) + filter_parameter_input.complete = completion.complete(function() return suggestions or empty end) filter_parameter_input:Show() else filter_parameter_input:Hide()