summaryrefslogtreecommitdiff
path: root/script-beta/vm
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2019-12-06 17:47:52 +0800
committer最萌小汐 <sumneko@hotmail.com>2019-12-06 17:47:52 +0800
commit1e3726e3d3f6c84ce29e857181261b5ffb2d0da3 (patch)
tree6029b3e0e3bbd072790a5f00152fa2efb0cfa071 /script-beta/vm
parent61304827140ac8940e74ce9876c772d021cc926a (diff)
downloadlua-language-server-1e3726e3d3f6c84ce29e857181261b5ffb2d0da3.zip
暂存
Diffstat (limited to 'script-beta/vm')
-rw-r--r--script-beta/vm/eachRef.lua21
1 files changed, 18 insertions, 3 deletions
diff --git a/script-beta/vm/eachRef.lua b/script-beta/vm/eachRef.lua
index 8c203cfa..d990ee1a 100644
--- a/script-beta/vm/eachRef.lua
+++ b/script-beta/vm/eachRef.lua
@@ -1,6 +1,7 @@
-local guide = require 'parser.guide'
-local files = require 'files'
-local vm = require 'vm.vm'
+local guide = require 'parser.guide'
+local files = require 'files'
+local vm = require 'vm.vm'
+local library = require 'library'
local function ofCall(func, index, callback)
vm.eachRef(func, function (info)
@@ -115,6 +116,20 @@ local function ofSpecialCall(call, func, index, callback)
end
end
end
+
+ local args = call.args
+ if args[1] then
+ if args[1].type == 'string' then
+ local objName = args[1][1]
+ local lib = library.library[objName]
+ if lib then
+ callback {
+ source = lib,
+ mode = 'library',
+ }
+ end
+ end
+ end
end
end
end