Mirror von
https://github.com/IntellectualSites/FastAsyncWorldEdit.git
synchronisiert 2024-11-10 05:20:04 +01:00
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