File: twig.yaml

package info (click to toggle)
micro 2.0.15-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 3,128 kB
  • sloc: sh: 265; makefile: 77; xml: 53
file content (55 lines) | stat: -rw-r--r-- 2,557 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
filetype: twig

detect:
    filename: "\\.twig$"

rules:
    - include: "html"
    - symbol.tag:
        start: "\\{\\{[[:space:]]"
        end: "[[:space:]]\\}\\}"
        rules:
            - identifier: "\\b(abs|batch|capitalize|convert|encoding|date(_modify)?|default|escape|first|format|join|json_encode|keys|last|length|lower|merge|nl2br|number_format|raw|replace|reverse|round|slice|sort|split|striptags|title|trim|upper|url_encode)\\b"
            - identifier.class: "\\b(attribute|block|constant|cycle|date|dump|include|max|min|parent|random|range|source|template_from_string)\\b"
            - type.keyword: "\\b(and|as|constant|defined|divisibleby|empty|even|false|in|is|iterable|not|null|odd|or|same(as)?|true|with)\\b"
            - symbol.operator: "[.:;,+*?|=!\\%]|<|>|/|-|&"
            - symbol.brackets: "[(){}]|\\[|\\]"
            - constant.number: "\\b[0-9]+\\b|\\b0x[0-9A-Fa-f]+\\b"
            - constant.string:
                start: "\""
                end: "\""
                skip: "\\\\"
                rules:
                    - constant.specialChar: "\\\\."
            - constant.string:
                start: "'"
                end: "'"
                skip: "\\\\"
                rules:
                    - constant.specialChar: "\\\\."
    - symbol.tag:
        start: "\\{%[[:space:]]"
        end: "[[:space:]]%\\}"
        rules:
            - identifier: "\\b(abs|batch|capitalize|convert|encoding|date(_modify)?|default|escape|first|format|join|json_encode|keys|last|length|lower|merge|nl2br|number_format|raw|replace|reverse|round|slice|sort|split|striptags|title|trim|upper|url_encode)\\b"
            - identifier.class: "\\b(attribute|block|constant|cycle|date|dump|include|max|min|parent|random|range|source|template_from_string)\\b"
            - type.keyword: "\\b(and|as|constant|defined|divisibleby|empty|even|false|in|is|iterable|not|null|odd|or|same(as)?|true|with)\\b"
            - symbol.operator: "[.:;,+*?|=!\\%]|<|>|/|-|&"
            - symbol.brackets: "[(){}]|\\[|\\]"
            - constant.number: "\\b[0-9]+\\b|\\b0x[0-9A-Fa-f]+\\b"
            - constant.string:
                start: "\""
                end: "\""
                skip: "\\\\"
                rules:
                    - constant.specialChar: "\\\\."
            - constant.string:
                start: "'"
                end: "'"
                skip: "\\\\"
                rules:
                   - constant.specialChar: "\\\\."
    - comment:
        start: "\\{#"
        end: "#\\}"
        rules: []