From 436525c3437c45ebeb3e5af5e2e442220c1eaf2e Mon Sep 17 00:00:00 2001 From: Anthony Scopatz Date: Wed, 2 Feb 2011 20:19:36 -0600 Subject: [PATCH] Added initial Cython highlighting. --- cython.nanorc | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 cython.nanorc diff --git a/cython.nanorc b/cython.nanorc new file mode 100644 index 0000000..0182e65 --- /dev/null +++ b/cython.nanorc @@ -0,0 +1,28 @@ +## Cython nanorc, based off of Python nanorc. +## +syntax "python" "\.pyx$" "\.pyd$" "\.pyi$" +icolor brightred "def [0-9A-Z_]+" + + + +# Python Keyword Color +color green "\<(and|as|assert|class|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|map|not|or|pass|print|raise|try|while|with)\>" +color brightmagenta "\<(continue|break|return)\>" + +# Cython Keyword Color +color green "\<(cdef|extern|namespace)\>" +color red "\<(bint|double|int)\>" + +#Operator Color +color yellow "[.:;,+*|=!\%]" "<" ">" "/" "-" "&" + +#Parenthetical Color +color magenta "[(){}]" "\[" "\]" + +#String Color +color cyan "['][^']*[^\\][']" "[']{3}.*[^\\][']{3}" +color cyan "["][^"]*[^\\]["]" "["]{3}.*[^\\]["]{3}" +color cyan start=""""[^"]" end=""""" start="'''[^']" end="'''" + +#Comment Color +color brightblue "#.*$"