summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--script/core/noder.lua3
-rw-r--r--script/core/searcher.lua2
-rw-r--r--script/vm/getDocs.lua6
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