diff --git a/src/main/java/mchorse/mappet/client/gui/scripts/highlights/Highlighters.java b/src/main/java/mchorse/mappet/client/gui/scripts/highlights/Highlighters.java index f25c8e61..64365333 100644 --- a/src/main/java/mchorse/mappet/client/gui/scripts/highlights/Highlighters.java +++ b/src/main/java/mchorse/mappet/client/gui/scripts/highlights/Highlighters.java @@ -106,18 +106,25 @@ public static void initiate() if (!kts.isFile()) { SyntaxHighlighter ktsHighlighter = new SyntaxHighlighter(); - ktsHighlighter.operators = ImmutableSet.of("+", "-", "=", "/", "*", "<", ">", "~", "&", "|", "!"); + ktsHighlighter.operators = ImmutableSet.of("+", "-", "=", "/", "*", "<", ">", "~", "&", "|", "!", "..", "->"); ktsHighlighter.primaryKeywords = ImmutableSet.of( - "break", "continue", "switch", "case", "default", "try", + "break", "continue", "switch", "case", "try", "catch", "delete", "do", "while", "else", "finally", "if", - "else", "for", "each", "in", "instanceof", - "new", "throw", "typeof", "with", "yield", "return" + "else", "for", "is", "as", "in", "instanceof", + "new", "throw", "typeof", "with", "yield", "when", "return", + "by", "constructor", "delegate", "dynamic", "field", "get", "set", "init", "value", + "where", "actual", "annotation", "companion", "field", "external", "infix", "inline", "inner", "internal", + "open", "operator", "out", "override", "suspend", "vararg" ); - ktsHighlighter.secondaryKeywords = ImmutableSet.of("const", "function", "var", "let", "prototype", "Math", "JSON", "mappet"); - ktsHighlighter.special = ImmutableSet.of("this", "arguments"); - ktsHighlighter.typeKeywords = ImmutableSet.of("true", "false", "null", "undefined"); + ktsHighlighter.secondaryKeywords = ImmutableSet.of( + "abstract", "extends", "final", "implements", "interface", "super", "throws", + "data", "class", "fun", "var", "val", "import", "Java", "JSON", "mappet" + ); + ktsHighlighter.special = ImmutableSet.of("this", "it"); + ktsHighlighter.typeKeywords = ImmutableSet.of("true", "false", "null", "undefined", "enum"); ktsHighlighter.functionName = Pattern.compile("[\\w_][\\d\\w_]*", Pattern.CASE_INSENSITIVE); + writeHighlighter(kts, ktsHighlighter); } }