24 lines
775 B
Plaintext
24 lines
775 B
Plaintext
syntax "python" "\.py$"
|
|
icolor brightred "def [ 0-9A-Z_]+"
|
|
|
|
## Python keywords
|
|
color brightcyan "\<(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|yield)\>"
|
|
color brightmagenta "\<(break|continue|return)\>"
|
|
|
|
# Python objects
|
|
color red "\<(str|bytearray|bytes|list|tuple|set|frozenset|dict|int|float|complex|bool)\>"
|
|
|
|
## Operators
|
|
color yellow "[.:;,+*|=!\%]" "<" ">" "/" "-" "&"
|
|
|
|
## Braces and parentheses
|
|
color magenta "[(){}]" "\[" "\]"
|
|
|
|
# Python strings
|
|
color brightgreen "['][^']*[^\\][']" "[']{3}.*[^\\][']{3}"
|
|
color brightgreen "["][^"]*[^\\]["]" "["]{3}.*[^\\]["]{3}"
|
|
color brightgreen start=""""[^"]" end=""""" start="'''[^']" end="'''"
|
|
|
|
## Comments
|
|
color brightblue "#.*$"
|