diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2020-10-21 11:10:51 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2020-10-21 11:10:51 +0800 |
commit | 27a6a7041f01d5f53693901ed9efd898bac31dbf (patch) | |
tree | 9e571aa86b834bf107c04ec93bd999f6ef932855 /script-beta | |
parent | dcf14b923129c7f9417d6af70b65b5137182ea3b (diff) | |
download | lua-language-server-27a6a7041f01d5f53693901ed9efd898bac31dbf.zip |
标注类型进行二次搜索
Diffstat (limited to 'script-beta')
-rw-r--r-- | script-beta/parser/guide.lua | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/script-beta/parser/guide.lua b/script-beta/parser/guide.lua index 4a6ce1cb..ff20ed36 100644 --- a/script-beta/parser/guide.lua +++ b/script-beta/parser/guide.lua @@ -1408,19 +1408,22 @@ function m.checkSameSimpleByBindDocs(status, obj, start, queue, mode) end end local mark = {} + local newStatus = m.status(status) for _, res in ipairs(results) do - local ref = m.getDocState(res) + local source = m.getDocState(res) + local ref = source.bind if not mark[ref] then mark[ref] = true - if ref.bind then - queue[#queue+1] = { - obj = ref.bind, - start = start, - force = true, - } - end + m.searchRefs(newStatus, ref, mode) end end + for _, res in ipairs(newStatus.results) do + queue[#queue+1] = { + obj = res, + start = start, + force = true, + } + end end function m.checkSameSimpleInArg1OfSetMetaTable(status, obj, start, queue) |