summaryrefslogtreecommitdiff
path: root/server-beta/src/core/getmethod.lua
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2019-10-17 21:03:43 +0800
committer最萌小汐 <sumneko@hotmail.com>2019-10-17 21:03:43 +0800
commit860979b175b3c9092e6d1a5058c523fd46e15696 (patch)
tree8fdf3a832c3b555adcf74f31a29fdf61ff80d77b /server-beta/src/core/getmethod.lua
parentc8175c13c19cb6be4d2690d0a8fde6f04210ba51 (diff)
downloadlua-language-server-860979b175b3c9092e6d1a5058c523fd46e15696.zip
暂存
Diffstat (limited to 'server-beta/src/core/getmethod.lua')
-rw-r--r--server-beta/src/core/getmethod.lua48
1 files changed, 0 insertions, 48 deletions
diff --git a/server-beta/src/core/getmethod.lua b/server-beta/src/core/getmethod.lua
deleted file mode 100644
index c0b3e517..00000000
--- a/server-beta/src/core/getmethod.lua
+++ /dev/null
@@ -1,48 +0,0 @@
-local guide = require 'parser.guide'
-local checkSMT = require 'core.setmetatable'
-
-local m = {}
-
-function m:field(source, key, callback)
- local used = {}
- local found = false
- used[source] = true
-
- local node = source.node
- used[node] = true
-
- local myKey = guide.getKeyName(source)
- if key == myKey then
- callback(source, 'get')
- end
-
- self:eachField(node, myKey, function (src, mode)
- self:eachField(src, key, function (src, mode)
- if used[src] then
- return
- end
- used[src] = true
- if mode == 'set' then
- callback(src, mode)
- found = true
- end
- end)
- end)
-
- self:eachValue(node, function (src)
- self:eachField(src, key, function (src, mode)
- if used[src] then
- return
- end
- used[src] = true
- if mode == 'set' then
- callback(src, mode)
- found = true
- end
- end)
- end)
-
- checkSMT(self, key, used, found, callback)
-end
-
-return m