summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2019-03-19 11:08:53 +0800
committer最萌小汐 <sumneko@hotmail.com>2019-03-19 11:08:53 +0800
commitb23a9a5f34874916ea402e6141f426f00294a334 (patch)
tree61a70ac5ecd3035da7fbbbd8c3c7f16ac5d31df4
parentb44d1495ae952dab235b9a79cabbeb56be30da8f (diff)
downloadlua-language-server-b23a9a5f34874916ea402e6141f426f00294a334.zip
修正一些bug
-rw-r--r--server/src/core/document_symbol.lua6
-rw-r--r--server/src/vm/vm.lua4
2 files changed, 3 insertions, 7 deletions
diff --git a/server/src/core/document_symbol.lua b/server/src/core/document_symbol.lua
index 39257ba3..ac81277c 100644
--- a/server/src/core/document_symbol.lua
+++ b/server/src/core/document_symbol.lua
@@ -228,9 +228,6 @@ local function packChild(symbols, finish, kind)
t = {}
end
t[#t+1] = symbol
- if coroutine.isyieldable() then
- coroutine.yield()
- end
end
return t
end
@@ -252,9 +249,6 @@ return function (vm)
buildSource(vm, source, used, function (data)
symbols[#symbols+1] = data
end)
- if coroutine.isyieldable() then
- coroutine.yield()
- end
end
local packedSymbols = packSymbols(symbols)
diff --git a/server/src/vm/vm.lua b/server/src/vm/vm.lua
index 0c952765..2a81372b 100644
--- a/server/src/vm/vm.lua
+++ b/server/src/vm/vm.lua
@@ -911,6 +911,7 @@ function mt:doFunction(action)
self:instantSource(action)
local name = action.name
if name then
+ self:instantSource(name)
if name.type == 'simple' then
local parent = self:getSimple(name, -2)
if name[#name-1].type == ':' then
@@ -969,8 +970,9 @@ function mt:doLocalFunction(action)
self:instantSource(action)
local name = action.name
if name then
+ self:instantSource(name)
if name.type == 'simple' then
- self:buildFunction(action)
+ self:doFunction(action)
else
local loc = self:createLocal(name[1], name)
local func = self:buildFunction(action)