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

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

[nongnu] elpa/raku-mode 6e8b0fd8c4 032/253: Highlight "rule q {}" correc


From: ELPA Syncer
Subject: [nongnu] elpa/raku-mode 6e8b0fd8c4 032/253: Highlight "rule q {}" correctly
Date: Sat, 29 Jan 2022 08:28:36 -0500 (EST)

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

    Highlight "rule q {}" correctly
---
 perl6-font-lock.el | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/perl6-font-lock.el b/perl6-font-lock.el
index 6ca307b3ef..4cace48a86 100644
--- a/perl6-font-lock.el
+++ b/perl6-font-lock.el
@@ -114,7 +114,8 @@
       (routine . ,(rx (or "macro" "sub" "submethod" "method"
                                   "multi" "proto" "only" "category")))
       (module . ,(rx (or "module" "class" "role" "package"
-                                 "enum" "grammar" "slang" "subset")))
+                         "enum" "grammar" "slang" "subset")))
+      (rule . ,(rx (or "regex" "rule" "token")))
       (include . ,(rx (or "use" "require")))
       (conditional . ,(rx (or "if" "else" "elsif" "unless")))
       (scope . ,(rx (or "let" "my" "our" "state" "temp" "has"
@@ -328,6 +329,9 @@ Takes STATE, the parse state."
     (,(perl6-rx (group (any ".^")) (group identifier symbol-end))
      (1 'perl6-operator)
      (2 'perl6-identifier))
+    (,(perl6-rx (group symbol-start rule) (1+ space) (group identifier))
+     (1 'perl6-routine)
+     (2 'perl6-identifier))
     (,(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)



reply via email to

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