branch: elpa/d-mode
commit c2431c8eb3b7ccb5c05ce56fe0f03b1679a01bc7
Author: finalpatch <[email protected]>
Commit: finalpatch <[email protected]>
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)