diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2020-07-22 19:57:12 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2020-07-22 19:57:12 +0800 |
commit | 614dda013272a56d5370b387df69622a168090a4 (patch) | |
tree | cfa64882157d2a9470b2bece2af1358d49cf2737 /script-beta/parser | |
parent | 8a3e5ec178a45a68e468a504f06452308ba2f22c (diff) | |
download | lua-language-server-614dda013272a56d5370b387df69622a168090a4.zip |
支持require穿透
Diffstat (limited to 'script-beta/parser')
-rw-r--r-- | script-beta/parser/guide.lua | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/script-beta/parser/guide.lua b/script-beta/parser/guide.lua index db2aeae1..ee5bb425 100644 --- a/script-beta/parser/guide.lua +++ b/script-beta/parser/guide.lua @@ -1218,6 +1218,7 @@ function m.checkSameSimpleIncall(status, ref, start, queue) queue[#queue+1] = { obj = obj, start = start, + force = true, } end end @@ -1327,6 +1328,9 @@ function m.searchRefsAsFunctionReturn(status, obj, mode) status.results[#status.results+1] = obj -- 搜索所在函数 local currentFunc = m.getParentFunction(obj) + if currentFunc.type == 'main' then + return + end local returns = currentFunc.returns if not returns then return |