Initial commit
Getty Ritter
9 years ago
| 1 |
(1
|
| 2 |
(gidl-mode .
|
| 3 |
[ (20150507 0000)
|
| 4 |
nil
|
| 5 |
"A simple major mode for editing GIDL files"
|
| 6 |
single
|
| 7 |
]
|
| 8 |
)
|
| 9 |
(ndbl-mode .
|
| 10 |
[ (20150507 0000)
|
| 11 |
nil
|
| 12 |
"A simple major mode for editing NDBL files"
|
| 13 |
single
|
| 14 |
]
|
| 15 |
)
|
| 16 |
)
|
| 1 |
;; gidl-mode.el --- a simple major mode for editing GIDL files.
|
| 2 |
|
| 3 |
;; Version: 20150507.0000
|
| 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 |
(provide 'gidl-mode)
|
| 35 |
|
| 36 |
;;; gidl-mode.el ends here
|
| 1 |
;; ndbl-mode.el --- a simple major mode for editing GIDL files.
|
| 2 |
|
| 3 |
;; Version: 20150507.0000
|
| 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 |
(provide 'ndbl-mode)
|
| 32 |
|
| 33 |
;;; ndbl-mode.el ends here
|