summaryrefslogtreecommitdiff
path: root/script/parser/parse.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/parse.lua
parentde4463286505e59158f60f65466d07d61d21cd0b (diff)
downloadlua-language-server-becf78043079b7df7d9fba2941d6c134fbc0aa79.zip
update test
Diffstat (limited to 'script/parser/parse.lua')
-rw-r--r--script/parser/parse.lua2
1 files changed, 2 insertions, 0 deletions
diff --git a/script/parser/parse.lua b/script/parser/parse.lua
index 909ce315..9b8d5496 100644
--- a/script/parser/parse.lua
+++ b/script/parser/parse.lua
@@ -36,6 +36,7 @@ return function (self, lua, mode, version, options)
comms[#comms+1] = comment
end
}
+ local clock = os.clock()
ast.init(state)
local suc, res, err = xpcall(self.grammar, debug.traceback, self, lua, mode)
ast.close()
@@ -46,5 +47,6 @@ return function (self, lua, mode, version, options)
state.pushError(err)
end
state.ast = res
+ state.parseClock = os.clock() - clock
return state
end