From d2328cf547e6bac9c87cf9bf61709380fe950496 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=80=E8=90=8C=E5=B0=8F=E6=B1=90?= Date: Thu, 22 Oct 2020 17:36:25 +0800 Subject: =?UTF-8?q?=E4=BF=AE=E6=AD=A3=E4=B8=80=E5=A4=84=E6=80=A7=E8=83=BD?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- script-beta/parser/guide.lua | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'script-beta/parser/guide.lua') diff --git a/script-beta/parser/guide.lua b/script-beta/parser/guide.lua index ef4f768c..309bc565 100644 --- a/script-beta/parser/guide.lua +++ b/script-beta/parser/guide.lua @@ -1548,6 +1548,7 @@ function m.checkSameSimpleInCallInSameFile(status, func, args, index) local newStatus = m.status(status) m.searchRefs(newStatus, func, 'def') local results = {} + local mark = {} for _, def in ipairs(newStatus.results) do local value = m.getObjectValue(def) or def if value.type == 'function' then @@ -1555,7 +1556,8 @@ function m.checkSameSimpleInCallInSameFile(status, func, args, index) if returns then for _, ret in ipairs(returns) do local exp = ret[index] - if exp then + if exp and not mark[exp] then + mark[exp] = true results[#results+1] = exp end end @@ -1566,9 +1568,6 @@ function m.checkSameSimpleInCallInSameFile(status, func, args, index) end function m.checkSameSimpleInCall(status, ref, start, queue, mode) - if status.simple then - return - end local func, args, index = m.getCallValue(ref) if not func then return -- cgit v1.2.3