summaryrefslogtreecommitdiff
path: root/script/vm/compiler.lua
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2022-06-17 18:15:13 +0800
committer最萌小汐 <sumneko@hotmail.com>2022-06-17 18:15:13 +0800
commit166504aa87a5b2f7fe6bd41b2c572afccb717534 (patch)
tree5a61486aca3e1a98a4eeceed13e3ac583d0894eb /script/vm/compiler.lua
parent6431519640a087499ea497066a78a6079993b945 (diff)
downloadlua-language-server-166504aa87a5b2f7fe6bd41b2c572afccb717534.zip
update
Diffstat (limited to 'script/vm/compiler.lua')
-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 dd41d7b6..bc85407d 100644
--- a/script/vm/compiler.lua
+++ b/script/vm/compiler.lua
@@ -637,16 +637,14 @@ local function compileByLocalID(source)
end
end
end
- for _, src in ipairs(sources) do
- if src.value then
- if not hasMarkDoc or guide.isLiteral(src.value) then
- if src.value.type ~= 'nil' then
- local valueNode = vm.compileNode(src.value)
- if valueNode:hasType 'unknown' then
- vm.setNode(source, valueNode:copy():remove 'unknown')
- else
- vm.setNode(source, valueNode)
- end
+ if not hasMarkDoc then
+ for _, src in ipairs(sources) do
+ if src.value and src.value.type ~= 'nil' then
+ local valueNode = vm.compileNode(src.value)
+ if valueNode:hasType 'unknown' then
+ vm.setNode(source, valueNode:copy():remove 'unknown')
+ else
+ vm.setNode(source, valueNode)
end
end
end