summaryrefslogtreecommitdiff
path: root/script/parser
diff options
context:
space:
mode:
authorsumneko <sumneko@hotmail.com>2021-10-02 04:44:46 +0800
committersumneko <sumneko@hotmail.com>2021-10-02 04:44:46 +0800
commitf78be72a12c31d6dcb374c898e3050d02e5afab8 (patch)
tree4fd584f335f7fbf5e25ff7fe396ce29780f6bd74 /script/parser
parenta67ee53f93f3957b13dded414f878274824fe8ac (diff)
downloadlua-language-server-f78be72a12c31d6dcb374c898e3050d02e5afab8.zip
fix #699 check nil
Diffstat (limited to 'script/parser')
-rw-r--r--script/parser/newparser.lua4
1 files changed, 3 insertions, 1 deletions
diff --git a/script/parser/newparser.lua b/script/parser/newparser.lua
index aaac3540..1fd395e5 100644
--- a/script/parser/newparser.lua
+++ b/script/parser/newparser.lua
@@ -3645,7 +3645,9 @@ return function (lua, mode, version, options)
elseif mode == 'Action' then
State.ast = parseAction()
end
- State.ast.state = State
+ if State.ast then
+ State.ast.state = State
+ end
return State
end