diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2019-11-15 15:25:56 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2019-11-15 15:25:56 +0800 |
commit | 6de8c401f4345863e0800a7262ca66c49b0a281c (patch) | |
tree | a911a7813fe5aacec89c3cca9c8b79346b6ab219 /server-beta/src/searcher/eachRef.lua | |
parent | 932064c8d94e3eea98dd8fce046286f561d72ec5 (diff) | |
download | lua-language-server-6de8c401f4345863e0800a7262ca66c49b0a281c.zip |
直接用 special 就行了,不再递归分析特殊API
Diffstat (limited to 'server-beta/src/searcher/eachRef.lua')
-rw-r--r-- | server-beta/src/searcher/eachRef.lua | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/server-beta/src/searcher/eachRef.lua b/server-beta/src/searcher/eachRef.lua index 1c607fec..a7a86739 100644 --- a/server-beta/src/searcher/eachRef.lua +++ b/server-beta/src/searcher/eachRef.lua @@ -67,7 +67,7 @@ local function ofReturn(rtn, index, callback) end local function ofSpecialCall(call, func, index, callback) - local name = searcher.getSpecialName(func) + local name = func.special if name == 'setmetatable' then if index == 1 then local args = call.args @@ -170,7 +170,7 @@ local function asValue(source, callback) if args[2] == t then local call = args.parent local func = call.node - if searcher.getSpecialName(func) == 'setmetatable' then + if func.special == 'setmetatable' then searcher.eachRef(args[1], callback) end end @@ -204,7 +204,7 @@ local function asArg(source, callback) if parent.type == 'callargs' then local call = parent.parent local func = call.node - local name = searcher.getSpecialName(func) + local name = func.special if name == 'setmetatable' then if parent[1] == source then if parent[2] then |