jcodemodel icon indicating copy to clipboard operation
jcodemodel copied to clipboard

[feature] chaining blocks and instructions

Open glelouet opened this issue 4 years ago • 1 comments

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

glelouet avatar Feb 22 '21 15:02 glelouet

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[bot] avatar Jun 09 '21 22:06 stale[bot]