diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2023-01-10 18:20:29 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2023-01-10 18:20:29 +0800 |
commit | 709ec79260b448db181ea854d8288b334a812bb4 (patch) | |
tree | 164ec6ac54a08d6b04c52e78ecdbe906ede6c613 /script/vm/compiler.lua | |
parent | 084935667d60fd9f69b3390d70d09958dd84b078 (diff) | |
download | lua-language-server-709ec79260b448db181ea854d8288b334a812bb4.zip |
stash
Diffstat (limited to 'script/vm/compiler.lua')
-rw-r--r-- | script/vm/compiler.lua | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/script/vm/compiler.lua b/script/vm/compiler.lua index 060a2173..dbcb403d 100644 --- a/script/vm/compiler.lua +++ b/script/vm/compiler.lua @@ -1252,29 +1252,29 @@ local compilerSwitch = util.switch() end end else - if guide.isAssign(source) then - ---@cast key string - vm.compileByParentNode(source.node, key, function (src) - if src.value then - if bindDocs(src) then - vm.setNode(source, vm.compileNode(src)) - elseif src.value.type ~= 'nil' then - vm.setNode(source, vm.compileNode(src.value)) - local node = vm.getNode(src) - if node then - vm.setNode(source, node) - end - end - else - vm.setNode(source, vm.compileNode(src)) - end - end) - else + if guide.isGet(source) then local node = vm.traceNode(source) if node then vm.setNode(source, node) + return end end + ---@cast key string + vm.compileByParentNode(source.node, key, function (src) + if src.value then + if bindDocs(src) then + vm.setNode(source, vm.compileNode(src)) + elseif src.value.type ~= 'nil' then + vm.setNode(source, vm.compileNode(src.value)) + local node = vm.getNode(src) + if node then + vm.setNode(source, node) + end + end + else + vm.setNode(source, vm.compileNode(src)) + end + end) end end) : case 'setglobal' |