[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/swift-mode befeb2a 017/496: Highlight bools and nil as con
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/swift-mode befeb2a 017/496: Highlight bools and nil as constants |
Date: |
Sun, 29 Aug 2021 11:32:59 -0400 (EDT) |
branch: elpa/swift-mode
commit befeb2a58c33691eb074ebbbe0603c1cee42871c
Author: Chris Barrett <chris.d.barrett@me.com>
Commit: Chris Barrett <chris.d.barrett@me.com>
Highlight bools and nil as constants
---
swift-mode.el | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/swift-mode.el b/swift-mode.el
index 72616d5..4010462 100644
--- a/swift-mode.el
+++ b/swift-mode.el
@@ -62,6 +62,9 @@
swift-mode--contextual-keywords))
"Keywords used in the Swift language.")
+(defvar swift-mode--constants
+ '("true" "false" "nil"))
+
(defvar swift-mode--font-lock-defaults
(list
(list
@@ -107,6 +110,12 @@
(cons (rx (not (any word digit)) (group "_") (or eol (not (any word
digit))))
(list 1 font-lock-negation-char-face))
+ ;; Constants
+ ;;
+ ;; Highlight nil and boolean literals.
+ (cons (rx-to-string `(and bow (or ,@swift-mode--constants) eow))
+ font-lock-constant-face)
+
;; Attributes
;;
;; Use string face for attribute name.
- [nongnu] elpa/swift-mode 195d040 227/496: Merge pull request #76 from ap4y/batch_smie_fixes, (continued)
- [nongnu] elpa/swift-mode 195d040 227/496: Merge pull request #76 from ap4y/batch_smie_fixes, ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode dbf48a1 232/496: Merge pull request #90 from nathankot/flycheck-framework-search-paths, ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode e6f1a3c 237/496: More configurability for flycheck, ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode 3e8befa 238/496: Merge pull request #92 from apiology/more_flycheck_option_vars, ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode 31fb250 248/496: added elseguard to lexer, ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode 071cd18 249/496: Merge pull request #100 from uk-ar/enable-pairing-for-curly-bracket, ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode 7cefd8c 255/496: Fix token for generics, ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode c51eaf8 257/496: Fix token for ! & ?, ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode ce816a8 270/496: Fix backward-sexp test by adding brackets, ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode 85e05ea 271/496: Merge pull request #105 from uk-ar/fix-move-by-sexp, ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode befeb2a 017/496: Highlight bools and nil as constants,
ELPA Syncer <=
- [nongnu] elpa/swift-mode 654d5e2 006/496: More work on font locking, ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode c4943a8 025/496: Add to auto-mode-alist, ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode 0ad90f8 035/496: Fix a typo, ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode 19a61d9 022/496: fixup! Copy syntax table from rust-mode., ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode 406f2ba 028/496: Mention Emacs version in readme, ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode 2ca1425 026/496: Remove ackrc and travis yaml for now, ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode ec9243c 032/496: Tweaks to indentation, ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode 1b3ebe8 046/496: Remove obsolete require, ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode 90cdeb5 057/496: Configure travis, ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode 9714a0c 063/496: Fix docstring typo, ELPA Syncer, 2021/08/29