diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2019-01-24 14:23:22 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2019-01-24 14:23:22 +0800 |
commit | f058262bcf81760a9d5e26a2716333f5de17e702 (patch) | |
tree | 90ceaa11b3e3a02494ab8ba1c81bf12f2481a33b /server | |
parent | 6bd234a6594e29697dfea36707670288be898d9c (diff) | |
download | lua-language-server-f058262bcf81760a9d5e26a2716333f5de17e702.zip |
写错了
Diffstat (limited to 'server')
-rw-r--r-- | server/src/service.lua | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/server/src/service.lua b/server/src/service.lua index fb32f6ac..8a06f5a5 100644 --- a/server/src/service.lua +++ b/server/src/service.lua @@ -309,7 +309,7 @@ function mt:compileVM(uri) local clock = os.clock() local ast = self:compileAst(obj) - local version = obj._version + local version = obj.version obj.astCost = os.clock() - clock self:_clearChainNode(obj, uri) self._global:clearGlobal(uri) @@ -317,7 +317,7 @@ function mt:compileVM(uri) local clock = os.clock() local vm = core.vm(ast, self, uri) local compiled - if version ~= obj._version then + if version ~= obj.version then return nil end if self._needCompile[uri] then @@ -327,6 +327,7 @@ function mt:compileVM(uri) end obj.vm = vm obj.vmCost = os.clock() - clock + obj.vmVersion = version local clock = os.clock() obj.lines = parser:lines(obj.text, 'utf8') @@ -359,11 +360,11 @@ function mt:doDiagnostics(uri) uri = uri, vm = obj.vm, lines = obj.lines, - version = obj.version, + version = obj.vmVersion, } local res = self:_callMethod(name, data) if obj.version ~= data.version then - return nil + return end if self._needDiagnostics[uri] then self._needDiagnostics[uri] = nil |