summaryrefslogtreecommitdiff
path: root/script-beta/parser
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2020-08-12 17:53:35 +0800
committer最萌小汐 <sumneko@hotmail.com>2020-08-12 17:53:35 +0800
commit14dea676e24e3d2ef5ddba0ede98c348d2701c83 (patch)
treee80c37887efe61adf6251f223233d8620cfb7242 /script-beta/parser
parent75c8974c57b509bf9342e1d03a594ede2380e46c (diff)
downloadlua-language-server-14dea676e24e3d2ef5ddba0ede98c348d2701c83.zip
暂存
Diffstat (limited to 'script-beta/parser')
-rw-r--r--script-beta/parser/guide.lua31
1 files changed, 21 insertions, 10 deletions
diff --git a/script-beta/parser/guide.lua b/script-beta/parser/guide.lua
index 88c81414..2a930c79 100644
--- a/script-beta/parser/guide.lua
+++ b/script-beta/parser/guide.lua
@@ -1217,16 +1217,27 @@ function m.checkSameSimpleInCall(status, ref, start, queue, mode)
if not func then
return
end
- local objs = status.interface.call(func, args, index, mode)
- if objs then
- for _, obj in ipairs(objs) do
- queue[#queue+1] = {
- obj = obj,
- start = start,
- force = true,
- call = true,
- }
- end
+ local objs = status.interface.call(func, args, index)
+ if not objs then
+ return
+ end
+ local newStatus = m.status(status)
+ for _, obj in ipairs(objs) do
+ m.searchRefs(newStatus, obj, 'ref')
+ queue[#queue+1] = {
+ obj = obj,
+ start = start,
+ force = true,
+ call = true,
+ }
+ end
+ for _, obj in ipairs(newStatus.results) do
+ queue[#queue+1] = {
+ obj = obj,
+ start = start,
+ force = true,
+ call = true,
+ }
end
end