summaryrefslogtreecommitdiff
path: root/server-beta/src/core/getmethod.lua
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2019-10-17 19:11:56 +0800
committer最萌小汐 <sumneko@hotmail.com>2019-10-17 19:11:56 +0800
commit9cfe34795e2cb31b7b1e7f30cf9988ae360857c7 (patch)
treecfece48ce3b7eb372eced4f06e375f6f8ccbab38 /server-beta/src/core/getmethod.lua
parentcd139ff2f2eaefab4de54ab5c39c04aa992f7b51 (diff)
downloadlua-language-server-9cfe34795e2cb31b7b1e7f30cf9988ae360857c7.zip
整理代码
Diffstat (limited to 'server-beta/src/core/getmethod.lua')
-rw-r--r--server-beta/src/core/getmethod.lua22
1 files changed, 12 insertions, 10 deletions
diff --git a/server-beta/src/core/getmethod.lua b/server-beta/src/core/getmethod.lua
index b743d384..c0b3e517 100644
--- a/server-beta/src/core/getmethod.lua
+++ b/server-beta/src/core/getmethod.lua
@@ -13,18 +13,20 @@ function m:field(source, key, callback)
local myKey = guide.getKeyName(source)
if key == myKey then
- callback(source.method, 'get')
+ callback(source, 'get')
end
- self:eachField(node, key, function (src, mode)
- if used[src] then
- return
- end
- used[src] = true
- if mode == 'set' then
- callback(src, mode)
- found = true
- 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)