small regex fix

This commit is contained in:
Oystein Kristoffer Tveit 2021-02-24 10:32:13 +01:00
parent a3435e6138
commit bfc867b8fd

View File

@ -44,7 +44,7 @@ public class Java implements ProgrammingLanguage {
e("\\[|\\]", "squareBrackets"), e("\\[|\\]", "squareBrackets"),
e(";", "semicolon"), e(";", "semicolon"),
e("\\.\\w+\\b(?!\\()", "property"), e("\\.\\w+\\b(?!\\()", "property"),
e("[A-Z]\\w+", "identifier"), e("\\b[A-Z]\\w+\\b", "identifier"),
e("\\b(" + String.join("|", keywords) + ")\\b", e("\\b(" + String.join("|", keywords) + ")\\b",
"keyword"), "keyword"),
e("(?://.*)|(?:\\/?\\s?\\*.*)", "comment") e("(?://.*)|(?:\\/?\\s?\\*.*)", "comment")