mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/jpexs-decompiler.git
synced 2026-09-25 11:01:10 +00:00
localData class added
This commit is contained in:
@@ -16,6 +16,7 @@
|
||||
*/
|
||||
package com.jpexs.decompiler.graph.model;
|
||||
|
||||
import com.jpexs.decompiler.flash.action.model.ConstantPool;
|
||||
import com.jpexs.decompiler.flash.helpers.HilightedTextWriter;
|
||||
import com.jpexs.decompiler.graph.Block;
|
||||
import com.jpexs.decompiler.graph.Graph;
|
||||
@@ -23,6 +24,7 @@ import com.jpexs.decompiler.graph.GraphSourceItem;
|
||||
import com.jpexs.decompiler.graph.GraphTargetItem;
|
||||
import com.jpexs.decompiler.graph.SourceGenerator;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
public class IfItem extends GraphTargetItem implements Block {
|
||||
@@ -52,7 +54,7 @@ public class IfItem extends GraphTargetItem implements Block {
|
||||
}
|
||||
|
||||
@Override
|
||||
public HilightedTextWriter toString(HilightedTextWriter writer, List<Object> localData) {
|
||||
public HilightedTextWriter toString(HilightedTextWriter writer, LocalData localData) {
|
||||
GraphTargetItem expr = expression;
|
||||
List<GraphTargetItem> ifBranch = onTrue;
|
||||
List<GraphTargetItem> elseBranch = onFalse;
|
||||
@@ -78,7 +80,7 @@ public class IfItem extends GraphTargetItem implements Block {
|
||||
hilight(Graph.INDENTOPEN, writer).appendNewLine();
|
||||
for (GraphTargetItem ti : ifBranch) {
|
||||
if (!ti.isEmpty()) {
|
||||
ti.toStringSemicoloned(writer, localData).appendNewLine();
|
||||
ti.toStringSemicoloned(writer, localData.constants).appendNewLine();
|
||||
}
|
||||
}
|
||||
hilight(Graph.INDENTCLOSE, writer).appendNewLine();
|
||||
@@ -90,7 +92,7 @@ public class IfItem extends GraphTargetItem implements Block {
|
||||
hilight(Graph.INDENTOPEN, writer).appendNewLine();
|
||||
for (GraphTargetItem ti : elseBranch) {
|
||||
if (!ti.isEmpty()) {
|
||||
ti.toStringSemicoloned(writer, localData).appendNewLine();
|
||||
ti.toStringSemicoloned(writer, localData.constants).appendNewLine();
|
||||
}
|
||||
}
|
||||
hilight(Graph.INDENTCLOSE, writer).appendNewLine();
|
||||
|
||||
Reference in New Issue
Block a user