diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2021-05-08 14:04:57 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2021-05-08 14:04:57 +0800 |
commit | d130e76f0c8da3db5a94acd61254757811a85e6b (patch) | |
tree | eaba5abee9ad1ae2e0aeb5bad6a6f5ea04e05d0a /script/parser | |
parent | 80d6de8603ac3097da092bed26224a0cfcf07669 (diff) | |
download | lua-language-server-d130e76f0c8da3db5a94acd61254757811a85e6b.zip |
fix #529
Diffstat (limited to 'script/parser')
-rw-r--r-- | script/parser/ast.lua | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/script/parser/ast.lua b/script/parser/ast.lua index 3ac4d27f..45d77631 100644 --- a/script/parser/ast.lua +++ b/script/parser/ast.lua @@ -9,7 +9,12 @@ local tableSort = table.sort _ENV = nil -local State +local DefaultState = { + lua = '', + options = {}, +} + +local State = DefaultState local PushError local PushDiag local PushComment @@ -1925,7 +1930,7 @@ local function init(state) end local function close() - State = nil + State = DefaultState PushError = function (...) end PushDiag = function (...) end PushComment = function (...) end |