mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/jpexs-decompiler.git
synced 2026-09-27 20:00:45 +00:00
Fixed AS 1/2 direct editation - newline as "\n", not "\r"
Fixed AS 1/2 allow various nonstandard names for definelocal
This commit is contained in:
+2
-1
@@ -83,7 +83,8 @@ public class DefineLocalActionItem extends ActionItem implements SetTypeActionIt
|
||||
HighlightData srcData = getSrcData();
|
||||
srcData.localName = name.toStringNoQuotes(localData);
|
||||
srcData.declaration = true;
|
||||
if (((name instanceof DirectValueActionItem)) && (((DirectValueActionItem) name).isString()) && (!IdentifiersDeobfuscation.isValidName(false, ((DirectValueActionItem) name).toStringNoQuotes(localData), "this", "super"))) {
|
||||
if (((name instanceof DirectValueActionItem)) && (((DirectValueActionItem) name).isString()) && (!IdentifiersDeobfuscation.isValidName(false, ((DirectValueActionItem) name).toStringNoQuotes(localData),
|
||||
"this", "super", "true", "false", "NaN", "null", "newline", "Infinity", "undefined", "get", "set", "each"))) {
|
||||
IdentifiersDeobfuscation.appendObfuscatedIdentifier(((DirectValueActionItem) name).toStringNoQuotes(localData), writer);
|
||||
} else {
|
||||
stripQuotes(name, localData, writer);
|
||||
|
||||
+5
-2
@@ -1003,7 +1003,10 @@ public class ActionScript2Parser {
|
||||
break;
|
||||
case VAR:
|
||||
s = lex();
|
||||
expected(s, lexer.yyline(), SymbolType.IDENTIFIER);
|
||||
expected(s, lexer.yyline(), SymbolType.IDENTIFIER,
|
||||
SymbolType.TRUE, SymbolType.FALSE, SymbolGroup.GLOBALCONST,
|
||||
SymbolType.GET, SymbolType.SET,
|
||||
SymbolType.EACH);
|
||||
String varIdentifier = s.value.toString();
|
||||
s = lex();
|
||||
if (s.type == SymbolType.COLON) {
|
||||
@@ -1783,7 +1786,7 @@ public class ActionScript2Parser {
|
||||
allowMemberOrCall = true;
|
||||
break;
|
||||
case NEWLINE:
|
||||
ret = new DirectValueActionItem(null, null, 0, "\r", new ArrayList<>());
|
||||
ret = new DirectValueActionItem(null, null, 0, "\n", new ArrayList<>());
|
||||
allowMemberOrCall = true;
|
||||
break;
|
||||
case NAN:
|
||||
|
||||
Reference in New Issue
Block a user