diff options
Diffstat (limited to 'script/vm')
-rw-r--r-- | script/vm/getDocs.lua | 6 | ||||
-rw-r--r-- | script/vm/getGlobals.lua | 6 |
2 files changed, 6 insertions, 6 deletions
diff --git a/script/vm/getDocs.lua b/script/vm/getDocs.lua index 544c1f60..f179c684 100644 --- a/script/vm/getDocs.lua +++ b/script/vm/getDocs.lua @@ -10,14 +10,14 @@ local noder = require 'core.noder' ---获取class与alias ---@param name? string ---@return parser.guide.object[] -function vm.getDocDefines(name) +function vm.getDocDefines(uri, name) local cache = vm.getCache 'getDocDefines' if cache[name] then return cache[name] end local results = {} if name == '*' then - for noders in collector.each('def:dn:') do + for noders in collector.each(uri, 'def:dn:') do for id in noder.eachID(noders) do if id:sub(1, 3) == 'dn:' and not id:find(noder.SPLIT_CHAR) then @@ -31,7 +31,7 @@ function vm.getDocDefines(name) end else local id = 'dn:' .. name - for noders in collector.each('def:' .. id) do + for noders in collector.each(uri, 'def:' .. id) do for source in noder.eachSource(noders, id) do if source.type == 'doc.class.name' or source.type == 'doc.alias.name' then diff --git a/script/vm/getGlobals.lua b/script/vm/getGlobals.lua index 92fd1c8e..f6646559 100644 --- a/script/vm/getGlobals.lua +++ b/script/vm/getGlobals.lua @@ -14,7 +14,7 @@ function vm.hasGlobalSets(name) return collector.has(id) end -function vm.getGlobalSets(name) +function vm.getGlobalSets(uri, name) local cache = vm.getCache 'getGlobalSets' if cache[name] then return cache[name] @@ -22,7 +22,7 @@ function vm.getGlobalSets(name) local results = {} cache[name] = results if name == '*' then - for noders in collector.each('def:g:') do + for noders in collector.each(uri, 'def:g:') do for id in noder.eachID(noders) do if id:sub(1, 2) == 'g:' and not id:find(noder.SPLIT_CHAR) then @@ -41,7 +41,7 @@ function vm.getGlobalSets(name) else id = ('g:%s'):format(noder.STRING_CHAR, name) end - for noders in collector.each('def:' .. id) do + for noders in collector.each(uri, 'def:' .. id) do for source in noder.eachSource(noders, id) do if guide.isSet(source) then results[#results+1] = source |