gdritter repos gelpa / 0898694
Added new versions Getty Ritter 9 years ago
2 changed file(s) with 75 addition(s) and 0 deletion(s). Collapse all Expand all
1 ;; gidl-mode.el --- a simple major mode for editing GIDL files.
2
3 ;; Version: 20150507.0001
4 ;; Author: Getty Ritter
5 ;; Url: https://github.com/aisamanra/gidl-mode
6
7 (setq gidl-font-lock
8 '(( "def-\\(enum\\|struct\\|newtype\\|interface\\)"
9 . font-lock-keyword-face )
10 ( "def-\\(enum\\|struct\\|newtype\\|interface\\) (?\\([A-Za-z0-9_-]*\\)"
11 2 font-lock-function-name-face )
12 ( "[us]int\\(8\\|16\\|32\\|64\\)_t\\|bool_t\\|float_t\\|double_t"
13 . font-lock-builtin-face)))
14
15 (defvar gidl-syntax-table nil "Syntax table for `gidl-mode'.")
16 (setq gidl-syntax-table
17 (let ((table (make-syntax-table)))
18 (modify-syntax-entry ?- ". 12b" table)
19 (modify-syntax-entry ?\n "> b" table)
20 (modify-syntax-entry ?( "($")
21 (modify-syntax-entry ?) ")^")
22
23 table))
24
25 (define-derived-mode gidl-mode prog-mode
26 "GIDL mode is a major mode for editing GIDL files"
27 :syntax-table gidl-syntax-table
28
29 (setq font-lock-defaults '(gidl-font-lock))
30 (setq mode-name "GIDL mode")
31 (setq comment-start "--")
32 (setq comment-end ""))
33
34 ;;;###autoload
35 (add-to-list 'auto-mode-alist '("\\.i?g?idl\\'" . gidl-mode))
36
37 (provide 'gidl-mode)
38
39 ;;; gidl-mode.el ends here
1 ;; ndbl-mode.el --- a simple major mode for editing GIDL files.
2
3 ;; Version: 20150507.0001
4 ;; Author: Getty Ritter
5 ;; Url: http://github.com/aisamanra/ndbl-mode
6
7 (setq ndbl-font-lock
8 '(( "\"\\([^\\]\\|\\\\[\\\"]\\)*\""
9 . font-lock-string-face )
10 ( "\\([^ \n\t\r=]+\\)="
11 1 font-lock-variable-name-face )
12 ( "=" . font-lock-builtin-face )))
13
14 (defvar ndbl-syntax-table nil "Syntax table for `ndbl-mode'.")
15 (setq ndbl-syntax-table
16 (let ((table (make-syntax-table)))
17 (modify-syntax-entry ?# "< b" table)
18 (modify-syntax-entry ?\n "> b" table)
19
20 table))
21
22 (define-derived-mode ndbl-mode prog-mode
23 "NDBL mode is a major mode for editing NDBL files"
24 :syntax-table ndbl-syntax-table
25
26 (setq font-lock-defaults '(ndbl-font-lock))
27 (setq mode-name "NDBL mode")
28 (setq comment-start "#")
29 (setq comment-end ""))
30
31 ;;;###autoload
32 (add-to-list 'auto-mode-alist '("\\.ndbl\\'" . ndbl-mode))
33
34 (provide 'ndbl-mode)
35
36 ;;; ndbl-mode.el ends here