From d587d5c381c9cf8c59fb6aa0caf26fc7288ed550 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=80=E8=90=8C=E5=B0=8F=E6=B1=90?= Date: Fri, 11 Jun 2021 19:32:31 +0800 Subject: fix --- script/core/noder.lua | 3 +++ script/core/searcher.lua | 2 +- script/vm/getDocs.lua | 6 ++++-- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/script/core/noder.lua b/script/core/noder.lua index 1e62ed2e..d68cc3ba 100644 --- a/script/core/noder.lua +++ b/script/core/noder.lua @@ -528,6 +528,9 @@ function m.compileNode(noders, source) end end if source.type == 'call' then + if not id then + return + end local node = source.node local nodeID = getID(node) if not nodeID then diff --git a/script/core/searcher.lua b/script/core/searcher.lua index eaef5102..0d59932d 100644 --- a/script/core/searcher.lua +++ b/script/core/searcher.lua @@ -522,7 +522,7 @@ function m.searchRefsByID(status, uri, expect, mode) local stepCount = 0 function searchStep(id, field) stepCount = stepCount + 1 - --status.count = status.count + 1 + status.count = status.count + 1 if stepCount > 1000 or status.count > 10000 then if TEST then diff --git a/script/vm/getDocs.lua b/script/vm/getDocs.lua index bc7df626..0f12c763 100644 --- a/script/vm/getDocs.lua +++ b/script/vm/getDocs.lua @@ -25,8 +25,10 @@ end function vm.getDocDefines(name) local results = {} for uri in files.eachFile() do - local ast = files.getState(uri) - getDocDefinesInAst(results, ast.ast, name) + local state = files.getState(uri) + if state then + getDocDefinesInAst(results, state.ast, name) + end end return results end -- cgit v1.2.3