I have had same issue (with JMP15.2.1).
I managed to repeat it but I'm not sure how reliable this is:
1. Start with:
Expr(
if(
//example inside here IF
//example inside here IF
//example inside here IF
);
//example inside here EXPR
//example inside here EXPR
//example inside here EXPR
);
2. Remove ); from row 6:
Expr(
if(
//example inside here IF
//example inside here IF
//example inside here IF
//example inside here EXPR
//example inside here EXPR
//example inside here EXPR
);
3. Press enter on row 5 and add new if statement:
Expr(
if(
//example inside here IF
//example inside here IF
//example inside here IF
if(
);
//example inside here EXPR
//example inside here EXPR
//example inside here EXPR
);
4. Remove new If( but leave );
Expr(
if(
//example inside here IF
//example inside here IF
//example inside here IF
);
//example inside here EXPR
//example inside here EXPR
//example inside here EXPR
);
Images starting from part 3:
new if:
new if removed (something weird going on with code folding square):
afte re-opening script:
At least in this case seems like the code folding doesn't get properly updated if something is removed from the middle of code. For me it resolves usually by either rebooting JMP or just be closing and re-opening the script.
-Jarmo