]> git.lizzy.rs Git - micro.git/blob - runtime/syntax/toml.yaml
Merge branch 'master' into highlight-nimscript
[micro.git] / runtime / syntax / toml.yaml
1 filetype: toml
2
3 detect:
4     filename: "\\.toml"
5
6 rules:
7     - statement: "(.*)[[:space:]]="
8     - special: "="
9
10       # Bracket thingies
11     - special: "(\\[|\\])"
12
13       # Numbers and strings
14     - constant.number: "\\b([0-9]+|0x[0-9a-fA-F]*)\\b|'.'"
15     - constant.number: "\\\\([0-7]{3}|x[A-Fa-f0-9]{2}|u[A-Fa-f0-9]{4}|U[A-Fa-f0-9]{8})"
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     - constant.string:
32         start: "`"
33         end: "`"
34         rules:
35             - constant.specialChar: "\\\\."
36
37     - comment:
38         start: "#"
39         end: "$"
40         rules:
41             - todo: "(TODO|XXX|FIXME):?"
42