mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/jpexs-decompiler.git
synced 2026-06-05 18:15:09 +00:00
Harman air - Null coalesce and nullish member access operators - WIP
This commit is contained in:
@@ -3352,7 +3352,8 @@ public class Graph {
|
||||
} else {
|
||||
ternarOnFalse = filteredOnFalse.get(0).value;
|
||||
}
|
||||
stack.push(new TernarOpItem(null, localData.lineStartInstruction, expr.invert(null), ternarOnTrue, ternarOnFalse));
|
||||
TernarOpItem top = new TernarOpItem(null, localData.lineStartInstruction, expr.invert(null), ternarOnTrue, ternarOnFalse);
|
||||
stack.push(handleTernar(top, localData));
|
||||
} else {
|
||||
boolean isIf = true;
|
||||
//If the ontrue is empty, switch ontrue and onfalse
|
||||
@@ -4292,4 +4293,14 @@ public class Graph {
|
||||
protected boolean partIsSwitch(GraphPart part) {
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Replaces ternar with custom value
|
||||
* @param ternar Ternar
|
||||
* @param localData Local data
|
||||
* @return Custom item
|
||||
*/
|
||||
protected GraphTargetItem handleTernar(TernarOpItem ternar, BaseLocalData localData) {
|
||||
return ternar;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user