File: d.yaml

package info (click to toggle)
micro 2.0.15-1
  • links: PTS, VCS
  • area: main
  • in suites: forky
  • size: 2,828 kB
  • sloc: sh: 247; makefile: 77; xml: 53
file content (121 lines) | stat: -rw-r--r-- 4,330 bytes parent folder | download | duplicates (3)
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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
filetype: d

detect:
    filename: "\\.(d(i|d)?)$"

rules:
    # Operators and punctuation
    - statement: "(\\*|/|%|\\+|-|>>|<<|>>>|&|\\^(\\^)?|\\||~)?="
    - statement: "\\.\\.(\\.)?|!|\\*|&|~|\\(|\\)|\\[|\\]|\\\\|/|\\+|-|%|<|>|\\?|:|;"
    # Octal integer literals are deprecated
    - error: "(0[0-7_]*)(L[uU]?|[uU]L?)?"
    # Decimal integer literals
    - constant.number: "([0-9]|[1-9][0-9_]*)(L[uU]?|[uU]L?)?\\b"
    # Binary integer literals
    - constant: "(0[bB][01_]*)(L[uU]?|[uU]L?)?"
    # Decimal float literals
    - constant.number: "[0-9][0-9_]*\\.([0-9][0-9_]*)([eE][+-]?([0-9][0-9_]*))?[fFL]?i?"
    - constant.number: "[0-9][0-9_]*([eE][+-]?([0-9][0-9_]*))[fFL]?i?"
    - constant.number: "[^.]\\.([0-9][0-9_]*)([eE][+-]?([0-9][0-9_]*))?[fFL]?i?"
    - constant.number: "[0-9][0-9_]*([fFL]?i|[fF])"
    # Hexadecimal integer literals
    - constant.number: "(0[xX]([0-9a-fA-F][0-9a-fA-F_]*|[0-9a-fA-F_]*[0-9a-fA-F]))(L[uU]?|[uU]L?)?"
    # Hexadecimal float literals
    - constant.number: "0[xX]([0-9a-fA-F][0-9a-fA-F_]*|[0-9a-fA-F_]*[0-9a-fA-F])(\\.[0-9a-fA-F][0-9a-fA-F_]*|[0-9a-fA-F_]*[0-9a-fA-F])?[pP][+-]?([0-9][0-9_]*)[fFL]?i?"
    - constant.number: "0[xX]\\.([0-9a-fA-F][0-9a-fA-F_]*|[0-9a-fA-F_]*[0-9a-fA-F])[pP][+-]?([0-9][0-9_]*)[fFL]?i?"
    # Character literals
    - constant.string:
        start: "'"
        end: "'"
        skip: "\\\\."
        rules:
            - constant.specialChar: "\\\\."
    # Keywords
    # a-e
    - statement: "\\b(abstract|alias|align|asm|assert|auto|body|break|case|cast|catch|class|const|continue|debug|default|delegate|do|else|enum|export|extern)\\b"
    # f-l
    - statement: "\\b(false|final|finally|for|foreach|foreach_reverse|function|goto|if|immutable|import|in|inout|interface|invariant|is|lazy)\\b"
    # m-r
    - statement: "\\b(macro|mixin|module|new|nothrow|null|out|override|package|pragma|private|protected|public|pure|ref|return)\\b"
    # s-w
    - statement: "\\b(scope|shared|static|struct|super|switch|synchronized|template|this|throw|true|try|typeid|typeof|union|unittest|version|while|with)\\b"
    # __
    - statement: "\\b(__FILE__|__MODULE__|__LINE__|__FUNCTION__|__PRETTY_FUNCTION__|__gshared|__traits|__vector|__parameters)\\b"
    # Deprecated keywords
    - error: "\\b(delete|deprecated|typedef|volatile)\\b"
    # Primitive types
    - type: "\\b(bool|byte|cdouble|cent|cfloat|char|creal|dchar|double|float|idouble|ifloat|int|ireal|long|real|short|ubyte|ucent|uint|ulong|ushort|void|wchar)\\b"
    # Globally defined symbols
    - type: "\\b(string|wstring|dstring|size_t|ptrdiff_t)\\b"
    # Special tokens
    - constant: "\\b(__DATE__|__EOF__|__TIME__|__TIMESTAMP__|__VENDOR__|__VERSION__)\\b"
    # String literals
    # DoubleQuotedString
    - constant.string:
        start: "\""
        end: "\""
        skip: "\\\\."
        rules:
            - constant.specialChar: "\\\\."
    # WysiwygString
    - constant.string:
        start: "r\""
        end: "\""
        rules:
            - constant.specialChar: "\\\\."
    - constant.string:
        start: "`"
        end: "`"
        rules:
            - constant.specialChar: "\\\\."
    # HexString
    - constant.string:
        start: "x\""
        end: "\""
        rules:
            - constant.specialChar: "\\\\."
    # DelimitedString
    - constant.string:
        start: "q\"\\("
        end: "\\)\""
        rules:
            - constant.specialChar: "\\\\."
    - constant.string:
        start: "q\"\\{"
        end: "q\"\\}"
        rules:
            - constant.specialChar: "\\\\."
    - constant.string:
        start: "q\"\\["
        end: "q\"\\]"
        rules:
            - constant.specialChar: "\\\\."
    - constant.string:
        start: "q\"<"
        end: "q\">"
        rules:
            - constant.specialChar: "\\\\."
    - constant.string:
        start: "q\"[^({[<\"][^\"]*$"
        end: "^[^\"]+\""
        rules:
            - constant.specialChar: "\\\\."
    - constant.string:
        start: "q\"([^({[<\"])"
        end: "\""
        rules:
            - constant.specialChar: "\\\\."
    # Comments
    - comment:
        start: "//"
        end: "$"
        rules: []
    - comment:
        start: "/\\*"
        end: "\\*/"
        rules: []
    - comment:
        start: "/\\+"
        end: "\\+/"
        rules: []