diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2019-11-14 20:53:34 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2019-11-14 20:53:34 +0800 |
commit | bfa16248754205f363134e61f930ebca16a2d21b (patch) | |
tree | f7a1c1bb9f8f1cd11d9e0910d91f5a459d3c05ca /server-beta/src/parser/compile.lua | |
parent | 1e6387f2602329cd0bfa33b80e551be4c7cadfeb (diff) | |
download | lua-language-server-bfa16248754205f363134e61f930ebca16a2d21b.zip |
先测试 reference
Diffstat (limited to 'server-beta/src/parser/compile.lua')
-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 2fdab43d..48cebcad 100644 --- a/server-beta/src/parser/compile.lua +++ b/server-beta/src/parser/compile.lua @@ -453,7 +453,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 之后使用,则算作语法错误 |