mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/jpexs-decompiler.git
synced 2026-06-02 06:05:32 +00:00
AS3 parser: easier debugging
This commit is contained in:
@@ -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<ABC> playerABCs = new ArrayList<>();
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -215,7 +215,7 @@ public abstract class GraphTargetItem implements Serializable {
|
||||
return ret;
|
||||
}
|
||||
|
||||
protected List<GraphSourceItem> toSourceMerge(SourceGeneratorLocalData localData, SourceGenerator gen, Object... tar) {
|
||||
public static List<GraphSourceItem> toSourceMerge(SourceGeneratorLocalData localData, SourceGenerator gen, Object... tar) {
|
||||
List<GraphSourceItem> ret = new ArrayList<>();
|
||||
for (Object o : tar) {
|
||||
if (o == null) {
|
||||
|
||||
Reference in New Issue
Block a user