diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2022-03-02 20:31:35 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2022-03-02 20:31:35 +0800 |
commit | be0d11df2d89b8cb8cf24190ccfbd273256f4c74 (patch) | |
tree | 328597311c655f39bc43c9bcb963a4fd7491a65c /script/vm/global-manager.lua | |
parent | 4508b4018dced01fe5420e008e813199d0ce856f (diff) | |
download | lua-language-server-be0d11df2d89b8cb8cf24190ccfbd273256f4c74.zip |
update
Diffstat (limited to 'script/vm/global-manager.lua')
-rw-r--r-- | script/vm/global-manager.lua | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/script/vm/global-manager.lua b/script/vm/global-manager.lua index 5267aea1..4c2a535e 100644 --- a/script/vm/global-manager.lua +++ b/script/vm/global-manager.lua @@ -60,15 +60,19 @@ local compilerGlobalMap = util.switch() ---@param source parser.object : call(function (source) local name + local keyName = guide.getKeyName(source) + if not keyName then + return + end if source.node._globalNode then local parentName = source.node._globalNode:getName() if parentName == '_G' then - name = guide.getKeyName(source) + name = keyName else - name = parentName .. m.ID_SPLITE .. guide.getKeyName(source) + name = parentName .. m.ID_SPLITE .. keyName end elseif source.node.special == '_G' then - name = guide.getKeyName(source) + name = keyName end if not name then return @@ -117,6 +121,7 @@ local compilerGlobalMap = util.switch() local global = m.declareGlobal(name, uri) if source.node.special == 'rawset' then global:addSet(uri, source) + source.value = source.args[3] else global:addGet(uri, source) end |