Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 3 commits into from
Dec 18, 2022
Merged

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

merged 3 commits into from
Dec 18, 2022

Conversation

MarkusFreitag
Copy link
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

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

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
Collaborator Author

TODO: update the documentation

Signed-off-by: Flipez <code@brauser.io>
@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