summaryrefslogtreecommitdiff
path: root/server-beta/src/core/local.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/local.lua
parentcd139ff2f2eaefab4de54ab5c39c04aa992f7b51 (diff)
downloadlua-language-server-9cfe34795e2cb31b7b1e7f30cf9988ae360857c7.zip
整理代码
Diffstat (limited to 'server-beta/src/core/local.lua')
-rw-r--r--server-beta/src/core/local.lua12
1 files changed, 6 insertions, 6 deletions
diff --git a/server-beta/src/core/local.lua b/server-beta/src/core/local.lua
index eb0c8900..6c9488f4 100644
--- a/server-beta/src/core/local.lua
+++ b/server-beta/src/core/local.lua
@@ -53,12 +53,12 @@ function m:field(source, key, callback)
used[ref] = true
local parent = ref.parent
if key == guide.getKeyName(parent) then
- self:childRef(parent, function (src, mode)
- callback(src, mode)
- if mode == 'set' then
- found = true
- end
- end)
+ if parent.type:sub(1, 3) == 'set' then
+ callback(parent, 'set')
+ found = true
+ else
+ callback(parent, 'get')
+ end
end
elseif ref.type == 'getglobal' then
used[ref] = true