diff options
Diffstat (limited to 'server-beta/src/parser')
-rw-r--r-- | server-beta/src/parser/compile.lua | 5 |
1 files changed, 4 insertions, 1 deletions
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 之后使用,则算作语法错误 |