summaryrefslogtreecommitdiff
path: root/script-beta/parser/guide.lua
diff options
context:
space:
mode:
Diffstat (limited to 'script-beta/parser/guide.lua')
-rw-r--r--script-beta/parser/guide.lua10
1 files changed, 9 insertions, 1 deletions
diff --git a/script-beta/parser/guide.lua b/script-beta/parser/guide.lua
index 84878f4d..1e548b9d 100644
--- a/script-beta/parser/guide.lua
+++ b/script-beta/parser/guide.lua
@@ -1563,6 +1563,8 @@ function m.pushResult(status, mode, ref, simple)
if ref.node.special == 'rawset' then
results[#results+1] = ref
end
+ elseif ref.type == 'function' then
+ results[#results+1] = ref
elseif ref.type == 'table' then
results[#results+1] = ref
elseif ref.type == 'library' then
@@ -1621,6 +1623,8 @@ function m.pushResult(status, mode, ref, simple)
elseif ref.type == 'setglobal'
or ref.type == 'getglobal' then
results[#results+1] = ref
+ elseif ref.type == 'function' then
+ results[#results+1] = ref
elseif ref.type == 'table' then
results[#results+1] = ref
elseif ref.type == 'call' then
@@ -2501,13 +2505,17 @@ function m.inferByDef(status, obj)
if status.index > 1 then
return
end
+ local mark = {}
local newStatus = m.status(nil, status.interface)
m.searchRefs(newStatus, obj, 'def')
for _, src in ipairs(newStatus.results) do
local inferStatus = m.status(status)
m.searchInfer(inferStatus, src)
for _, infer in ipairs(inferStatus.results) do
- status.results[#status.results+1] = infer
+ if not mark[infer.source] then
+ mark[infer.source] = true
+ status.results[#status.results+1] = infer
+ end
end
end
end