Skip to content

[evaluator/while]: Add support for break#168

Merged
Flipez merged 3 commits intomainfrom
while-break-support
Dec 18, 2022
Merged

[evaluator/while]: Add support for break#168
Flipez merged 3 commits intomainfrom
while-break-support

Conversation

@MarkusFreitag
Copy link
Copy Markdown
Collaborator

while loops currently do not support break statements, the following PoC runs endlessly.

count = 0
i = 0
while (i >= 0)
  count = count + 1
  puts(i)
  if (true)
    break
  end
  i = i - 1
end
puts(count)

@MarkusFreitag MarkusFreitag requested a review from Flipez as a code owner December 9, 2022 17:54
@vercel
Copy link
Copy Markdown

vercel bot commented Dec 9, 2022

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated
rocket-lang ✅ Ready (Inspect) Visit Preview Dec 18, 2022 at 0:42AM (UTC)
rocket-lang-play ✅ Ready (Inspect) Visit Preview Dec 18, 2022 at 0:42AM (UTC)

@codecov
Copy link
Copy Markdown

codecov bot commented Dec 9, 2022

Codecov Report

Merging #168 (99a4fd7) into main (4ce7753) will increase coverage by 0.01%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main     #168      +/-   ##
==========================================
+ Coverage   87.24%   87.25%   +0.01%     
==========================================
  Files         106      106              
  Lines        3621     3624       +3     
==========================================
+ Hits         3159     3162       +3     
  Misses        396      396              
  Partials       66       66              
Impacted Files Coverage Δ
evaluator/while.go 100.00% <100.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@MarkusFreitag
Copy link
Copy Markdown
Collaborator Author

TODO: update the documentation

Signed-off-by: Flipez <[email protected]>
@Flipez Flipez changed the title evaluator: add break support for while loops [evaluator/while]: Add support for break Dec 18, 2022
@Flipez Flipez added the bug Something isn't working label Dec 18, 2022
@Flipez Flipez merged commit 44d0c79 into main Dec 18, 2022
@Flipez Flipez deleted the while-break-support branch December 18, 2022 12:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants