summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2021-03-01 18:18:27 +0800
committer最萌小汐 <sumneko@hotmail.com>2021-03-01 18:18:27 +0800
commitd529a504b11eaea920df4a14a5da6972e3030eca (patch)
tree639d12447e503d0cb2cd28c87cbd3f5c4c8a48c5
parent0dae347da5874b59db867a9d318593f8534ab03b (diff)
downloadlua-language-server-d529a504b11eaea920df4a14a5da6972e3030eca.zip
still can not yield inside compile
-rw-r--r--script/files.lua4
-rw-r--r--script/parser/compile.lua6
2 files changed, 5 insertions, 5 deletions
diff --git a/script/files.lua b/script/files.lua
index ed9fd880..8e323a92 100644
--- a/script/files.lua
+++ b/script/files.lua
@@ -387,7 +387,7 @@ function m.compileAst(uri, text)
if passed > 0.1 then
log.warn(('Compile [%s] takes [%.3f] sec, size [%.3f] kb.'):format(uri, passed, #text / 1000))
end
- await.delay()
+ --await.delay()
if state then
state.uri = uri
state.ast.uri = uri
@@ -429,7 +429,7 @@ function m.getAst(uri)
if not ast then
ast = m.compileAst(uri, file.text)
m.astMap[uri] = ast
- await.delay()
+ --await.delay()
end
file.cacheActiveTime = timer.clock()
return ast
diff --git a/script/parser/compile.lua b/script/parser/compile.lua
index d55dc395..febb8c2c 100644
--- a/script/parser/compile.lua
+++ b/script/parser/compile.lua
@@ -540,9 +540,9 @@ return function (self, lua, mode, version, options)
if not state then
return nil, err
end
- if options and options.delay then
- options.delay()
- end
+ --if options and options.delay then
+ -- options.delay()
+ --end
local clock = os.clock()
pushError = state.pushError
if version == 'Lua 5.1' or version == 'LuaJIT' then