summaryrefslogtreecommitdiff
path: root/script-beta/parser
diff options
context:
space:
mode:
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 {