@ call, args
This commit is contained in:
parent
5e362e71b9
commit
81eb0cd61c
|
@ -65,7 +65,8 @@ end
|
|||
|
||||
function callpush(v, ...)
|
||||
stead.call_top = stead.call_top + 1;
|
||||
stead.cctx[stead.call_top] = { txt = nil, self = v, args = arg };
|
||||
stead.cctx[stead.call_top] = { txt = nil, self = v };
|
||||
args = arg
|
||||
end
|
||||
|
||||
function callpop()
|
||||
|
@ -83,13 +84,6 @@ function self(v)
|
|||
return cctx().self;
|
||||
end
|
||||
|
||||
function args(v)
|
||||
if v ~= nil then
|
||||
cctx().args = v;
|
||||
end
|
||||
return cctx().args;
|
||||
end
|
||||
|
||||
function pclr()
|
||||
cctx().txt = nil
|
||||
end
|
||||
|
@ -652,6 +646,17 @@ function call(v, n, ...)
|
|||
return nil,nil;
|
||||
end
|
||||
if type(v[n]) == 'string' then
|
||||
if v[n]:sub(1,1) == '@' then
|
||||
callpush(v, unpack(arg))
|
||||
local f = loadstring(v[n]:sub(2))
|
||||
local a,b = f();
|
||||
if a == nil and b == nil then
|
||||
a = pget()
|
||||
b = nil
|
||||
end
|
||||
callpop()
|
||||
return a,b
|
||||
end
|
||||
return v[n];
|
||||
end
|
||||
if type(v[n]) == 'function' then
|
||||
|
|
Reference in a new issue