summaryrefslogtreecommitdiff
path: root/script/core/noder.lua
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2021-06-30 17:55:25 +0800
committer最萌小汐 <sumneko@hotmail.com>2021-06-30 17:55:25 +0800
commitb7caff0e2668dcad90d4e91c61736202000bc243 (patch)
treed15c2ea4119446fb212644a49f835a9361a383ba /script/core/noder.lua
parent0922958099d34a2512b238dd5bd66fd96335fe80 (diff)
downloadlua-language-server-b7caff0e2668dcad90d4e91c61736202000bc243.zip
resolve #573
Diffstat (limited to 'script/core/noder.lua')
-rw-r--r--script/core/noder.lua8
1 files changed, 8 insertions, 0 deletions
diff --git a/script/core/noder.lua b/script/core/noder.lua
index 3cfbc84d..b8690ba4 100644
--- a/script/core/noder.lua
+++ b/script/core/noder.lua
@@ -241,6 +241,14 @@ local function getKey(source)
end
local function getNodeKey(source)
+ if source.type == 'getlocal'
+ or source.type == 'setlocal' then
+ source = source.node
+ end
+ local methodNode = getMethodNode(source)
+ if methodNode then
+ return getNodeKey(methodNode)
+ end
local key, node = getKey(source)
if guide.isGlobal(source) then
return 'g:' .. key, nil