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

break in loop control #230

Closed
wants to merge 1 commit into from
Closed

break in loop control #230

wants to merge 1 commit into from

Conversation

vitorpy
Copy link
Contributor

@vitorpy vitorpy commented Apr 3, 2024

Closes #114

Initial draft to validate the approach.

Basically, from here, I'd like to:

  • expand resolveStatements.ts to ensure break is always in a loop scope
  • include a failed test case for break outside of a loop
  • include a sequence of test cases for each loop type

If this approach sounds sensible, I'll build from here, otherwise I can drop this.

Checklist:

  • I have updated CHANGELOG.md
  • I have added unit tests to demonstrate the contribution is correctly implemented
  • I have run all the tests locally and no test failure was reported
  • I did not do unrelated and/or undiscussed refactorings

@@ -83,6 +83,9 @@ export function writeStatement(
}
}
return;
} else if (f.kind === "statement_break") {
ctx.append(`break ;`);
Copy link
Member

Choose a reason for hiding this comment

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

FunC does not support break at the moment, unfortunately

@vitorpy vitorpy closed this Apr 4, 2024
@vitorpy vitorpy deleted the break branch April 4, 2024 06:59
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.

break in loop control
2 participants