From 08ab0f45adb64f314b55f38ae69b7fee97e30e36 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=80=E8=90=8C=E5=B0=8F=E6=B1=90?= Date: Fri, 28 Dec 2018 17:58:11 +0800 Subject: =?UTF-8?q?=E8=AE=B0=E5=BD=95=E6=AF=8F=E4=B8=AAchunk=E4=B8=AD?= =?UTF-8?q?=E7=9A=84=E5=B1=80=E9=83=A8=E5=8F=98=E9=87=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- server/src/core/vm.lua | 2 ++ 1 file changed, 2 insertions(+) (limited to 'server') diff --git a/server/src/core/vm.lua b/server/src/core/vm.lua index 5ccada8e..fc00b581 100644 --- a/server/src/core/vm.lua +++ b/server/src/core/vm.lua @@ -119,6 +119,7 @@ function mt:createLocal(key, source, value) self.scope.locals[key] = loc self.results.locals[#self.results.locals+1] = loc + self.chunk.locals[#self.chunk.locals+1] = loc self:addInfo(loc, 'local', source) self:setValue(loc, value, source) @@ -1463,6 +1464,7 @@ local function compile(ast, lsp, uri) }, chunk = env { labels = {}, + locals = {}, }, results = { locals = {}, -- cgit v1.2.3