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

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

[nongnu] elpa/raku-mode bb9f553d91 079/253: Highlight solitary colon (:)


From: ELPA Syncer
Subject: [nongnu] elpa/raku-mode bb9f553d91 079/253: Highlight solitary colon (:) operator
Date: Sat, 29 Jan 2022 08:28:44 -0500 (EST)

branch: elpa/raku-mode
commit bb9f553d91f4b76b02d4d71c37f446d41a687f4a
Author: Hinrik Örn Sigurðsson <hinrik.sig@gmail.com>
Commit: Hinrik Örn Sigurðsson <hinrik.sig@gmail.com>

    Highlight solitary colon (:) operator
---
 perl6-font-lock.el | 16 +++++++---------
 1 file changed, 7 insertions(+), 9 deletions(-)

diff --git a/perl6-font-lock.el b/perl6-font-lock.el
index f060a17af7..ee0116c75d 100644
--- a/perl6-font-lock.el
+++ b/perl6-font-lock.el
@@ -10,10 +10,6 @@
   "Face for identifiers in Perl 6."
   :group 'perl6-faces)
 
-(defface perl6-package-colons '((t :inherit default))
-  "Face for double colons in Perl 6 package names."
-  :group 'perl6-faces)
-
 (defface perl6-number '((t :inherit font-lock-constant-face))
   "Face for number literals in Perl 6."
   :group 'perl6-faces)
@@ -153,7 +149,7 @@
        . ,(rx (or "div" "xx" "x" "mod" "also" "leg" "cmp" "before" "after" "eq"
                   "ne" "le" "lt" "not" "gt" "eqv" "ff" "fff" "and" "andthen"
                   "or" "xor" "orelse" "extra" "lcm" "gcd")))
-      (operator-char . ,(rx (any "-+/*~?|=^!%&,<>».;\\∈∉∋∌∩∪≼≽⊂⊃⊄⊅⊆⊇⊈⊉⊍⊎⊖∅")))
+      (operator-char . ,(rx (any "-:+/*~?|=^!%&,<>».;\\∈∉∋∌∩∪≼≽⊂⊃⊄⊅⊆⊇⊈⊉⊍⊎⊖∅")))
       (set-operator
        . ,(rx (opt "R")
               "\("
@@ -488,9 +484,6 @@ GROUPS is allowed to reference optional match groups."
     (,(perl6-rx (group symbol-start high-type) "(") 1 'perl6-type)
     (,(perl6-rx (group symbol-start identifier) "(") 1 'perl6-identifier)
     (,(perl6-rx (symbol (or low-type high-type))) 0 'perl6-type)
-    (,(rx (or (and "::" symbol-start)
-              (and symbol-end "::")))
-     0 'perl6-package-colons)
     (,(perl6-rx (group ":") (group (symbol identifier)))
      (1 'perl6-operator)
      (2 'perl6-string))
@@ -518,7 +511,12 @@ GROUPS is allowed to reference optional match groups."
                 (0+ space)
                 (group (symbol identifier)))
      1 'perl6-label)
-    (,(perl6-rx (symbol identifier)) 0 'perl6-identifier)
+    (,(perl6-rx
+       (opt "::")
+       identifier
+       (opt (0+ "::" identifier))
+       (opt "::"))
+     0 'perl6-identifier)
     (,(perl6-rx operator-char) 0 'perl6-operator)
     (,(perl6-rx base-number)
      (1 'perl6-number)



reply via email to

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