emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] elpa/kotlin-mode 8e4018e7a5 044/162: Added new keywords to kotl


From: ELPA Syncer
Subject: [nongnu] elpa/kotlin-mode 8e4018e7a5 044/162: Added new keywords to kotlin-mode
Date: Sat, 29 Jan 2022 08:25:21 -0500 (EST)

branch: elpa/kotlin-mode
commit 8e4018e7a5f17199fff4f32f539408a534e4760f
Author: Remy Goldschmidt <taktoa@gmail.com>
Commit: Remy Goldschmidt <taktoa@gmail.com>

    Added new keywords to kotlin-mode
---
 kotlin-mode.el | 28 +++++++++++-----------------
 1 file changed, 11 insertions(+), 17 deletions(-)

diff --git a/kotlin-mode.el b/kotlin-mode.el
index aeb9d859d4..594b601761 100644
--- a/kotlin-mode.el
+++ b/kotlin-mode.el
@@ -59,7 +59,7 @@
   '("package" "import"))
 
 (defconst kotlin-mode--type-decl-keywords
-  '("class" "trait" "typealias"))
+  '("class" "trait" "typealias" "enum"))
 
 (defconst kotlin-mode--fun-decl-keywords
   '("fun"))
@@ -68,8 +68,14 @@
   '("val" "var"))
 
 (defconst kotlin-mode--statement-keywords
-  '("if" "else" "try" "while" "do"
-    "throw" "return" "continue" "break" "when" "is" "in"))
+  '(;; Branching
+    "if" "else"
+    ;; Exceptions
+    "try" "catch" "finally" "throw"
+    ;; Loops
+    "while" "for" "do" "continue" "break"
+    ;; Miscellaneous
+    "when" "is" "in"))
 
 (defconst kotlin-mode--context-variables-keywords
   '("this" "super"))
@@ -88,7 +94,8 @@
 
 (defconst kotlin-mode--modifier-keywords
   '("open" "private" "protected" "public"
-    "override" "abstract" "final"))
+    "override" "abstract" "final"
+    "annotation" "internal" "in" "out"))
 
 (defconst kotlin-mode--property-keywords
   '("by" "get" "set"))
@@ -146,19 +153,6 @@
        t)
      1 font-lock-keyword-face)
 
-    ;; try-catch-finally
-    ;; `catch' and `finally' are valid identifier being used as variable
-    (,(rx-to-string
-       `(and bow (group "catch") eow
-             (* space) (*? anything) "{" )
-       t)
-     1 font-lock-keyword-face)
-    (,(rx-to-string
-       `(and bow (group "finally") eow
-             (*? (or space ?\n)) "{")
-       t)
-     1 font-lock-keyword-face)
-
     ;; Properties
     ;; by/get/set are valid identifiers being used as variable
     ;; TODO: Highlight keywords in the property declaration statement



reply via email to

[Prev in Thread] Current Thread [Next in Thread]