geforkt von Mirrors/FastAsyncWorldEdit
Added "switch" and "case" to the list of keywords so they can't be used as variable names.
Dieser Commit ist enthalten in:
Ursprung
4753574bae
Commit
61b2ea4007
@ -109,7 +109,7 @@ public class Lexer {
|
|||||||
characterTokens.add(':');
|
characterTokens.add(':');
|
||||||
}
|
}
|
||||||
|
|
||||||
private static final Set<String> keywords = new HashSet<String>(Arrays.asList("if", "else", "while", "do", "for", "break", "continue", "return"));
|
private static final Set<String> keywords = new HashSet<String>(Arrays.asList("if", "else", "while", "do", "for", "break", "continue", "return", "switch", "case"));
|
||||||
|
|
||||||
private static final Pattern numberPattern = Pattern.compile("^([0-9]*(?:\\.[0-9]+)?(?:[eE][+-]?[0-9]+)?)");
|
private static final Pattern numberPattern = Pattern.compile("^([0-9]*(?:\\.[0-9]+)?(?:[eE][+-]?[0-9]+)?)");
|
||||||
private static final Pattern identifierPattern = Pattern.compile("^([A-Za-z][0-9A-Za-z_]*)");
|
private static final Pattern identifierPattern = Pattern.compile("^([A-Za-z][0-9A-Za-z_]*)");
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren