]> git.lizzy.rs Git - micro.git/blob - runtime/syntax/cython.yaml
Add converted syntax files
[micro.git] / runtime / syntax / cython.yaml
1 filetype: cython
2
3 detect: 
4     filename: "\\.pyx$|\\.pxd$|\\.pyi$"
5
6 rules:
7     - preproc: "def [ 0-9A-Z_]+"
8     - preproc: "cpdef [0-9A-Z_]+\\(.*\\):"
9     - preproc: "cdef cppclass [ 0-9A-Z_]+\\(.*\\):"
10     - 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"
11     - special: "\\b(continue|break|return)\\b"
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     - symbol: "[.:;,+*|=!\\%]|<|>|/|-|&"
15     - symbol.brackets: "[(){}]|\\[|\\]"
16     - constant.string: "['][^']*[^\\\\][']|[']{3}.*[^\\\\][']{3}"
17     - constant.string: "[\"][^\"]*[^\\\\][\"]|[\"]{3}.*[^\\\\][\"]{3}"
18     - constant.string:
19         start: "\"\"\"[^\"]\" end=\"\"\"\"\" start=\"'''[^']"
20         end: "'''"
21         rules: []
22
23     - comment: "#.*$"