diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2020-09-08 18:54:29 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2020-09-08 18:54:29 +0800 |
commit | 7eddd5d42c40959390c052683cf17a3c4cbd5151 (patch) | |
tree | 7856f67001d58317e8f34c03a051c9fcb11a97c3 /script-beta/vm/getLibrary.lua | |
parent | fb294036fe0d80c871d31374e882e64f582d0719 (diff) | |
download | lua-language-server-7eddd5d42c40959390c052683cf17a3c4cbd5151.zip |
修正一些bug
Diffstat (limited to 'script-beta/vm/getLibrary.lua')
-rw-r--r-- | script-beta/vm/getLibrary.lua | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/script-beta/vm/getLibrary.lua b/script-beta/vm/getLibrary.lua index 4ce02024..8b955c7c 100644 --- a/script-beta/vm/getLibrary.lua +++ b/script-beta/vm/getLibrary.lua @@ -2,6 +2,9 @@ local vm = require 'vm.vm' local guide = require 'parser.guide' local function getLibrary(source) + if source.type == 'library' then + return source + end local defs = vm.getDefs(source) for _, def in ipairs(defs) do if def.type == 'library' then |