summaryrefslogtreecommitdiff
path: root/server/src/vm/local.lua
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2019-03-06 15:21:07 +0800
committer最萌小汐 <sumneko@hotmail.com>2019-03-06 15:21:07 +0800
commitda9766054cad4b47f5bc1534f1c9a13a922e17bc (patch)
tree7e773ea59e1388d195274e6fdde3ff7ad4963c7c /server/src/vm/local.lua
parenta6807742cc7128b6eab4a078feac11af4039e1f9 (diff)
downloadlua-language-server-da9766054cad4b47f5bc1534f1c9a13a922e17bc.zip
更新自动完成的支持
Diffstat (limited to 'server/src/vm/local.lua')
-rw-r--r--server/src/vm/local.lua10
1 files changed, 10 insertions, 0 deletions
diff --git a/server/src/vm/local.lua b/server/src/vm/local.lua
index 570f453d..fe8b3fe4 100644
--- a/server/src/vm/local.lua
+++ b/server/src/vm/local.lua
@@ -9,6 +9,7 @@ end
local mt = {}
mt.__index = mt
mt.type = 'local'
+mt._close = math.maxinteger
function mt:setValue(value)
if self.value then
@@ -67,6 +68,15 @@ function mt:shadow(old)
end
group[#group+1] = self
self._shadow = group
+ old:close(self.source.start - 1)
+end
+
+function mt:close(pos)
+ if pos then
+ self._close = pos
+ else
+ return self._close
+ end
end
return function (name, source, value)