From 614dda013272a56d5370b387df69622a168090a4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=80=E8=90=8C=E5=B0=8F=E6=B1=90?= Date: Wed, 22 Jul 2020 19:57:12 +0800 Subject: =?UTF-8?q?=E6=94=AF=E6=8C=81require=E7=A9=BF=E9=80=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- script-beta/parser/guide.lua | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'script-beta/parser') 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 -- cgit v1.2.3