-
Notifications
You must be signed in to change notification settings - Fork 4
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
[Feature] Implement control-flow statements continue
and break
for Kipper loop statements
#269
Comments
Hey there can you assign this issue to me? |
Sure! It's relatively simple since the syntax for This can be done during semantic analysis, which is handled here: PS: If you do start working on it, please create a new branch extending 183-feature-implement-functions-definitions-declarations-and-call-expressions-for-user-defined-functions, since that's the branch where currently return statements have been implemented and so there have been some changes to the handling of |
Alright got your point. Very lastly, |
First off ! I just wanted to say one thing. |
The semantic analysis function of So for testing, you can either build the project and run the CLI file Also considering that you will have to throw an error for the user, I would recommend creating a new function in Which calls this function here: To that, you likely will need to create a new error in And sure, if you finish the check the PR is good to go! :) |
Oh the feature is not implemented in any branch yet, just the 183-feature-implement-functions-definitions-declarations-and-call-expressions-for-user-defined-functions branch is where I have made changes to the class structure, so it's better if you fork and then make a new branch from there, so I can later merge it more easily :) |
Implemented by #417 and will be released in next release. |
Is there an existing proposal for this?
This feature does not exist in the latest version
Proposal
Implement control-flow statements and keywords
continue
andbreak
, which should be usable to either jump to the next iteration of a loop or stop a loop prematurely. The syntax and behaviour should be exactly the same as in the JS implementation and follow the guidelines/docs of MDN continue and MDN break.Exact behaviour / changes you want
break
.continue
.The text was updated successfully, but these errors were encountered: