summaryrefslogtreecommitdiff
path: root/script/vm
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2023-01-31 15:04:41 +0800
committer最萌小汐 <sumneko@hotmail.com>2023-01-31 15:04:41 +0800
commit0c5c502806659c11b3edde1ceff6fbb5058aaf0f (patch)
tree3265a276f1f6ae18e750d8308c886b5f12253d87 /script/vm
parentce0432a3cc09909d6a9c9c9886761a128d34c2ad (diff)
downloadlua-language-server-0c5c502806659c11b3edde1ceff6fbb5058aaf0f.zip
fix #1857
Diffstat (limited to 'script/vm')
-rw-r--r--script/vm/compiler.lua18
1 files changed, 8 insertions, 10 deletions
diff --git a/script/vm/compiler.lua b/script/vm/compiler.lua
index a438d06f..3bebbc20 100644
--- a/script/vm/compiler.lua
+++ b/script/vm/compiler.lua
@@ -1752,16 +1752,14 @@ local compilerSwitch = util.switch()
vm.setNode(source, global)
if global.cate == 'variable' then
for luri, link in pairs(global.links) do
- if luri ~= uri then
- local firstSet = link.sets[1]
- if firstSet then
- local setNode = vm.compileNode(firstSet)
- vm.setNode(source, setNode)
- if vm.isMetaFile(luri) then
- for i = 2, #link.sets do
- setNode = vm.compileNode(link.sets[i])
- vm.setNode(source, setNode)
- end
+ local firstSet = link.sets[1]
+ if firstSet then
+ local setNode = vm.compileNode(firstSet)
+ vm.setNode(source, setNode)
+ if vm.isMetaFile(luri) then
+ for i = 2, #link.sets do
+ setNode = vm.compileNode(link.sets[i])
+ vm.setNode(source, setNode)
end
end
end