summaryrefslogtreecommitdiff
path: root/script/vm/tracer.lua
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2023-05-23 14:08:38 +0800
committer最萌小汐 <sumneko@hotmail.com>2023-05-23 14:08:38 +0800
commit7aac1748434eda3726d1ed001edd1327c3973e0b (patch)
tree8e33cfa5fb954a168fcb04745aa3bad677d85981 /script/vm/tracer.lua
parentfc63802fca2c98643bcfc63bd251a7394536c1de (diff)
downloadlua-language-server-7aac1748434eda3726d1ed001edd1327c3973e0b.zip
trace filter of `repeat`
fix #2113
Diffstat (limited to 'script/vm/tracer.lua')
-rw-r--r--script/vm/tracer.lua6
1 files changed, 6 insertions, 0 deletions
diff --git a/script/vm/tracer.lua b/script/vm/tracer.lua
index a8aa0c7c..e47a9824 100644
--- a/script/vm/tracer.lua
+++ b/script/vm/tracer.lua
@@ -296,6 +296,9 @@ local lookIntoChild = util.switch()
topNode = tracer.nodes[action]:copy()
end
end
+ if action.type == 'repeat' then
+ tracer:lookIntoChild(action.filter, topNode)
+ end
return topNode, outNode
end)
: case 'in'
@@ -745,6 +748,9 @@ function mt:lookIntoBlock(block, start, node)
::CONTINUE::
end
self.nodes[block] = node
+ if block.type == 'repeat' then
+ self:lookIntoChild(block.filter, node)
+ end
if block.type == 'do'
or block.type == 'loop'
or block.type == 'in'