From bb238946ab6bc09b0376b5a4f1875c393f23ff47 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, 14 Jun 2022 18:44:27 +0800 Subject: update runner --- script/vm/runner.lua | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'script/vm/runner.lua') diff --git a/script/vm/runner.lua b/script/vm/runner.lua index c0218a44..30d9e672 100644 --- a/script/vm/runner.lua +++ b/script/vm/runner.lua @@ -114,6 +114,9 @@ end ---@param outNode? vm.node ---@return vm.node function mt:_lookInto(action, topNode, outNode) + if action.type == 'setlocal' then + topNode = self:_fastWard(action.finish, topNode) + end action = vm.getObjectValue(action) or action if action.type == 'function' or action.type == 'loop' @@ -162,6 +165,7 @@ function mt:_lookInto(action, topNode, outNode) goto RETURN end if action.op.type == 'not' then + outNode = outNode or topNode:copy() outNode, topNode = self:_lookInto(action[1], topNode, outNode) end elseif action.type == 'binary' then -- cgit v1.2.3