mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/jpexs-decompiler.git
synced 2026-06-04 15:14:49 +00:00
removed some unnecessary parameters + small fixes
This commit is contained in:
@@ -58,6 +58,10 @@ public class IdentifiersDeobfuscation {
|
||||
|
||||
private static final Pattern IDENTIFIER_PATTERN = Pattern.compile("^[" + VALID_FIRST_CHARACTERS + "][" + VALID_NEXT_CHARACTERS + "]*$");
|
||||
|
||||
private static final Pattern VALID_NAME_PATTERN_DOT = Pattern.compile("^[a-zA-Z_\\$][a-zA-Z0-9_.\\$]*$");
|
||||
|
||||
private static final Pattern IDENTIFIER_PATTERN_DOT = Pattern.compile("^[" + VALID_FIRST_CHARACTERS + "][" + VALID_NEXT_CHARACTERS + ".]*$");
|
||||
|
||||
public static final String FOO_CHARACTERS = "bcdfghjklmnpqrstvwz";
|
||||
|
||||
public static final String FOO_JOIN_CHARACTERS = "aeiouy";
|
||||
@@ -228,6 +232,28 @@ public class IdentifiersDeobfuscation {
|
||||
return null;
|
||||
}
|
||||
|
||||
public static boolean isValidNameWithDot(boolean as3, String s, String... exceptions) {
|
||||
for (String e : exceptions) {
|
||||
if (e.equals(s)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
if (isReservedWord(s, as3)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// simple fast test
|
||||
if (VALID_NAME_PATTERN_DOT.matcher(s).matches()) {
|
||||
return true;
|
||||
}
|
||||
// unicode test
|
||||
if (IDENTIFIER_PATTERN_DOT.matcher(s).matches()) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public static boolean isValidName(boolean as3, String s, String... exceptions) {
|
||||
for (String e : exceptions) {
|
||||
if (e.equals(s)) {
|
||||
|
||||
Reference in New Issue
Block a user