diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2020-08-15 19:23:05 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2020-08-15 19:23:05 +0800 |
commit | 4fb4507cc87a854bbfcb3a234f4dea8f7df2f545 (patch) | |
tree | 5df7c8f2ed439c85a057a376e1606e08c63f9129 /script-beta/parser | |
parent | 910fc1dae705ce2475c165ec28e20edd9cb89d61 (diff) | |
download | lua-language-server-4fb4507cc87a854bbfcb3a234f4dea8f7df2f545.zip |
只有从 main 里面 return 出去时才继续搜索
Diffstat (limited to 'script-beta/parser')
-rw-r--r-- | script-beta/parser/guide.lua | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/script-beta/parser/guide.lua b/script-beta/parser/guide.lua index 787926a3..ab842337 100644 --- a/script-beta/parser/guide.lua +++ b/script-beta/parser/guide.lua @@ -1378,6 +1378,9 @@ function m.checkSameSimpleAsReturn(status, ref, start, queue) end -- TODO 这里的开销非常大 do return end + if ref.parent.parent.type ~= 'main' then + return + end local newStatus = m.status(status) m.searchRefsAsFunctionReturn(newStatus, ref, 'ref') for _, res in ipairs(newStatus.results) do |