diff options
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' |