diff --git a/trunk/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/ActionScriptParser.java b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/ActionScriptParser.java index bd3f5d49b..a0afd6517 100644 --- a/trunk/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/ActionScriptParser.java +++ b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/ActionScriptParser.java @@ -1883,14 +1883,9 @@ public class ActionScriptParser { this.otherABCs = otherABCs; } - public static void main(String[] args) { - if (args.length < 2) { - return; - } - Main.initLogging(false); + public static void compile(String src, String dst) { + System.err.println("WARNING: AS3 compiler is not finished yet. This is only used for debuggging!"); try { - String src = args[0]; - String dst = args[1]; SWC swc = new SWC(new FileInputStream(Configuration.getPlayerSWC())); SWF swf = new SWF(swc.getSWF("library.swf"), true); List playerABCs = new ArrayList<>(); diff --git a/trunk/src/com/jpexs/decompiler/flash/console/CommandLineArgumentParser.java b/trunk/src/com/jpexs/decompiler/flash/console/CommandLineArgumentParser.java index 737379224..9da5cd52d 100644 --- a/trunk/src/com/jpexs/decompiler/flash/console/CommandLineArgumentParser.java +++ b/trunk/src/com/jpexs/decompiler/flash/console/CommandLineArgumentParser.java @@ -24,6 +24,7 @@ import com.jpexs.decompiler.flash.SWFBundle; import com.jpexs.decompiler.flash.SWFSourceInfo; import com.jpexs.decompiler.flash.SearchMode; import com.jpexs.decompiler.flash.abc.RenameType; +import com.jpexs.decompiler.flash.abc.avm2.parser.script.ActionScriptParser; import com.jpexs.decompiler.flash.configuration.Configuration; import com.jpexs.decompiler.flash.configuration.ConfigurationItem; import com.jpexs.decompiler.flash.exporters.modes.BinaryDataExportMode; @@ -276,6 +277,8 @@ public class CommandLineArgumentParser { parseRenameInvalidIdentifiers(args); } else if (nextParam.equals("-dumpswf")) { parseDumpSwf(args); + } else if (nextParam.equals("-as3compiler")) { + ActionScriptParser.compile(args.remove(),args.remove()); } else if (nextParam.equals("-help") || nextParam.equals("--help") || nextParam.equals("/?")) { printHeader(); printCmdLineUsage(); diff --git a/trunk/src/com/jpexs/decompiler/flash/gui/Main.java b/trunk/src/com/jpexs/decompiler/flash/gui/Main.java index 05c4cfd9a..b9a8ac6f6 100644 --- a/trunk/src/com/jpexs/decompiler/flash/gui/Main.java +++ b/trunk/src/com/jpexs/decompiler/flash/gui/Main.java @@ -25,7 +25,6 @@ import com.jpexs.decompiler.flash.SWFSourceInfo; import com.jpexs.decompiler.flash.SearchMode; import com.jpexs.decompiler.flash.Version; import com.jpexs.decompiler.flash.abc.avm2.AVM2Code; -import com.jpexs.decompiler.flash.abc.avm2.parser.script.ActionScriptParser; import com.jpexs.decompiler.flash.configuration.Configuration; import com.jpexs.decompiler.flash.console.CommandLineArgumentParser; import com.jpexs.decompiler.flash.console.ContextMenuTools; diff --git a/trunk/src/com/jpexs/decompiler/graph/GraphTargetItem.java b/trunk/src/com/jpexs/decompiler/graph/GraphTargetItem.java index 1c7ea34b7..859eec944 100644 --- a/trunk/src/com/jpexs/decompiler/graph/GraphTargetItem.java +++ b/trunk/src/com/jpexs/decompiler/graph/GraphTargetItem.java @@ -215,7 +215,7 @@ public abstract class GraphTargetItem implements Serializable { return ret; } - protected List toSourceMerge(SourceGeneratorLocalData localData, SourceGenerator gen, Object... tar) { + public static List toSourceMerge(SourceGeneratorLocalData localData, SourceGenerator gen, Object... tar) { List ret = new ArrayList<>(); for (Object o : tar) { if (o == null) {