Skip to content

Commit 2b2a3d8

Browse files
committed
Minor Change
1 parent 0c1b480 commit 2b2a3d8

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

liquidjava-verifier/src/main/java/liquidjava/utils/VariableFormatter.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,12 @@
11
package liquidjava.utils;
22

3-
import java.util.Arrays;
43
import java.util.regex.Matcher;
54
import java.util.regex.Pattern;
65

76
public final class VariableFormatter {
87
private static final Pattern INSTACE_VAR_PATTERN = Pattern.compile("^#(.+)_([0-9]+)$");
98
private static final Pattern INSTANCE_VAR_TEXT_PATTERN = Pattern.compile("#[^\\s,;:()\\[\\]{}]+_[0-9]+");
109
private static final char[] SUPERSCRIPT_CHARS = { '⁰', '¹', '²', '³', '⁴', '⁵', '⁶', '⁷', '⁸', '⁹' };
11-
private static final String[] SPECIAL_IDENTIFIERS = { "fresh", "ret" };
1210

1311
public static String formatVariable(String name) {
1412
if (name == null)
@@ -50,6 +48,6 @@ private static String toSuperscript(String number) {
5048
}
5149

5250
private static boolean isSpecialIdentifier(String id) {
53-
return Arrays.stream(SPECIAL_IDENTIFIERS).anyMatch(s -> s.equals(id));
51+
return id == "fresh" || id == "ret";
5452
}
5553
}

0 commit comments

Comments
 (0)