@@ -6692,16 +6692,22 @@ class BodyBuilder extends StackListenerImpl
6692
6692
node = forest.createIfMapEntry (
6693
6693
offsetForToken (ifToken), condition.expression, entry);
6694
6694
} else {
6695
- node = forest.createIfCaseMapEntry (
6696
- offsetForToken (ifToken), condition.expression, patternGuard, entry);
6695
+ node = forest.createIfCaseMapEntry (offsetForToken (ifToken),
6696
+ prelude: [],
6697
+ expression: condition.expression,
6698
+ patternGuard: patternGuard,
6699
+ then: entry);
6697
6700
}
6698
6701
} else {
6699
6702
if (patternGuard == null ) {
6700
6703
node = forest.createIfElement (
6701
6704
offsetForToken (ifToken), condition.expression, toValue (entry));
6702
6705
} else {
6703
6706
node = forest.createIfCaseElement (offsetForToken (ifToken),
6704
- condition.expression, patternGuard, toValue (entry));
6707
+ prelude: [],
6708
+ expression: condition.expression,
6709
+ patternGuard: patternGuard,
6710
+ then: toValue (entry));
6705
6711
}
6706
6712
}
6707
6713
push (node);
@@ -6747,7 +6753,11 @@ class BodyBuilder extends StackListenerImpl
6747
6753
condition.expression, thenEntry, elseEntry);
6748
6754
} else {
6749
6755
node = forest.createIfCaseMapEntry (offsetForToken (ifToken),
6750
- condition.expression, patternGuard, thenEntry, elseEntry);
6756
+ prelude: [],
6757
+ expression: condition.expression,
6758
+ patternGuard: patternGuard,
6759
+ then: thenEntry,
6760
+ otherwise: elseEntry);
6751
6761
}
6752
6762
} else if (elseEntry is ControlFlowElement ) {
6753
6763
MapLiteralEntry ? elseMapEntry = elseEntry
@@ -6758,7 +6768,11 @@ class BodyBuilder extends StackListenerImpl
6758
6768
condition.expression, thenEntry, elseMapEntry);
6759
6769
} else {
6760
6770
node = forest.createIfCaseMapEntry (offsetForToken (ifToken),
6761
- condition.expression, patternGuard, thenEntry, elseMapEntry);
6771
+ prelude: [],
6772
+ expression: condition.expression,
6773
+ patternGuard: patternGuard,
6774
+ then: thenEntry,
6775
+ otherwise: elseMapEntry);
6762
6776
}
6763
6777
} else {
6764
6778
int offset = elseEntry.fileOffset;
@@ -6788,7 +6802,11 @@ class BodyBuilder extends StackListenerImpl
6788
6802
condition.expression, thenMapEntry, elseEntry);
6789
6803
} else {
6790
6804
node = forest.createIfCaseMapEntry (offsetForToken (ifToken),
6791
- condition.expression, patternGuard, thenMapEntry, elseEntry);
6805
+ prelude: [],
6806
+ expression: condition.expression,
6807
+ patternGuard: patternGuard,
6808
+ then: thenMapEntry,
6809
+ otherwise: elseEntry);
6792
6810
}
6793
6811
} else {
6794
6812
int offset = thenEntry.fileOffset;
@@ -6813,12 +6831,12 @@ class BodyBuilder extends StackListenerImpl
6813
6831
node = forest.createIfElement (offsetForToken (ifToken),
6814
6832
condition.expression, toValue (thenEntry), toValue (elseEntry));
6815
6833
} else {
6816
- node = forest.createIfCaseElement (
6817
- offsetForToken (ifToken) ,
6818
- condition.expression,
6819
- condition.patternGuard! ,
6820
- toValue (thenEntry),
6821
- toValue (elseEntry));
6834
+ node = forest.createIfCaseElement (offsetForToken (ifToken),
6835
+ prelude : [] ,
6836
+ expression : condition.expression,
6837
+ patternGuard : condition.patternGuard! ,
6838
+ then : toValue (thenEntry),
6839
+ otherwise : toValue (elseEntry));
6822
6840
}
6823
6841
}
6824
6842
push (node);
0 commit comments