From 709ec79260b448db181ea854d8288b334a812bb4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=80=E8=90=8C=E5=B0=8F=E6=B1=90?= Date: Tue, 10 Jan 2023 18:20:29 +0800 Subject: stash --- script/vm/compiler.lua | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) (limited to 'script/vm/compiler.lua') 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' -- cgit v1.2.3