diff options
Diffstat (limited to 'script/vm/getLinks.lua')
-rw-r--r-- | script/vm/getLinks.lua | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/script/vm/getLinks.lua b/script/vm/getLinks.lua index 51a18d58..14b34987 100644 --- a/script/vm/getLinks.lua +++ b/script/vm/getLinks.lua @@ -5,7 +5,7 @@ local files = require 'files' local function getFileLinks(uri) local ws = require 'workspace' local links = {} - local ast = files.getAst(uri) + local ast = files.getState(uri) if not ast then return links end @@ -52,6 +52,7 @@ local function getLinksTo(uri) return links end +-- 获取所有 require(uri) 的文件 function vm.getLinksTo(uri) local cache = vm.getCache('getLinksTo')[uri] if cache ~= nil then |