summaryrefslogtreecommitdiff
path: root/server/src
diff options
context:
space:
mode:
Diffstat (limited to 'server/src')
-rw-r--r--server/src/service.lua6
1 files changed, 4 insertions, 2 deletions
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()