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

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

[nongnu] elpa/swift-mode 4ac4ea3 098/496: Add font-lock for declaration


From: ELPA Syncer
Subject: [nongnu] elpa/swift-mode 4ac4ea3 098/496: Add font-lock for declaration expression with destructuring
Date: Sun, 29 Aug 2021 11:33:15 -0400 (EDT)

branch: elpa/swift-mode
commit 4ac4ea3df2b215d6d446d0aba39cc07dfabd86b2
Author: ap4y <lod@pisem.net>
Commit: ap4y <lod@pisem.net>

    Add font-lock for declaration expression with destructuring
---
 swift-mode.el           | 4 +++-
 test/font-lock-tests.el | 2 ++
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/swift-mode.el b/swift-mode.el
index 5dceffc..d0b4caf 100644
--- a/swift-mode.el
+++ b/swift-mode.el
@@ -298,7 +298,9 @@
                               (or ,@swift-mode--val-decl-keywords)
                               eow
                               (+ space)
-                              (group (? "`") bow (+ word) eow (? "`")))
+                              (? "(")
+                              (group (+ (or (+ (? ?`) word (? ?`)) ?, space)))
+                              (? ")"))
                         t)
           (list 1 font-lock-variable-name-face))
 
diff --git a/test/font-lock-tests.el b/test/font-lock-tests.el
index 5a1277a..361ba62 100644
--- a/test/font-lock-tests.el
+++ b/test/font-lock-tests.el
@@ -126,6 +126,8 @@ test will fail."
 (check-face let-bind/has-variable-face/1 font-lock-variable-name-face "let 
{{x}} = y")
 (check-face let-bind/has-variable-face/2 font-lock-variable-name-face "let 
{{foo}} = y")
 (check-face let-bind/has-variable-face/3 font-lock-variable-name-face "let 
{{x}}: T = y")
+(check-face let-bind/has-variable-face/4 font-lock-variable-name-face "let 
({{foo}}, bar) = y")
+(check-face let-bind/has-variable-face/5 font-lock-variable-name-face "let 
(foo, {{bar}}) = y")
 (check-face let-bind-type-ann/has-type-face/1 font-lock-type-face "let x: 
{{T}} = y")
 (check-face let-bind-type-ann/has-type-face/2 font-lock-type-face "let x: 
{{Type}} = y")
 



reply via email to

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