micro/runtime/syntax/cython.yaml

53 lines
1.3 KiB
YAML
Raw Normal View History

2017-03-21 21:55:22 +03:00
filetype: cython
detect:
2017-03-21 21:55:22 +03:00
filename: "\\.pyx$|\\.pxd$|\\.pyi$"
rules:
# Python Keyword Color
2017-03-21 21:55:22 +03:00
- 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"
# Cython Keyword Color
2017-03-21 21:55:22 +03:00
- identifier.macro: "\\b(cdef|cimport|cpdef|cppclass|ctypedef|extern|include|namespace|property|struct)\\b"
- type: "\\b(bint|char|double|int|public|void|unsigned)\\b"
# Operator Color
2017-03-21 21:55:22 +03:00
- symbol: "[.:;,+*|=!\\%]|<|>|/|-|&"
# Parenthetical Color
2017-03-21 21:55:22 +03:00
- symbol.brackets: "[(){}]|\\[|\\]"
- constant.string:
start: "\"\"\""
end: "\"\"\""
rules:
- constant.specialChar: "\\\\."
- constant.string:
start: "'''"
end: "'''"
rules:
- constant.specialChar: "\\\\."
- constant.string:
start: "\""
end: "\""
2017-03-29 16:45:16 +03:00
skip: "\\\\."
rules:
- constant.specialChar: "\\\\."
2017-03-21 21:55:22 +03:00
- constant.string:
start: "'"
end: "'"
2017-03-29 16:45:16 +03:00
skip: "\\\\."
rules:
- constant.specialChar: "\\\\."
2017-03-21 21:55:22 +03:00
- comment:
start: "#"
end: "$"
rules:
- todo: "(TODO|XXX|FIXME):?"