summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--script/core/collector.lua25
-rw-r--r--script/core/searcher.lua8
2 files changed, 2 insertions, 31 deletions
diff --git a/script/core/collector.lua b/script/core/collector.lua
index 43e584d5..57ae3adc 100644
--- a/script/core/collector.lua
+++ b/script/core/collector.lua
@@ -160,29 +160,4 @@ function m.each(uri, name)
return eachOfFallback(nameCollect, scope.fallback)
end
---- 迭代某个名字的引用订阅
----@param uri uri
----@param name string
-function m.eachRef(uri, name)
- local nameCollect = collect[name]
- if not nameCollect then
- return DUMMY_FUNCTION
- end
- ---@type scope
- if scope.getFolder(uri) then
- return m.each(uri, name)
- end
-
- local curi, value
- local function getNext()
- curi, value = next(nameCollect, curi)
- if not curi then
- return nil, nil
- end
-
- return value, curi
- end
- return getNext
-end
-
return m
diff --git a/script/core/searcher.lua b/script/core/searcher.lua
index 10f1d3db..5beaf26b 100644
--- a/script/core/searcher.lua
+++ b/script/core/searcher.lua
@@ -24,10 +24,8 @@ local sfind = string.find
local sformat = string.format
local getUri = guide.getUri
-local getRoot = guide.getRoot
local ceach = collector.each
-local ceachref = collector.each
local getState = files.getState
@@ -44,8 +42,6 @@ local eachBackward = noder.eachBackward
local eachExtend = noder.eachExtend
local eachSource = noder.eachSource
local compileAllNodes = noder.compileAllNodes
-local compilePartNoders = noder.compilePartNodes
-local isGlobalID = noder.isGlobalID
local hasCall = noder.hasCall
local SPLIT_CHAR = noder.SPLIT_CHAR
@@ -845,7 +841,7 @@ function m.searchRefsByID(status, suri, expect, mode)
::CONTINUE::
end
else
- for _, guri in ceachref(suri, id) do
+ for _, guri in ceach(suri, id) do
if crossed[guri] then
goto CONTINUE
end
@@ -881,7 +877,7 @@ function m.searchRefsByID(status, suri, expect, mode)
::CONTINUE::
end
else
- for _, guri in ceachref(suri, id) do
+ for _, guri in ceach(suri, id) do
if crossed[guri] then
goto CONTINUE
end