diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2019-10-17 19:11:56 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2019-10-17 19:11:56 +0800 |
commit | 9cfe34795e2cb31b7b1e7f30cf9988ae360857c7 (patch) | |
tree | cfece48ce3b7eb372eced4f06e375f6f8ccbab38 /server-beta/src/core/local.lua | |
parent | cd139ff2f2eaefab4de54ab5c39c04aa992f7b51 (diff) | |
download | lua-language-server-9cfe34795e2cb31b7b1e7f30cf9988ae360857c7.zip |
整理代码
Diffstat (limited to 'server-beta/src/core/local.lua')
-rw-r--r-- | server-beta/src/core/local.lua | 12 |
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 |