From d130e76f0c8da3db5a94acd61254757811a85e6b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=80=E8=90=8C=E5=B0=8F=E6=B1=90?= Date: Sat, 8 May 2021 14:04:57 +0800 Subject: fix #529 --- script/parser/ast.lua | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'script') 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 -- cgit v1.2.3