diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2022-06-14 18:44:27 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2022-06-14 18:44:27 +0800 |
commit | bb238946ab6bc09b0376b5a4f1875c393f23ff47 (patch) | |
tree | ef54c5c9e15e2b86d3be2761f0eeb773e79dd70d /script/vm/runner.lua | |
parent | eb7363f1c70e62d0f27c675f49b0d28113d4afa4 (diff) | |
download | lua-language-server-bb238946ab6bc09b0376b5a4f1875c393f23ff47.zip |
update runner
Diffstat (limited to 'script/vm/runner.lua')
-rw-r--r-- | script/vm/runner.lua | 4 |
1 files changed, 4 insertions, 0 deletions
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 |