summaryrefslogtreecommitdiff
path: root/script-beta/parser
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2020-01-15 15:32:33 +0800
committer最萌小汐 <sumneko@hotmail.com>2020-01-15 15:32:33 +0800
commit55174040f1aaf1311afa6cb28c28ad0b489b65d1 (patch)
treedcacbfa02b99a1414cd0e146ec876a3fe1e2fa93 /script-beta/parser
parent73244793bda51290b1028ab1f764867f33cabbc5 (diff)
downloadlua-language-server-55174040f1aaf1311afa6cb28c28ad0b489b65d1.zip
更新luaparser
Diffstat (limited to 'script-beta/parser')
-rw-r--r--script-beta/parser/ast.lua7
1 files changed, 6 insertions, 1 deletions
diff --git a/script-beta/parser/ast.lua b/script-beta/parser/ast.lua
index 43335950..4227cb88 100644
--- a/script-beta/parser/ast.lua
+++ b/script-beta/parser/ast.lua
@@ -1615,7 +1615,12 @@ local Defs = {
start = start,
finish = finish - 1,
}
- return exp
+ -- 当exp为nil时,不能返回任何值,否则会产生带洞的actionlist
+ if exp then
+ return exp
+ else
+ return
+ end
end,
MissIf = function (start, block)
PushError {