summaryrefslogtreecommitdiff
path: root/server/src/matcher/vm.lua
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2018-12-21 10:46:09 +0800
committer最萌小汐 <sumneko@hotmail.com>2018-12-21 10:46:09 +0800
commit3e7c5d5725e2a342121b8758a5e364dcf9f6435d (patch)
treec848c5378ff9d5f2fe2a56f96de39f2824899f2d /server/src/matcher/vm.lua
parent9711dcfcafceca6426e650a99f9d580ba6be58c1 (diff)
downloadlua-language-server-3e7c5d5725e2a342121b8758a5e364dcf9f6435d.zip
修正hover的一个bug
Diffstat (limited to 'server/src/matcher/vm.lua')
-rw-r--r--server/src/matcher/vm.lua4
1 files changed, 3 insertions, 1 deletions
diff --git a/server/src/matcher/vm.lua b/server/src/matcher/vm.lua
index 50de4041..fc66d6aa 100644
--- a/server/src/matcher/vm.lua
+++ b/server/src/matcher/vm.lua
@@ -964,15 +964,17 @@ function mt:doDo(action)
end
function mt:doReturn(action)
+ self:getCurrentFunction().hasReturn = true
for i, exp in ipairs(action) do
local value = self:getExp(exp)
- self:addInfo(value, 'return', exp)
if value.type == 'list' then
for x, v in ipairs(value) do
+ self:addInfo(v, 'return', exp)
self:setFunctionReturn(self:getCurrentFunction(), i + x - 1, v)
end
break
else
+ self:addInfo(value, 'return', exp)
self:setFunctionReturn(self:getCurrentFunction(), i, value)
end
end