summaryrefslogtreecommitdiff
path: root/script/parser/ast.lua
diff options
context:
space:
mode:
Diffstat (limited to 'script/parser/ast.lua')
-rw-r--r--script/parser/ast.lua9
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