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

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

[nongnu] elpa/raku-mode 1872efb95a 107/253: Highlight hyper operators


From: ELPA Syncer
Subject: [nongnu] elpa/raku-mode 1872efb95a 107/253: Highlight hyper operators
Date: Sat, 29 Jan 2022 08:28:46 -0500 (EST)

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

    Highlight hyper operators
---
 perl6-font-lock.el | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/perl6-font-lock.el b/perl6-font-lock.el
index f5722f2a34..71610aa2c5 100644
--- a/perl6-font-lock.el
+++ b/perl6-font-lock.el
@@ -143,6 +143,15 @@
                    (regex ,rx-metaoperator)
                    (opt "\)")
                    (1+ "\]"))))
+        (hyper-operator
+         . ,(rx-to-string
+             `(or (and "«" (regex ,rx-metaoperator) (char "«»"))
+                  (and "»" (regex ,rx-metaoperator) (opt (char "«»")))
+                  (and "<<" (regex ,rx-metaoperator) (or "<<" ">>"))
+                  (and ">>" (regex ,rx-metaoperator) (opt (or "<<" ">>")))
+                  (and (regex "[^[:digit:]\[\{\('\",:[:space:]]")
+                       (0+ (regex "[^\[\{\('\",:[:space:]]"))
+                       (or "«" "<<")))))
         (routine
          . ,(rx (or "macro" "sub" "submethod" "method" "multi" "proto" "only"
                     "category")))
@@ -420,7 +429,7 @@ Takes arguments START and END which delimit the region to 
propertize."
       ((rx "#" (0+ not-newline))
        (0 (ignore)))
       ;; metaoperators like (-), R=>, [*], X~
-      ((perl6-rx (or set-operator rsxz-operator reduce-operator))
+      ((perl6-rx (or set-operator rsxz-operator reduce-operator 
hyper-operator))
        (0 (ignore (perl6-add-font-lock-hint 'perl6-metaoperator 0))))
       ;; angle-bracketed quoting construct
       ((rx (1+ (char "<«")))



reply via email to

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