diff options
author | William Stein <wstein@gmail.com> | 2007-07-28 13:25:22 -0700 |
---|---|---|
committer | William Stein <wstein@gmail.com> | 2007-07-28 13:25:22 -0700 |
commit | c4fa206b9579bb739a1cf9ceb7980b47a9b9c5e2 (patch) | |
tree | a08bdead22a16a16e79f53f4df91a3a38f12bc75 /Tools | |
download | cython-c4fa206b9579bb739a1cf9ceb7980b47a9b9c5e2.tar.gz |
Initial version
Diffstat (limited to 'Tools')
-rw-r--r-- | Tools/pyrex-mode.el | 1 | ||||
-rw-r--r-- | Tools/pyrex.st | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/Tools/pyrex-mode.el b/Tools/pyrex-mode.el new file mode 100644 index 000000000..1493a9d86 --- /dev/null +++ b/Tools/pyrex-mode.el @@ -0,0 +1 @@ +;;;; `Pyrex' mode.
(add-to-list 'auto-mode-alist '("\\.pyx\\'" . pyrex-mode))
(define-derived-mode pyrex-mode python-mode "Pyrex"
(font-lock-add-keywords
nil
`((,(concat "\\<\\(NULL"
"\\|c\\(def\\|har\\|typedef\\)"
"\\|e\\(num\\|xtern\\)"
"\\|float"
"\\|in\\(clude\\|t\\)"
"\\|object\\|public\\|struct\\|type\\|union\\|void"
"\\)\\>")
1 font-lock-keyword-face t))))
\ No newline at end of file diff --git a/Tools/pyrex.st b/Tools/pyrex.st new file mode 100644 index 000000000..d4fe4ecff --- /dev/null +++ b/Tools/pyrex.st @@ -0,0 +1 @@ +/**
* Name: pyrex
* Description: Pyrex - a Language for Writing Python Extension Modules
* Author: Markku Rossi <mtr@iki.fi>
*/
state pyrex extends python
{
/* Additional keywords.
(build-re '( NULL as cdef char ctypedef double enum extern float
include int long private public short signed sizeof struct union
unsigned void )) */
/\b(NULL|as|c(def|har|typedef)|double|e(num|xtern)|float|in(clude|t)\
|long|p(rivate|ublic)|s(hort|i(gned|zeof)|truct)|un(ion|signed)|void)\b/ {
keyword_face(true);
language_print($0);
keyword_face(false);
}
}
/*
Local variables:
mode: c
End:
*/
\ No newline at end of file |