From 1efd99b17b0c3b2f94fec5180a21bdeac08302dd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=80=E8=90=8C=E5=B0=8F=E6=B1=90?= Date: Wed, 30 Jan 2019 10:48:42 +0800 Subject: =?UTF-8?q?=E4=BF=AE=E6=AD=A3=E4=B8=80=E4=B8=AA=E6=8A=A5=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- server/src/core/vm.lua | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'server/src') 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 -- cgit v1.2.3