mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/jpexs-decompiler.git
synced 2026-07-09 02:18:15 +00:00
Fixed AS1/2 - use slash syntax in get/setvariable only in eval/set
This commit is contained in:
@@ -79,8 +79,7 @@ public class GetVariableActionItem extends ActionItem {
|
||||
writer.append(IdentifiersDeobfuscation.printIdentifier(false, sb.toString()));
|
||||
return writer;
|
||||
}
|
||||
if ((name instanceof DirectValueActionItem) && (((DirectValueActionItem) name).isString()) && (printObfuscatedName || IdentifiersDeobfuscation.isValidNameWithDot(false, ((DirectValueActionItem) name).toStringNoQuotes(localData), "this", "super")
|
||||
|| IdentifiersDeobfuscation.isValidNameWithSlash(((DirectValueActionItem) name).toStringNoQuotes(localData), "this", "super"))) {
|
||||
if ((name instanceof DirectValueActionItem) && (((DirectValueActionItem) name).isString()) && (printObfuscatedName || IdentifiersDeobfuscation.isValidNameWithDot(false, ((DirectValueActionItem) name).toStringNoQuotes(localData), "this", "super"))) {
|
||||
HighlightData srcData = getSrcData();
|
||||
srcData.localName = name.toStringNoQuotes(localData);
|
||||
return stripQuotes(name, localData, writer);
|
||||
|
||||
@@ -83,8 +83,7 @@ public class SetVariableActionItem extends ActionItem implements SetTypeActionIt
|
||||
@Override
|
||||
public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) throws InterruptedException {
|
||||
if (((name instanceof DirectValueActionItem)) && (((DirectValueActionItem) name).isString())
|
||||
&& (IdentifiersDeobfuscation.isValidName(false, ((DirectValueActionItem) name).toStringNoQuotes(localData), "this", "super")
|
||||
|| IdentifiersDeobfuscation.isValidNameWithSlash(((DirectValueActionItem) name).toStringNoQuotes(localData), "this", "super"))) {
|
||||
&& (IdentifiersDeobfuscation.isValidName(false, ((DirectValueActionItem) name).toStringNoQuotes(localData), "this", "super"))) {
|
||||
HighlightData srcData = getSrcData();
|
||||
srcData.localName = name.toStringNoQuotes(localData);
|
||||
stripQuotes(name, localData, writer);
|
||||
|
||||
@@ -1660,7 +1660,7 @@ public class ActionScript2Parser {
|
||||
ret = new NotItem(null, null, expressionPrimary(false, inFunction, inMethod, inTellTarget, false, variables, functions, true, hasEval));
|
||||
} else {
|
||||
String varName = s.value.toString();
|
||||
if (s.type == SymbolType.PATH) { //only with slash syntax
|
||||
/*if (s.type == SymbolType.PATH) { //only with slash syntax
|
||||
ParsedSymbol s2 = lex();
|
||||
while (s2.type == SymbolType.COLON) {
|
||||
s2 = lex();
|
||||
@@ -1669,7 +1669,7 @@ public class ActionScript2Parser {
|
||||
s2 = lex();
|
||||
}
|
||||
lexer.pushback(s2);
|
||||
}
|
||||
}*/
|
||||
|
||||
ret = new VariableActionItem(varName, null, false);
|
||||
variables.add((VariableActionItem) ret);
|
||||
@@ -1913,7 +1913,6 @@ public class ActionScript2Parser {
|
||||
case IDENTIFIER:
|
||||
case THIS:
|
||||
case SUPER:
|
||||
case PATH:
|
||||
Reference<Boolean> allowMemberOrCallRef = new Reference<>(allowMemberOrCall);
|
||||
ret = handleVariable(s, ret, variables, allowMemberOrCallRef, inFunction, inMethod, inTellTarget, functions, hasEval);
|
||||
allowMemberOrCall = allowMemberOrCallRef.getVal();
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -175,8 +175,7 @@ public enum SymbolType {
|
||||
UNLOADMOVIE(GraphTargetItem.PRECEDENCE_PRIMARY, false),
|
||||
UNLOADMOVIENUM(GraphTargetItem.PRECEDENCE_PRIMARY, false),
|
||||
FSCOMMAND(GraphTargetItem.PRECEDENCE_PRIMARY, false),
|
||||
PREPROCESSOR(GraphTargetItem.PRECEDENCE_PRIMARY, false),
|
||||
PATH(GraphTargetItem.PRECEDENCE_PRIMARY, false);
|
||||
PREPROCESSOR(GraphTargetItem.PRECEDENCE_PRIMARY, false);
|
||||
|
||||
private int precedence = GraphTargetItem.NOPRECEDENCE;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user