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

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

[nongnu] elpa/dart-mode e94acb5 168/192: Fontify SCREAMING_CAPS words of


From: ELPA Syncer
Subject: [nongnu] elpa/dart-mode e94acb5 168/192: Fontify SCREAMING_CAPS words of length greater than two as constant
Date: Sun, 29 Aug 2021 11:02:11 -0400 (EDT)

branch: elpa/dart-mode
commit e94acb5e37908b9f063e4a8648ae5f69e86b0eec
Author: Brady Trainor <mail@bradyt.com>
Commit: Brady Trainor <mail@bradyt.com>

    Fontify SCREAMING_CAPS words of length greater than two as constant
---
 dart-mode.el | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/dart-mode.el b/dart-mode.el
index 429beee..b209d04 100644
--- a/dart-mode.el
+++ b/dart-mode.el
@@ -439,6 +439,11 @@ indentation levels from right to left."
 
 (defvar dart--types-re (rx (eval (dart--identifier 'upper))))
 
+(defvar dart--constants-re (rx (and word-start
+                                    upper
+                                    (>= 2 (or upper ?_))
+                                    word-end)))
+
 (defun dart--string-interpolation-id-func (limit)
   "Font-lock matcher for string interpolation identifiers.
 
@@ -682,6 +687,7 @@ fontify as declared variables. From ECMA-408,
     (,dart--hex-number-re                 . (1 font-lock-constant-face))
     (,dart--number-re                     . (1 font-lock-constant-face))
     (,dart--metadata-re                   . font-lock-constant-face)
+    (,dart--constants-re                   . font-lock-constant-face)
     (,(regexp-opt dart--types 'words)     . font-lock-type-face)
     (,dart--types-re                      . font-lock-type-face)
     (dart--function-declaration-func      . font-lock-function-name-face)))



reply via email to

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