summaryrefslogtreecommitdiff
path: root/server/src/vm/local.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/local.lua
parentb6a0f2e122d6821ce211ccd0f8c73bf95d0f7491 (diff)
downloadlua-language-server-faf56c7e9d08776207c4592e6aee87a79241fdcc.zip
改成全局表引用
Diffstat (limited to 'server/src/vm/local.lua')
-rw-r--r--server/src/vm/local.lua8
1 files changed, 4 insertions, 4 deletions
diff --git a/server/src/vm/local.lua b/server/src/vm/local.lua
index 9b981c1d..b8a387fe 100644
--- a/server/src/vm/local.lua
+++ b/server/src/vm/local.lua
@@ -1,4 +1,4 @@
-local sourceMgr = require 'vm.source'
+local listMgr = require 'vm.list'
local Sort = 0
local Watch = setmetatable({}, {__mode = 'kv'})
@@ -44,7 +44,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
@@ -56,7 +56,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
@@ -117,7 +117,7 @@ function mt:close(pos)
end
function mt:getSource()
- return sourceMgr.list[self.source]
+ return listMgr.get(self.source)
end
local function create(name, source, value)