summaryrefslogtreecommitdiff
path: root/server/src/core
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2019-01-30 10:48:42 +0800
committer最萌小汐 <sumneko@hotmail.com>2019-01-30 10:48:42 +0800
commit1efd99b17b0c3b2f94fec5180a21bdeac08302dd (patch)
tree442555cb49f0acd579042559760caa30d6df4838 /server/src/core
parent0f900c018198d20d5c795c099ac28013677ba7c4 (diff)
downloadlua-language-server-1efd99b17b0c3b2f94fec5180a21bdeac08302dd.zip
修正一个报错
Diffstat (limited to 'server/src/core')
-rw-r--r--server/src/core/vm.lua8
1 files changed, 3 insertions, 5 deletions
diff --git a/server/src/core/vm.lua b/server/src/core/vm.lua
index 518277e2..f8cd8284 100644
--- a/server/src/core/vm.lua
+++ b/server/src/core/vm.lua
@@ -20,7 +20,6 @@ function mt:createDummyVar(source, value)
type = 'local',
key = '',
source = source or getDefaultSource(),
- close = self.scope.block.finish,
}
if source then
@@ -44,9 +43,6 @@ function mt:createLocal(key, source, value)
source = source or getDefaultSource(),
close = self.scope.block.finish,
}
- if not loc.close then
- error('Miss close')
- end
if source then
source.bind = loc
@@ -56,7 +52,9 @@ function mt:createLocal(key, source, value)
local shadow = self.scope.locals[key]
if shadow then
- shadow.close = source and (source.start-1)
+ if source then
+ shadow.close = source.start - 1
+ end
local group
if shadow.shadow then
group = shadow.shadow