Skip to content

Commit

Permalink
Fix C codegen issue with repeat until statement
Browse files Browse the repository at this point in the history
  • Loading branch information
edubart committed Jan 2, 2024
1 parent 85baf01 commit 4d4b2b1
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lualib/nelua/cgenerator.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1072,9 +1072,11 @@ function visitors.Repeat(context, node, emitter)
emitter:add_indent_ln("do {")
local scope = context:push_forked_scope(node)
scope.emit_repeat_stop = function(block_emitter)
context:push_node(node) -- to fix get_visiting_node() call
block_emitter:add_indent('_repeat_stop = ')
block_emitter:add_val2boolean(condnode)
block_emitter:add_ln(';')
context:pop_node(node)
end
emitter:add(blocknode)
context:pop_scope()
Expand Down

0 comments on commit 4d4b2b1

Please sign in to comment.