diff options
Diffstat (limited to 'script/core/diagnostics/unused-function.lua')
-rw-r--r-- | script/core/diagnostics/unused-function.lua | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/script/core/diagnostics/unused-function.lua b/script/core/diagnostics/unused-function.lua index 2d224e5e..41c239f9 100644 --- a/script/core/diagnostics/unused-function.lua +++ b/script/core/diagnostics/unused-function.lua @@ -1,5 +1,5 @@ local files = require 'files' -local searcher = require 'core.searcher' +local guide = require 'parser.guide' local vm = require 'vm' local define = require 'proto.define' local lang = require 'language' @@ -45,7 +45,7 @@ return function (uri, callback) local refs = vm.getRefs(source) for _, src in ipairs(refs) do if vm.isGet(src) then - local func = searcher.getParentFunction(src) + local func = guide.getParentFunction(src) if not checkFunction(func) then hasGet = true break @@ -75,7 +75,7 @@ return function (uri, callback) end -- 只检查局部函数 - searcher.eachSourceType(ast.ast, 'function', function (source) + guide.eachSourceType(ast.ast, 'function', function (source) checkFunction(source) end) end |