diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2019-11-11 18:37:09 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2019-11-11 18:37:09 +0800 |
commit | 8f5bc53c9fd5d289cf82e5dfb55a8e9912fb8e82 (patch) | |
tree | 1b6b994a344b0cf152fbcceb1aa9eb6e9fc34afa /server-beta/src/parser/compile.lua | |
parent | d0e4afaa8c498c2404516b6fdd41ec85719375a0 (diff) | |
download | lua-language-server-8f5bc53c9fd5d289cf82e5dfb55a8e9912fb8e82.zip |
更新引用实现
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 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 之后使用,则算作语法错误 |