diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2019-10-17 15:15:24 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2019-10-17 15:15:24 +0800 |
commit | cd139ff2f2eaefab4de54ab5c39c04aa992f7b51 (patch) | |
tree | 09cad9a28dfb20bed3f13b28f21a0552496fe0fa /server-beta/src/core/local.lua | |
parent | 427ca6b4c555aa92e3d5bf82051c52d490dffd48 (diff) | |
download | lua-language-server-cd139ff2f2eaefab4de54ab5c39c04aa992f7b51.zip |
支持实例查找方法的引用
Diffstat (limited to 'server-beta/src/core/local.lua')
-rw-r--r-- | server-beta/src/core/local.lua | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/server-beta/src/core/local.lua b/server-beta/src/core/local.lua index 44e14596..eb0c8900 100644 --- a/server-beta/src/core/local.lua +++ b/server-beta/src/core/local.lua @@ -107,6 +107,14 @@ function m:value(source, callback) local ref = refs[i] if ref.type == 'setlocal' then self:eachValue(ref.value, callback) + elseif ref.type == 'getlocal' then + local parent = ref.parent + if parent.type == 'setmethod' then + local func = parent.value + if func and func.locals then + callback(func.locals[1]) + end + end end end end |