refactoring

This commit is contained in:
Manuel Simon Hirsig
2016-08-23 08:14:22 +02:00
parent c2f7311349
commit 99ba3e7fdc
15 changed files with 51 additions and 41 deletions
+2 -2
View File
@@ -42,7 +42,7 @@ do
function public.modifier(f)
local function apply(_, value) return f(value) end
return setmetatable(t, {
__index=apply, __call=apply, __add=apply, __sub=apply, __mul=apply, __div=apply, __pow=apply, __concat=apply, __lt=apply, __le=apply,
__index=apply, __call=apply, __add=apply, __sub=apply, __mul=apply, __div=apply, __pow=apply, __concat=apply,
__newindex=function(_, _, value) return f(value) end, __unm=function(self) return self end,
})
end
@@ -133,7 +133,7 @@ tab_info = t
do
local data = -list :search_tab 'Search' :post_tab 'Post' :auctions_tab 'Auctions' :bids_tab 'Bids'
for i=1,7,2 do
local tab = perm<-object :name(data[i + 1]);
local tab = perm/-object :name(data[i + 1]);
local env = (function() module(data[i]) return _m end)()
function env.mutator.OPEN(f) tab.OPEN = f end
function env.mutator.CLOSE(f) tab.CLOSE = f end