summaryrefslogtreecommitdiff
path: root/server/src/vm/label.lua
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2019-03-27 15:30:19 +0800
committer最萌小汐 <sumneko@hotmail.com>2019-03-27 15:30:19 +0800
commitfaf56c7e9d08776207c4592e6aee87a79241fdcc (patch)
tree14f39dadbd1f684b3f0242b16c0a6021e169601d /server/src/vm/label.lua
parentb6a0f2e122d6821ce211ccd0f8c73bf95d0f7491 (diff)
downloadlua-language-server-faf56c7e9d08776207c4592e6aee87a79241fdcc.zip
改成全局表引用
Diffstat (limited to 'server/src/vm/label.lua')
-rw-r--r--server/src/vm/label.lua8
1 files changed, 4 insertions, 4 deletions
diff --git a/server/src/vm/label.lua b/server/src/vm/label.lua
index 9ed62ca3..c0e0dfb8 100644
--- a/server/src/vm/label.lua
+++ b/server/src/vm/label.lua
@@ -1,4 +1,4 @@
-local sourceMgr = require 'vm.source'
+local listMgr = require 'vm.list'
local Sort = 0
@@ -34,7 +34,7 @@ end
function mt:eachInfo(callback)
local list = {}
for srcId, info in pairs(self._info) do
- local src = sourceMgr.list[srcId]
+ local src = listMgr.get(srcId)
if src then
list[#list+1] = info
else
@@ -46,7 +46,7 @@ function mt:eachInfo(callback)
end)
for i = 1, #list do
local info = list[i]
- local res = callback(info, sourceMgr.list[info.source])
+ local res = callback(info, listMgr.get(info.source))
if res ~= nil then
return res
end
@@ -55,7 +55,7 @@ function mt:eachInfo(callback)
end
function mt:getSource()
- return sourceMgr.list[self.source]
+ return listMgr.get(self.source)
end
return function (name, source)