Files
zyedidia.micro/runtime/syntax/cython.yaml
2017-03-21 14:55:22 -04:00

24 lines
979 B
YAML

filetype: cython
detect:
filename: "\\.pyx$|\\.pxd$|\\.pyi$"
rules:
- preproc: "def [ 0-9A-Z_]+"
- preproc: "cpdef [0-9A-Z_]+\\(.*\\):"
- preproc: "cdef cppclass [ 0-9A-Z_]+\\(.*\\):"
- 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"
- special: "\\b(continue|break|return)\\b"
- identifier.macro: "\\b(cdef|cimport|cpdef|cppclass|ctypedef|extern|include|namespace|property|struct)\\b"
- type: "\\b(bint|char|double|int|public|void|unsigned)\\b"
- symbol: "[.:;,+*|=!\\%]|<|>|/|-|&"
- symbol.brackets: "[(){}]|\\[|\\]"
- constant.string: "['][^']*[^\\\\][']|[']{3}.*[^\\\\][']{3}"
- constant.string: "[\"][^\"]*[^\\\\][\"]|[\"]{3}.*[^\\\\][\"]{3}"
- constant.string:
start: "\"\"\"[^\"]\" end=\"\"\"\"\" start=\"'''[^']"
end: "'''"
rules: []
- comment: "#.*$"