micro/runtime/syntax/haml.yaml

17 lines
612 B
YAML
Raw Normal View History

2017-03-21 21:55:22 +03:00
filetype: haml
detect:
filename: "\\.haml$"
rules:
- symbol: "-|="
- default: "->|=>"
- constant: "([ ]|^)%[0-9A-Za-z_]+>"
- special: ":[0-9A-Za-z_]+>"
- type: "\\.[A-Za-z_]+>"
- constant.string: "\"([^\"]|(\\\\\"))*\"|%[QW]?\\{[^}]*\\}|%[QW]?\\([^)]*\\)|%[QW]?<[^>]*>|%[QW]?\\$[^$]*\\$|%[QW]?\\^[^^]*\\^|%[QW]?![^!]*!"
- constant.string: "'([^']|(\\\\'))*'|%[qw]\\{[^}]*\\}|%[qw]\\([^)]*\\)|%[qw]<[^>]*>|%[qw]\\[[^]]*\\]|%[qw]\\$[^$]*\\$|%[qw]\\^[^^]*\\^|%[qw]![^!]*!"
- identifier: "#\\{[^}]*\\}"
- identifier.var: "(@|@@)[0-9A-Z_a-z]+"
- comment: "#[^{].*$|#$"