Skip to content

Commit

Permalink
Decompose the expression of while loop for readability. (#167)
Browse files Browse the repository at this point in the history
  • Loading branch information
Paalon authored Jun 12, 2024
1 parent d2c2ed7 commit 5531ded
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/composer.jl
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,9 @@ function _compose_sequence_node(start_event::SequenceStartEvent, composer, ancho
composer.anchors[anchor] = node
end

while (event = peek(composer.input)) !== nothing
while true
event = peek(composer.input)
event === nothing && break
__compose_sequence_node(event, composer, node) || break
end

Expand Down

0 comments on commit 5531ded

Please sign in to comment.