From 55174040f1aaf1311afa6cb28c28ad0b489b65d1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=80=E8=90=8C=E5=B0=8F=E6=B1=90?= Date: Wed, 15 Jan 2020 15:32:33 +0800 Subject: =?UTF-8?q?=E6=9B=B4=E6=96=B0luaparser?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- script-beta/parser/ast.lua | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'script-beta/parser') 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 { -- cgit v1.2.3