From 70441948891e7d9d5c2cde9bb81b095b529e4d72 Mon Sep 17 00:00:00 2001 From: sumneko Date: Tue, 9 Apr 2019 18:57:57 +0800 Subject: =?UTF-8?q?=E4=BF=AE=E6=AD=A3=E6=9C=89=E6=97=B6=E7=BC=96=E8=AF=91?= =?UTF-8?q?=E5=AE=8C=E5=90=8E=E6=B2=A1=E6=9C=89=E8=AF=8A=E6=96=AD=E7=9A=84?= =?UTF-8?q?bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- server/src/service.lua | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'server/src') diff --git a/server/src/service.lua b/server/src/service.lua index 5b7465d3..88c42fda 100644 --- a/server/src/service.lua +++ b/server/src/service.lua @@ -352,8 +352,9 @@ end function mt:compileAst(obj) local ast, err = parser:ast(obj.text, 'lua', config.config.runtime.version) - obj.astErr = err - if not ast then + if ast then + obj.astErr = err + else if type(err) == 'string' then local message = lang.script('PARSER_CRASH', err) log.debug(message) @@ -450,6 +451,7 @@ function mt:compileVM(uri) end if self._needCompile[uri] then self:_markCompiled(uri, compiled) + self._needDiagnostics[uri] = true else if vm then vm:remove() -- cgit v1.2.3