diff options
Diffstat (limited to 'script-beta/vm/eachRef.lua')
-rw-r--r-- | script-beta/vm/eachRef.lua | 21 |
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 |