summaryrefslogtreecommitdiff
path: root/script-beta/vm/eachDef.lua
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2020-01-09 17:12:54 +0800
committer最萌小汐 <sumneko@hotmail.com>2020-01-09 17:12:54 +0800
commit73244793bda51290b1028ab1f764867f33cabbc5 (patch)
tree5592fbf14f60016270dcca75190508ff89a3213f /script-beta/vm/eachDef.lua
parenta6148c4a1488525c9ddc60c3769479642f2b3c9d (diff)
downloadlua-language-server-73244793bda51290b1028ab1f764867f33cabbc5.zip
整理代码
Diffstat (limited to 'script-beta/vm/eachDef.lua')
-rw-r--r--script-beta/vm/eachDef.lua32
1 files changed, 0 insertions, 32 deletions
diff --git a/script-beta/vm/eachDef.lua b/script-beta/vm/eachDef.lua
index 61da11d9..87cbef70 100644
--- a/script-beta/vm/eachDef.lua
+++ b/script-beta/vm/eachDef.lua
@@ -66,34 +66,6 @@ local function ofTableField(source, callback)
callback(source)
end
-local function checkMetaRecv(source, callback)
- if not source or source.type ~= 'select' then
- return
- end
- if source.index ~= 1 then
- return
- end
- local call = source.vararg
- if not call or call.type ~= 'call' then
- return
- end
- local special = vm.getSpecial(call.node)
- if special ~= 'setmetatable' then
- return
- end
- vm.eachFieldInTable(call.args[1])
- local mt = call.args[2]
- if mt then
- vm.eachField(mt, function (src)
- if vm.getKeyName(src) == 's|__index' then
- if src.value then
- vm.eachField(src.value, callback)
- end
- end
- end)
- end
-end
-
local function ofField(source, callback)
local parent = source.parent
local key = vm.getKeyName(source)
@@ -109,10 +81,6 @@ local function ofField(source, callback)
else
local node = parent.node
vm.eachField(node, checkKey)
- vm.eachDef(node, function (src)
- vm.eachFieldInTable(src.value, checkKey)
- checkMetaRecv(src.value, checkKey)
- end)
end
end