mirror of
https://github.com/i-net-software/JWebAssembly.git
synced 2025-03-25 07:27:52 +01:00
fix end detecting of ELSE block and sub structures in the THEN block.
This commit is contained in:
parent
40375316e2
commit
432baef4b4
@ -333,9 +333,6 @@ class BranchManger {
|
|||||||
BranchNode branch = null;
|
BranchNode branch = null;
|
||||||
for( ; i < parsedOperations.size(); i++ ) {
|
for( ; i < parsedOperations.size(); i++ ) {
|
||||||
ParsedBlock parsedBlock = parsedOperations.get( i );
|
ParsedBlock parsedBlock = parsedOperations.get( i );
|
||||||
if( parsedBlock.nextPosition > positions.elsePos ) {
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
if( parsedBlock.nextPosition == positions.elsePos && parsedBlock.op == JavaBlockOperator.GOTO && parsedBlock.startPosition < parsedBlock.endPosition ) {
|
if( parsedBlock.nextPosition == positions.elsePos && parsedBlock.op == JavaBlockOperator.GOTO && parsedBlock.startPosition < parsedBlock.endPosition ) {
|
||||||
parsedOperations.remove( i );
|
parsedOperations.remove( i );
|
||||||
// end position can not be outside of the parent
|
// end position can not be outside of the parent
|
||||||
@ -375,7 +372,9 @@ class BranchManger {
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
if( parsedBlock.nextPosition >= positions.elsePos ) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if( branch == null ) {
|
if( branch == null ) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user