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

Implement translation for break node #221

Merged
merged 1 commit into from
Aug 28, 2024
Merged

Implement translation for break node #221

merged 1 commit into from
Aug 28, 2024

Conversation

egiurleo
Copy link

Closes #53

Test plan

See included automated tests.

@egiurleo egiurleo self-assigned this Aug 27, 2024

# with arguments
while true
break foo
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I did not know that break took arguments 😅

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've seen lots of reasons to use next with values (e.g. "early return" from a block passed to Promise#then, but not actually return out of the surrounding def method), but never break, haha

@egiurleo egiurleo requested review from amomchilov, a team and andyw8 August 27, 2024 14:22
Copy link

@amomchilov amomchilov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚂

parser/prism/Translator.cc Outdated Show resolved Hide resolved

# with arguments
while true
break foo

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've seen lots of reasons to use next with values (e.g. "early return" from a block passed to Promise#then, but not actually return out of the surrounding def method), but never break, haha

@egiurleo egiurleo merged commit e1524fb into prism Aug 28, 2024
1 check passed
@egiurleo egiurleo deleted the emily/break branch August 28, 2024 14:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Implement translation for PM_BREAK_NODE
2 participants