]> git.lizzy.rs Git - micro.git/blob - runtime/syntax/yaml.yaml
Merge branch 'view-refactor'
[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         rules:
21             - constant.specialChar: "\\\\."
22
23     - constant.string:
24         start: "'"
25         end: "(?<!\\\\)'"
26         rules:
27             - constant.specialChar: "\\\\."
28
29     - comment:
30         start: "#"
31         end: "$"
32         rules: []
33
34