]> git.lizzy.rs Git - micro.git/blob - runtime/syntax/yaml.yaml
Add skip statements to all strings
[micro.git] / runtime / syntax / yaml.yaml
1 filetype: yaml
2
3 detect:
4     filename: "\\.ya?ml$"
5     header: "%YAML"
6
7 rules:
8     - type: "(^| )!!(binary|bool|float|int|map|null|omap|seq|set|str) "
9     - constant:  "\\b(YES|yes|Y|y|ON|on|NO|no|N|n|OFF|off)\\b"
10     - constant: "\\b(true|false)\\b"
11     - statement: "(:[[:space:]]|\\[|\\]|:[[:space:]]+[|>]|^[[:space:]]*- )"
12     - identifier: "[[:space:]][\\*&][A-Za-z0-9]+"
13     - type: "[-.\\w]+:"
14     - statement: ":"
15     - special:  "(^---|^\\.\\.\\.|^%YAML|^%TAG)"
16
17     - constant.string:
18         start: "\""
19         end: "\""
20         skip: "\\\\."
21         rules:
22             - constant.specialChar: "\\\\."
23
24     - constant.string:
25         start: "'"
26         end: "'"
27         skip: "\\\\."
28         rules:
29             - constant.specialChar: "\\\\."
30
31     - comment:
32         start: "#"
33         end: "$"
34         rules: []
35
36