From 8f5bc53c9fd5d289cf82e5dfb55a8e9912fb8e82 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=80=E8=90=8C=E5=B0=8F=E6=B1=90?= Date: Mon, 11 Nov 2019 18:37:09 +0800 Subject: =?UTF-8?q?=E6=9B=B4=E6=96=B0=E5=BC=95=E7=94=A8=E5=AE=9E=E7=8E=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- server-beta/src/parser/compile.lua | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'server-beta/src/parser/compile.lua') diff --git a/server-beta/src/parser/compile.lua b/server-beta/src/parser/compile.lua index 1a187e96..bf60e7ba 100644 --- a/server-beta/src/parser/compile.lua +++ b/server-beta/src/parser/compile.lua @@ -423,7 +423,10 @@ local function compileGoTo(obj) } return end - label.ref = obj + if not label.ref then + label.ref = {} + end + label.ref[#label.ref+1] = obj -- 如果有局部变量在 goto 与 label 之间声明, -- 并在 label 之后使用,则算作语法错误 -- cgit v1.2.3