summaryrefslogtreecommitdiff
path: root/script/parser/compile.lua
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2020-12-05 11:13:05 +0800
committer最萌小汐 <sumneko@hotmail.com>2020-12-05 11:13:05 +0800
commitbecf78043079b7df7d9fba2941d6c134fbc0aa79 (patch)
tree035bed287c90f3b44029fa37a6ea708461cf10c2 /script/parser/compile.lua
parentde4463286505e59158f60f65466d07d61d21cd0b (diff)
downloadlua-language-server-becf78043079b7df7d9fba2941d6c134fbc0aa79.zip
update test
Diffstat (limited to 'script/parser/compile.lua')
-rw-r--r--script/parser/compile.lua3
1 files changed, 3 insertions, 0 deletions
diff --git a/script/parser/compile.lua b/script/parser/compile.lua
index 1ba111ed..d4129ab4 100644
--- a/script/parser/compile.lua
+++ b/script/parser/compile.lua
@@ -1,5 +1,6 @@
local guide = require 'parser.guide'
local type = type
+local os = os
local specials = {
['_G'] = true,
@@ -537,6 +538,7 @@ return function (self, lua, mode, version, options)
if not state then
return nil, err
end
+ local clock = os.clock()
pushError = state.pushError
if version == 'Lua 5.1' or version == 'LuaJIT' then
ENVMode = '@fenv'
@@ -557,6 +559,7 @@ return function (self, lua, mode, version, options)
Compile(state.ast)
end
PostCompile()
+ state.compileClock = os.clock() - clock
Compiled = nil
GoToTag = nil
return state