summaryrefslogtreecommitdiff
path: root/script-beta/vm/eachDef.lua
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2020-05-30 15:42:45 +0800
committer最萌小汐 <sumneko@hotmail.com>2020-05-30 15:42:45 +0800
commitfee8530cfa83c11e76def4f2ab891a9a7cb25c81 (patch)
treeba343991d395ef5fc1e963fb4acaecaa1b56e7ef /script-beta/vm/eachDef.lua
parent529440f6a2d642d7df47cf4b5d54d9e538761f7a (diff)
downloadlua-language-server-fee8530cfa83c11e76def4f2ab891a9a7cb25c81.zip
整理代码
Diffstat (limited to 'script-beta/vm/eachDef.lua')
-rw-r--r--script-beta/vm/eachDef.lua4
1 files changed, 4 insertions, 0 deletions
diff --git a/script-beta/vm/eachDef.lua b/script-beta/vm/eachDef.lua
index 75c29526..e30e3b51 100644
--- a/script-beta/vm/eachDef.lua
+++ b/script-beta/vm/eachDef.lua
@@ -2,7 +2,11 @@ local vm = require 'vm.vm'
local guide = require 'parser.guide'
local function eachDef(source)
+ local lib = vm.getLibrary(source)
local results = guide.requestDefinition(source)
+ if lib then
+ results[#results+1] = lib
+ end
return results
end