diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2019-12-25 14:40:37 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2019-12-25 14:40:37 +0800 |
commit | 38ee6898c125f425470b9873370a5df5f60a64f8 (patch) | |
tree | 30640d1c0b27ed3309362b1bca86e49372c246b9 /script-beta/vm/eachField.lua | |
parent | 16f26d627f29912421da68280e14df967c6c670e (diff) | |
download | lua-language-server-38ee6898c125f425470b9873370a5df5f60a64f8.zip |
更新 special
Diffstat (limited to 'script-beta/vm/eachField.lua')
-rw-r--r-- | script-beta/vm/eachField.lua | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/script-beta/vm/eachField.lua b/script-beta/vm/eachField.lua index f6a7a57d..4a9e3eef 100644 --- a/script-beta/vm/eachField.lua +++ b/script-beta/vm/eachField.lua @@ -32,8 +32,25 @@ local function ofENV(source, callback) local ref = refs[i] if ref.type == 'getglobal' then callback(ref) + if guide.getName(ref) == '_G' then + local nextSrc = checkNext(ref) + if nextSrc then + callback(nextSrc) + end + end elseif ref.type == 'setglobal' then callback(ref) + if guide.getName(ref) == '_G' then + local nextSrc = checkNext(ref) + if nextSrc then + callback(nextSrc) + end + end + elseif ref.type == 'getlocal' then + local nextSrc = checkNext(ref) + if nextSrc then + callback(nextSrc) + end end vm.eachFieldInTable(ref.value, callback) end |