diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2023-05-23 14:08:38 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2023-05-23 14:08:38 +0800 |
commit | 7aac1748434eda3726d1ed001edd1327c3973e0b (patch) | |
tree | 8e33cfa5fb954a168fcb04745aa3bad677d85981 /script/vm | |
parent | fc63802fca2c98643bcfc63bd251a7394536c1de (diff) | |
download | lua-language-server-7aac1748434eda3726d1ed001edd1327c3973e0b.zip |
trace filter of `repeat`
fix #2113
Diffstat (limited to 'script/vm')
-rw-r--r-- | script/vm/tracer.lua | 6 |
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' |