Debian Codegraph @

runtime/syntax/cython.yaml

raw
1 filetype: cython
2
3 detect:
4 filename: "\\.pyx$|\\.pxd$|\\.pyi$"
5
6 rules:
7 # Python Keyword Color
8 - statement: "\\b(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)\\b"
9 - special: "\\b(continue|break|return)\\b"
10
11 # Cython Keyword Color
12 - identifier.macro: "\\b(cdef|cimport|cpdef|cppclass|ctypedef|extern|include|namespace|property|struct)\\b"
13 - type: "\\b(bint|char|double|int|public|void|unsigned)\\b"
14
15 # Operator Color
16 - symbol: "[.:;,+*|=!\\%]|<|>|/|-|&"
17
18 # Parenthetical Color
19 - symbol.brackets: "[(){}]|\\[|\\]"
20
21 - constant.string:
22 start: "\"\"\""
23 end: "\"\"\""
24 rules:
25 - constant.specialChar: "\\\\."
26
27 - constant.string:
28 start: "'''"
29 end: "'''"
30 rules:
31 - constant.specialChar: "\\\\."
32
33 - constant.string:
34 start: "\""
35 end: "\""
36 skip: "\\\\."
37 rules:
38 - constant.specialChar: "\\\\."
39
40 - constant.string:
41 start: "'"
42 end: "'"
43 skip: "\\\\."
44 rules:
45 - constant.specialChar: "\\\\."
46
47 - comment:
48 start: "#"
49 end: "$"
50 rules:
51 - todo: "(TODO|XXX|FIXME):?"
52