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

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

[nongnu] elpa/d-mode c2431c8 033/346: support fixed sized array


From: ELPA Syncer
Subject: [nongnu] elpa/d-mode c2431c8 033/346: support fixed sized array
Date: Sun, 29 Aug 2021 10:59:59 -0400 (EDT)

branch: elpa/d-mode
commit c2431c8eb3b7ccb5c05ce56fe0f03b1679a01bc7
Author: finalpatch <fengli@gmail.com>
Commit: finalpatch <fengli@gmail.com>

    support fixed sized array
---
 d-mode.el | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/d-mode.el b/d-mode.el
index d8c63ca..5acf128 100644
--- a/d-mode.el
+++ b/d-mode.el
@@ -86,6 +86,10 @@
                   "\\)"
                   "\\([^=]\\|$\\)"))
 
+;; D has fixed arrays
+(c-lang-defconst c-opt-type-suffix-key
+  d "\\(\\[[^]]*\\]\\|\\.\\.\\.\\)")
+
 (c-lang-defconst c-identifier-ops
   ;; For recognizing "~this", ".foo", and "foo.bar.baz" as identifiers
   d '((prefix "~")(prefix ".")(left-assoc ".")))
@@ -441,10 +445,10 @@ Key bindings:
 (font-lock-add-keywords
  'd-mode
  '(("\\<\\(auto\\|immutable\\)\\>" 1 font-lock-keyword-face)
-   ("^[ \t]*\\(?:[_a-zA-Z0-9]+[ \t\n]+\\)*\\([_a-zA-Z0-9.!]+\\)[][* ]*[ 
\t\n]+\\([_a-zA-Z0-9]+\\)[ \t\n]*;"
+   ("^[ \t]*\\(?:[_a-zA-Z0-9]+[ 
\t\n]+\\)*\\([_a-zA-Z0-9.!]+\\)\\(?:\\[[^]]*\\]\\|\\*\\)?[ 
\t\n]+\\([_a-zA-Z0-9]+\\)[ \t\n]*;"
     (1 font-lock-type-face)
     (2 font-lock-variable-name-face))
-   ("^[ \t]*\\(?:[_a-zA-Z0-9]+[ \t\n]+\\)*\\([_a-zA-Z0-9.!]+\\)[][* ]*[ 
\t\n]+\\([_a-zA-Z0-9]+\\)[ \t\n]*("
+   ("^[ \t]*\\(?:[_a-zA-Z0-9]+[ 
\t\n]+\\)*\\([_a-zA-Z0-9.!]+\\)\\(?:\\[[^]]*\\]\\|\\*\\)?[ 
\t\n]+\\([_a-zA-Z0-9]+\\)[ \t\n]*("
     (1 font-lock-type-face)
     (2 font-lock-function-name-face)))
  t)



reply via email to

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