diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2019-10-10 19:14:04 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2019-10-10 19:14:04 +0800 |
commit | f8ae93feb7be0faba81ce72795b74bc4ec4dfe03 (patch) | |
tree | 23bf0f8347f200b2274bbec3f77a1e76960a5500 /server-beta/src/core/getglobal.lua | |
parent | f233384eba3ef7324333e12d0ba0b7e6bfc2eddb (diff) | |
download | lua-language-server-f8ae93feb7be0faba81ce72795b74bc4ec4dfe03.zip |
支持 __index
Diffstat (limited to 'server-beta/src/core/getglobal.lua')
-rw-r--r-- | server-beta/src/core/getglobal.lua | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/server-beta/src/core/getglobal.lua b/server-beta/src/core/getglobal.lua index 46a9e7d2..6853d631 100644 --- a/server-beta/src/core/getglobal.lua +++ b/server-beta/src/core/getglobal.lua @@ -40,6 +40,18 @@ function m:ref(source, callback) if guide.getKeyName(parent) == key then self:childRef(parent, callback) end + elseif name == 'rawset' then + local t, k = self:callArgOf(src.parent) + if self:getSpecialName(t) == '_G' + and guide.getKeyName(k) == key then + callback(src.parent, 'set') + end + elseif name == 'rawget' then + local t, k = self:callArgOf(src.parent) + if self:getSpecialName(t) == '_G' + and guide.getKeyName(k) == key then + callback(src.parent, 'get') + end end end) end |