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

[feature] chaining blocks and instructions #97

Open
glelouet opened this issue Feb 22, 2021 · 1 comment
Open

[feature] chaining blocks and instructions #97

glelouet opened this issue Feb 22, 2021 · 1 comment
Labels

Comments

@glelouet
Copy link
Contributor

glelouet commented Feb 22, 2021

I think it may be better to have some kind of navigation inside the blocks. Typically I can create a sub block in a JBlock, why not also be able to go back ?

Here is an example : to represent

if(a) {
 for(int i=0;i>0;){ }
} else {
 while(true){}
}

a call would be ( assuming bl is the current block)

bl._if(a) // create a if and go in the then block
 ._for(integer, "i", lit(0)) // create a for 
 .test(fr->fr.var("i").lt(a 0)) // make the <0
.update() // and go in the for block with a new variable
 .up() // return in the then
 .elseBlock()
 ._while(cm.true);

I started working on this in the branch https://github.com/guiguilechat/jcodemodel/tree/blockrework

@stale
Copy link

stale bot commented Jun 9, 2021

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix label Jun 9, 2021
@phax phax added pinned and removed wontfix labels Jun 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants