summaryrefslogtreecommitdiff
path: root/script/core
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2021-05-15 17:44:53 +0800
committer最萌小汐 <sumneko@hotmail.com>2021-05-15 17:44:53 +0800
commit43fdd200c89cc4356e50ccf4bd4f4a94bc1ae701 (patch)
tree29c7a02ceb25ffb2ce4c0fe74fc4f4b32d9748d1 /script/core
parent91c8da46833320274f874250d21b71da05cf9689 (diff)
downloadlua-language-server-43fdd200c89cc4356e50ccf4bd4f4a94bc1ae701.zip
update
Diffstat (limited to 'script/core')
-rw-r--r--script/core/linker.lua6
-rw-r--r--script/core/searcher.lua3
2 files changed, 5 insertions, 4 deletions
diff --git a/script/core/linker.lua b/script/core/linker.lua
index b1dc8476..e1be2323 100644
--- a/script/core/linker.lua
+++ b/script/core/linker.lua
@@ -107,7 +107,7 @@ local function getKey(source)
elseif source.type == '...' then
return source.start, nil
elseif source.type == 'select' then
- return ('%d%s%d'):format(source.start, RETURN_INDEX, source.index)
+ return ('%d%s%d'):format(source.start, RETURN_INDEX, source.sindex)
elseif source.type == 'call' then
local node = source.node
if node.special == 'rawget'
@@ -522,14 +522,14 @@ function m.compileLink(source)
local callXID = ('%s%s%s'):format(
nodeID,
RETURN_INDEX,
- source.index
+ source.sindex
)
pushForward(id, callXID)
pushBackward(callXID, id)
getLink(id).call = call
if node.special == 'pcall'
or node.special == 'xpcall' then
- local index = source.index - 1
+ local index = source.sindex - 1
if index <= 0 then
return
end
diff --git a/script/core/searcher.lua b/script/core/searcher.lua
index 4af50da6..a2e673ef 100644
--- a/script/core/searcher.lua
+++ b/script/core/searcher.lua
@@ -60,7 +60,8 @@ function m.pushResult(status, mode, source)
results[#results+1] = source
end
end
- if parent.type == 'return' then
+ if parent.type == 'return'
+ or parent.type == 'callargs' then
if linker.getID(source) ~= status.id then
results[#results+1] = source
end