summaryrefslogtreecommitdiff
path: root/server-beta
diff options
context:
space:
mode:
Diffstat (limited to 'server-beta')
-rw-r--r--server-beta/src/searcher/eachRef.lua28
1 files changed, 26 insertions, 2 deletions
diff --git a/server-beta/src/searcher/eachRef.lua b/server-beta/src/searcher/eachRef.lua
index 2d9d64b6..10f43765 100644
--- a/server-beta/src/searcher/eachRef.lua
+++ b/server-beta/src/searcher/eachRef.lua
@@ -90,11 +90,35 @@ local function asValue(searcher, source, callback)
end
end
+local function getCallRecvs(call)
+ local parent = call.parent
+ if parent.type ~= 'select' then
+ return
+ end
+end
+
--- 自己作为函数的参数
local function asArg(searcher, source, callback)
local parent = source.parent
- if parent == 'callargs' then
- print(parent)
+ if parent.type == 'callargs' then
+ local call = parent.parent
+ local func = call.node
+ local name = searcher:getSpecialName(func)
+ if name == 'setmetatable' then
+ if parent[1] == source then
+ if parent[2] then
+ searcher:eachField(parent[2], function (info)
+ if info.key == 's|__index' then
+ info.searcher:eachRef(info.source, callback)
+ if info.value then
+ info.searcher:eachRef(info.value, callback)
+ end
+ end
+ end)
+ end
+ end
+ getCallRecvs(call)
+ end
end
end