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

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

[nongnu] elpa/julia-mode fc04731 153/352: Highlight parameter types and


From: ELPA Syncer
Subject: [nongnu] elpa/julia-mode fc04731 153/352: Highlight parameter types and subtypes.
Date: Sun, 29 Aug 2021 11:22:34 -0400 (EDT)

branch: elpa/julia-mode
commit fc047312eec2a0e75c908b2fffa88a1aa9a77838
Author: Wilfred Hughes <me@wilfred.me.uk>
Commit: Yichao Yu <yyc1992@gmail.com>

    Highlight parameter types and subtypes.
---
 julia-mode.el | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/julia-mode.el b/julia-mode.el
index 3d65664..ef22798 100644
--- a/julia-mode.el
+++ b/julia-mode.el
@@ -108,13 +108,16 @@
   (rx symbol-start "function" (1+ space) (group (1+ (or word ?_ ?!)))))
 
 (defconst julia-type-regex
-  (rx symbol-start "type" (1+ space) (group (1+ (or word ?_)))))
+  (rx symbol-start (or "function" "type" "abstract") (1+ space) (group (1+ (or 
word ?_)))))
 
 (defconst julia-type-annotation-regex
   (rx "::" (group (1+ (or word ?_)))))
 
+(defconst julia-type-parameter-regex
+  (rx symbol-start (1+ (or word ?_)) "{" (group (1+ (or word ?_))) "}"))
+
 (defconst julia-subtype-regex
-  (rx "<:" (1+ space) (group (1+ (or word ?_)))))
+  (rx "<:" (1+ space) (group (1+ (or word ?_))) (0+ space) (or "\n" "{" 
"end")))
 
 (defconst julia-macro-regex
   "@\\w+")
@@ -144,6 +147,7 @@
     (list julia-function-regex 1 'font-lock-function-name-face)
     (list julia-type-regex 1 'font-lock-type-face)
     (list julia-type-annotation-regex 1 'font-lock-type-face)
+    (list julia-type-parameter-regex 1 'font-lock-type-face)
     (list julia-subtype-regex 1 'font-lock-type-face)
 ))
 



reply via email to

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