summaryrefslogtreecommitdiff
path: root/server
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2018-12-25 12:25:01 +0800
committer最萌小汐 <sumneko@hotmail.com>2018-12-25 12:25:01 +0800
commitfed7e101b8815763702b091b925d35908fd1162a (patch)
tree6be046bcbb49b721a82a071a18a2864c68f4d009 /server
parent1db38f35caa8352cd2930a71b484a61c61e7252b (diff)
downloadlua-language-server-fed7e101b8815763702b091b925d35908fd1162a.zip
应该要倒序编译
Diffstat (limited to 'server')
-rw-r--r--server/src/service.lua5
1 files changed, 4 insertions, 1 deletions
diff --git a/server/src/service.lua b/server/src/service.lua
index dbe24778..21bb6015 100644
--- a/server/src/service.lua
+++ b/server/src/service.lua
@@ -172,7 +172,7 @@ function mt:needCompile(uri)
return
end
self._needCompile[uri] = true
- self._needCompile[#self._needCompile+1] = uri
+ table.insert(self._needCompile, 1, uri)
end
function mt:saveText(uri, version, text)
@@ -303,6 +303,9 @@ function mt:compileChain(child, parent)
if not parentObj or not childObj then
return
end
+ if parentObj == childObj then
+ return
+ end
if not parentObj.child then
parentObj.child = {}