File: toml.yaml

package info (click to toggle)
micro 2.0.15-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 2,828 kB
  • sloc: sh: 247; makefile: 77; xml: 53
file content (56 lines) | stat: -rw-r--r-- 1,734 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
filetype: toml

detect:
    filename: "\\.toml"

rules:
    # Punctuation
    - symbol: '[=,\.]'
    - symbol.brackets: '[{\[\]}]'
    # Strings
    - constant.string:
        start: '"""'
        end: '\"{3,5}'
        skip: '\\.'
        rules:
            - constant.specialChar: '\\u[[:xdigit:]]{4}'
            - constant.specialChar: '\\U[[:xdigit:]]{8}'
            - constant.specialChar: '\\[btnfr"\\]'
    - constant.string:
        start: '"'
        end: '"'
        skip: '\\.'
        rules:
            - constant.specialChar: '\\u[[:xdigit:]]{4}'
            - constant.specialChar: '\\U[[:xdigit:]]{8}'
            - constant.specialChar: '\\[btnfr"\\]'
    - constant.string:
        start: "'''"
        end: "'{3,5}"
        rules: []
    - constant.string:
        start: "'"
        end: "'"
        rules: []
    # Integer
    - constant.number: '[+-]?(\d+_)*\d+\b'
    - constant.number: '(0x([[:xdigit:]]+_)*[[:xdigit:]]+|0o([0-7]_)*[0-7]+|0b([01]+_)*[01]+)'
    # Float
    - constant.number: '[+-]?(\d+_)*\d+\.(\d+_)*\d+'
    - constant.number: '[+-]?(\d+_)*\d+(\.(\d+_)*\d+)?[Ee][+-]?(\d+_)*\d+'
    - constant.number: '(\+|-)(inf|nan)'
    # Bare key, keys starting with a digit or dash are ambiguous with numbers and are skipped
    - identifier: '\b[A-Za-z_][A-Za-z0-9_-]*\b'
    # Boolean and inf, nan without sign
    - constant.bool.true: '\btrue\b'
    - constant.bool.false: '\bfalse\b'
    - constant.number: '\b(inf|nan)\b'
    # Date and Time
    - constant: '\d+-\d{2}-\d{2}([T ]\d{2}:\d{2}:\d{2}(\.\d+)?([+-]\d{2}:\d{2}|Z)?)?'
    - constant: '\d{2}:\d{2}:\d{2}(\.\d+)?'
    # Comments
    - comment:
        start: "#"
        end: "$"
        rules:
            - todo: "(TODO|XXX|FIXME):?"