nanorc/cython.nanorc

34 lines
1.0 KiB
Plaintext
Raw Normal View History

2011-02-03 03:19:36 +01:00
## Cython nanorc, based off of Python nanorc.
##
syntax "Cython" "\.pyx$" "\.pxd$" "\.pyi$"
2018-08-09 10:09:19 +02:00
icolor red "def [ 0-9A-Z_]+"
icolor red "cpdef [0-9A-Z_]+\(.*\):"
icolor red "cdef cppclass [ 0-9A-Z_]+\(.*\):"
2011-02-03 03:19:36 +01:00
# Python Keyword Color
color green "\<(and|as|assert|class|def|DEF|del|elif|ELIF|else|ELSE|except|exec|finally|for|from|global|if|IF|import|in|is|lambda|map|not|or|pass|print|raise|try|while|with|yield)\>"
2018-08-09 10:09:19 +02:00
color magenta "\<(continue|break|return)\>"
2011-02-03 03:19:36 +01:00
# Cython Keyword Color
2011-02-10 21:39:30 +01:00
color green "\<(cdef|cimport|cpdef|cppclass|ctypedef|extern|include|namespace|property|struct)\>"
2012-11-17 20:31:54 +01:00
color red "\<(bint|char|double|int|public|void|unsigned)\>"
2011-02-03 03:19:36 +01:00
#Operator Color
color yellow "[.:;,+*|=!\%]" "<" ">" "/" "-" "&"
#Parenthetical Color
color magenta "[(){}]" "\[" "\]"
#String Color
color cyan "['][^']*[^\\][']" "[']{3}.*[^\\][']{3}"
color cyan "["][^"]*[^\\]["]" "["]{3}.*[^\\]["]{3}"
color cyan start=""""[^"]" end=""""" start="'''[^']" end="'''"
2011-02-10 21:39:30 +01:00
# Comment Color
2018-08-09 10:09:19 +02:00
color blue "#.*$"
2016-12-06 21:56:28 +01:00
## Trailing spaces
color ,green "[[:space:]]+$"