summaryrefslogtreecommitdiff
path: root/script/vm/compiler.lua
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2022-06-28 19:28:54 +0800
committer最萌小汐 <sumneko@hotmail.com>2022-06-28 19:28:54 +0800
commitdeac4582d38908c1281d4d5215b7b69ff8400dca (patch)
tree833da004bc6bd82dadb373bbc345224160ce0972 /script/vm/compiler.lua
parent7e778b31476831864dff995ae3ae4e5f223c5726 (diff)
downloadlua-language-server-deac4582d38908c1281d4d5215b7b69ff8400dca.zip
parse `---@return ...` a `---@return ... unknown`
Diffstat (limited to 'script/vm/compiler.lua')
-rw-r--r--script/vm/compiler.lua18
1 files changed, 0 insertions, 18 deletions
diff --git a/script/vm/compiler.lua b/script/vm/compiler.lua
index e7af1f0f..9a5eba7f 100644
--- a/script/vm/compiler.lua
+++ b/script/vm/compiler.lua
@@ -1553,10 +1553,6 @@ local compilerSwitch = util.switch()
end
if lastReturn
and not hasMarkDoc then
- if lastReturn.types[1][1] == '...' then
- hasMarkDoc = true
- vm.setNode(source, vm.declareGlobal('type', 'unknown'))
- end
if lastReturn.name and lastReturn.name[1] == '...' then
hasMarkDoc = true
vm.setNode(source, vm.compileNode(lastReturn))
@@ -1618,13 +1614,6 @@ local compilerSwitch = util.switch()
if not node then
return
end
- for n in node:eachObject() do
- if n.type == 'global'
- and n.cate == 'type'
- and n.name == '...' then
- return
- end
- end
vm.setNode(source, node)
end
if vararg.type == 'varargs' then
@@ -1643,13 +1632,6 @@ local compilerSwitch = util.switch()
if not node then
return
end
- for n in node:eachObject() do
- if n.type == 'global'
- and n.cate == 'type'
- and n.name == '...' then
- return
- end
- end
vm.setNode(source, node)
end)
: case 'doc.type'