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

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

[nongnu] elpa/kotlin-mode eb2af1723e 07/10: Support value modifier


From: ELPA Syncer
Subject: [nongnu] elpa/kotlin-mode eb2af1723e 07/10: Support value modifier
Date: Tue, 17 Jan 2023 15:08:09 -0500 (EST)

branch: elpa/kotlin-mode
commit eb2af1723e23813a09d07a59f51ded293994f8a0
Author: taku0 <mxxouy6x3m_github@tatapa.org>
Commit: taku0 <mxxouy6x3m_github@tatapa.org>

    Support value modifier
---
 kotlin-mode-lexer.el | 7 ++++---
 test/pathological.kt | 7 +++++++
 2 files changed, 11 insertions(+), 3 deletions(-)

diff --git a/kotlin-mode-lexer.el b/kotlin-mode-lexer.el
index cf37034d84..0402325443 100644
--- a/kotlin-mode-lexer.el
+++ b/kotlin-mode-lexer.el
@@ -578,7 +578,7 @@ expression as a token with one of the following types:
   '("vararg" "crossinline" "noinline"))
 
 (defconst kotlin-mode--function-modifier-keywords
-  '("tailrec" "operator" "infix" "inline" "external" "suspend"))
+  '("tailrec" "operator" "infix" "inline" "value" "external" "suspend"))
 
 (defconst kotlin-mode--modifier-keywords
   (append kotlin-mode--inheritance-modifier-keywords
@@ -644,8 +644,9 @@ expression as a token with one of the following types:
        ;; Labels
        (eq (kotlin-mode--token-type previous-token) 'label)
        ;; Modifiers
-       (member (kotlin-mode--token-text previous-token)
-               kotlin-mode--modifier-keywords))
+       (and (member (kotlin-mode--token-text previous-token)
+                    kotlin-mode--modifier-keywords)
+            (not (equal (kotlin-mode--token-text previous-token) "value"))))
       nil)
 
      ;; Tokens that cannot end a statement
diff --git a/test/pathological.kt b/test/pathological.kt
index 09e7c41801..c12342fe66 100644
--- a/test/pathological.kt
+++ b/test/pathological.kt
@@ -425,8 +425,15 @@ public
         )
         ->
         C
+
+    // value class
+
+    value
+        class Foo { // KNOWN_BUG
+    } // KNOWN_BUG
 }
 
+
 // statements
 fun foo() {
     //explicit semicolons



reply via email to

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