summaryrefslogtreecommitdiff
path: root/script
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2022-07-04 20:26:49 +0800
committer最萌小汐 <sumneko@hotmail.com>2022-07-04 20:26:49 +0800
commit6f52414fc098886056d8060dde097626e5095126 (patch)
tree4ae6d5240694b5874de3058beda58aea8749c17a /script
parentffc89179de7598fce8bd0db54f09275d09d3f5b2 (diff)
downloadlua-language-server-6f52414fc098886056d8060dde097626e5095126.zip
fix
Diffstat (limited to 'script')
-rw-r--r--script/vm/runner.lua5
1 files changed, 2 insertions, 3 deletions
diff --git a/script/vm/runner.lua b/script/vm/runner.lua
index 8169c8f2..ec3449ee 100644
--- a/script/vm/runner.lua
+++ b/script/vm/runner.lua
@@ -140,9 +140,8 @@ function mt:_lookIntoChild(action, topNode, outNode)
goto RETURN
end
if action.op.type == 'and' then
- local dummyNode = topNode:copy()
- topNode = self:_lookIntoChild(action[1], topNode, dummyNode)
- topNode = self:_lookIntoChild(action[2], topNode, dummyNode)
+ topNode = self:_lookIntoChild(action[1], topNode, topNode:copy())
+ topNode = self:_lookIntoChild(action[2], topNode, topNode:copy())
elseif action.op.type == 'or' then
outNode = outNode or topNode:copy()
local topNode1, outNode1 = self:_lookIntoChild(action[1], topNode, outNode)