From d529a504b11eaea920df4a14a5da6972e3030eca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=80=E8=90=8C=E5=B0=8F=E6=B1=90?= Date: Mon, 1 Mar 2021 18:18:27 +0800 Subject: still can not yield inside compile --- script/files.lua | 4 ++-- script/parser/compile.lua | 6 +++--- 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 -- cgit v1.2.3