mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/jpexs-decompiler.git
synced 2026-06-28 19:05:35 +00:00
AS3 p-code more RAbcDasm like: commas in parameters list (WARNING: Breaks backward compatibility)
This commit is contained in:
@@ -230,6 +230,9 @@ public class AVM2Instruction implements Cloneable, GraphSourceItem {
|
||||
public String getParams(AVM2ConstantPool constants, List<DottedChain> fullyQualifiedNames) {
|
||||
StringBuilder s = new StringBuilder();
|
||||
for (int i = 0; i < definition.operands.length; i++) {
|
||||
if (i > 0) {
|
||||
s.append(",");
|
||||
}
|
||||
switch (definition.operands[i]) {
|
||||
case AVM2Code.DAT_NAMESPACE_INDEX:
|
||||
if (operands[i] == 0) {
|
||||
@@ -373,8 +376,11 @@ public class AVM2Instruction implements Cloneable, GraphSourceItem {
|
||||
|
||||
public String toStringNoAddress(AVM2ConstantPool constants, List<DottedChain> fullyQualifiedNames) {
|
||||
String s = definition.instructionName;
|
||||
for (int i = s.length(); i < 19; i++) {
|
||||
s += " ";
|
||||
}
|
||||
s += getParams(constants, fullyQualifiedNames) + getComment();
|
||||
return s;
|
||||
return s.trim();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -854,6 +854,12 @@ public class ASM3Parser {
|
||||
|
||||
for (int i = 0; i < def.operands.length; i++) {
|
||||
ParsedSymbol parsedOperand = lexer.lex();
|
||||
if (i > 0) {
|
||||
if (parsedOperand.type != ParsedSymbol.TYPE_COMMA) {
|
||||
throw new AVM2ParseException("Comma (,) expected", lexer.yyline());
|
||||
}
|
||||
parsedOperand = lexer.lex();
|
||||
}
|
||||
switch (def.operands[i]) {
|
||||
case AVM2Code.DAT_MULTINAME_INDEX:
|
||||
lexer.pushback(parsedOperand);
|
||||
|
||||
Reference in New Issue
Block a user