github-linguist 4.8.2 → 4.8.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/grammars/source.apl.json +1379 -407
- data/grammars/source.cs.json +4 -4
- data/grammars/source.css.less.json +2 -2
- data/grammars/source.d.json +1 -1
- data/grammars/source.dm.json +603 -0
- data/grammars/source.dmf.json +99 -0
- data/grammars/source.graphql.json +219 -0
- data/grammars/source.idris.json +537 -0
- data/grammars/source.js.json +44 -2
- data/grammars/source.js.jsx.json +204 -199
- data/grammars/source.pawn.json +4 -4
- data/grammars/source.perl6fe.json +43 -10
- data/grammars/source.purescript.json +57 -9
- data/grammars/source.regexp.babel.json +62 -49
- data/grammars/source.ruby.json +38 -0
- data/grammars/source.sqf.json +4 -3
- data/grammars/text.html.vue.json +110 -1
- data/grammars/text.slim.json +1 -1
- data/lib/linguist/languages.json +1 -1
- data/lib/linguist/languages.yml +12 -2
- data/lib/linguist/samples.json +141 -15
- data/lib/linguist/version.rb +1 -1
- metadata +6 -2
data/grammars/source.cs.json
CHANGED
@@ -87,7 +87,7 @@
|
|
87
87
|
"builtinTypes": {
|
88
88
|
"patterns": [
|
89
89
|
{
|
90
|
-
"match": "\\b(bool|byte|sbyte|char|decimal|double|float|int|uint|long|ulong|object|short|ushort|string|void|class|struct|enum|interface)\\b",
|
90
|
+
"match": "\\b(bool|byte|sbyte|char|decimal|double|float|int|uint|long|ulong|object|short|ushort|string|void|class|struct|enum|interface|dynamic)\\b",
|
91
91
|
"name": "storage.type.cs"
|
92
92
|
}
|
93
93
|
]
|
@@ -305,7 +305,7 @@
|
|
305
305
|
"name": "keyword.operator.cs"
|
306
306
|
},
|
307
307
|
{
|
308
|
-
"match": "\\b(event|delegate|fixed|add|remove|set|get|value)\\b",
|
308
|
+
"match": "\\b(event|delegate|fixed|add|remove|set|get|value|alias|global)\\b",
|
309
309
|
"name": "keyword.other.cs"
|
310
310
|
},
|
311
311
|
{
|
@@ -313,7 +313,7 @@
|
|
313
313
|
"name": "storage.type.var.cs"
|
314
314
|
},
|
315
315
|
{
|
316
|
-
"match": "[@]\\b(var|event|delegate|add|remove|set|get|value|new|is|as|using|checked|unchecked|typeof|sizeof |override|readonly|stackalloc|from|where|select|group|into|orderby|join|let|on|equals|by|ascending|descending |if|else|while|for|foreach|in|do|return|continue|break|switch|case|default|goto|throw|try|catch|finally|lock |yield|await|nameof|when)\\b",
|
316
|
+
"match": "[@]\\b(var|event|delegate|add|remove|set|get|value|new|is|as|using|checked|unchecked|typeof|sizeof |override|readonly|stackalloc|from|where|select|group|into|orderby|join|let|on|equals|by|ascending|descending |if|else|while|for|foreach|in|do|return|continue|break|switch|case|default|goto|throw|try|catch|finally|lock |yield|await|nameof|when|alias|global)\\b",
|
317
317
|
"name": "meta.class.body.cs"
|
318
318
|
}
|
319
319
|
]
|
@@ -559,7 +559,7 @@
|
|
559
559
|
]
|
560
560
|
},
|
561
561
|
"storage-modifiers": {
|
562
|
-
"match": "\\b(event|delegate|internal|public|protected|private|static|const|new|sealed|abstract|virtual|override|extern|unsafe|readonly|volatile|implicit|explicit|operator|async|partial)\\b",
|
562
|
+
"match": "\\b(event|delegate|internal|public|protected|private|static|const|new|sealed|abstract|virtual|override|extern|unsafe|readonly|volatile|implicit|explicit|operator|async|partial|alias)\\b",
|
563
563
|
"name": "storage.modifier.cs"
|
564
564
|
}
|
565
565
|
}
|
@@ -340,7 +340,7 @@
|
|
340
340
|
"name": "keyword.control.logical.operator"
|
341
341
|
},
|
342
342
|
{
|
343
|
-
"match": "\\b(a|abbr|acronym|address|applet|article|
|
343
|
+
"match": "\\b(a|abbr|acronym|address|applet|area|article|aside|audio|b|base|bdi|bdo|big|blockquote|body|br|button|canvas|caption|center|cite|code|col|colgroup|data|datalist|dd|del|details|dfn|dialog|div|dl|dt|em|embed|eventsource|fieldset|figure|figcaption|footer|form|frame|frameset|(h[1-6])|head|header|hgroup|hr|html|i|iframe|img|input|ins|kbd|keygen|label|legend|li|link|main|map|mark|math|menu|menuitem|meta|meter|nav|noframes|noscript|object|ol|optgroup|option|output|p|param|picture|pre|progress|q|rb|rp|rt|rtc|ruby|s|samp|script|section|select|small|source|span|strike|strong|style|sub|summary|sup|svg|table(?!-)|tbody|td|template|textarea|tfoot|th|thead|time|title|tr|track|tt|u|ul|var|video|wbr)\\b",
|
344
344
|
"name": "keyword.control.html.elements"
|
345
345
|
},
|
346
346
|
{
|
@@ -578,7 +578,7 @@
|
|
578
578
|
"name": "punctuation.definition.entity.css"
|
579
579
|
}
|
580
580
|
},
|
581
|
-
"match": "(:|::)(after|before|first-letter|first-line|selection)",
|
581
|
+
"match": "(:|::)(after|before|first-letter|first-line|selection|shadow)",
|
582
582
|
"name": "entity.other.attribute-name.pseudo-element.css"
|
583
583
|
},
|
584
584
|
"pseudo_classes": {
|
data/grammars/source.d.json
CHANGED
@@ -224,7 +224,7 @@
|
|
224
224
|
]
|
225
225
|
},
|
226
226
|
{
|
227
|
-
"begin": "(?x)^\\s*\n\t\t\t\t\t((?:\\b(?:public|private|protected|static|final|synchronized|abstract|export|override|auto|nothrow|immutable|const|inout|ref|shared)\\b\\s*)*) # modifier\n\t\t\t\t\t(?:(_|\\w[
|
227
|
+
"begin": "(?x)^\\s*\n\t\t\t\t\t((?:\\b(?:public|private|protected|static|final|synchronized|abstract|export|override|auto|nothrow|immutable|const|inout|ref|shared)\\b\\s*)*) # modifier\n\t\t\t\t\t(?:(_|\\w[^\"'`\\s]*))\\s+ # return type\n\t\t\t\t\t(\\w+)\\s* # identifier\n\t\t\t\t\t(?=\\()",
|
228
228
|
"beginCaptures": {
|
229
229
|
"1": {
|
230
230
|
"name": "storage.modifier.d"
|
@@ -0,0 +1,603 @@
|
|
1
|
+
{
|
2
|
+
"fileTypes": [
|
3
|
+
"dm",
|
4
|
+
"dme"
|
5
|
+
],
|
6
|
+
"foldingStartMarker": "(?x)\n/\\*\\*(?!\\*)\n|^(?![^{]*?//|[^{]*?/\\*(?!.*?\\*/.*?\\{)).*?\\{\\s*($|//|/\\*(?!.*?\\*/.*\\S))",
|
7
|
+
"foldingStopMarker": "(?<!\\*)\\*\\*/|^\\s*\\}",
|
8
|
+
"name": "Dream Maker",
|
9
|
+
"patterns": [
|
10
|
+
{
|
11
|
+
"include": "#preprocessor-rule-enabled"
|
12
|
+
},
|
13
|
+
{
|
14
|
+
"include": "#preprocessor-rule-disabled"
|
15
|
+
},
|
16
|
+
{
|
17
|
+
"include": "#preprocessor-rule-other"
|
18
|
+
},
|
19
|
+
{
|
20
|
+
"include": "#comments"
|
21
|
+
},
|
22
|
+
{
|
23
|
+
"match": "\\b((0(x|X)[0-9a-fA-F]*)|(([0-9]+\\.?[0-9]*)|(\\.[0-9]+))((e|E)(\\+|-)?[0-9]+)?)\\b",
|
24
|
+
"name": "constant.numeric.dm"
|
25
|
+
},
|
26
|
+
{
|
27
|
+
"match": "\\b(sleep|spawn|break|continue|do|else|for|goto|if|return|switch|while)\\b",
|
28
|
+
"name": "keyword.control.dm"
|
29
|
+
},
|
30
|
+
{
|
31
|
+
"match": "\\b(del|new)\\b",
|
32
|
+
"name": "keyword.other.dm"
|
33
|
+
},
|
34
|
+
{
|
35
|
+
"match": "\\b(var|proc|verb|datum|atom(/movable)?|obj|mob|turf|area|savefile|list|client|sound|image|database|matrix|regex|exception)\\b",
|
36
|
+
"name": "storage.type.dm"
|
37
|
+
},
|
38
|
+
{
|
39
|
+
"match": "\\b(as|const|global|set|static|tmp)\\b",
|
40
|
+
"name": "storage.modifier.dm"
|
41
|
+
},
|
42
|
+
{
|
43
|
+
"match": "\\b(usr|world|src|args)\\b",
|
44
|
+
"name": "variable.language.dm"
|
45
|
+
},
|
46
|
+
{
|
47
|
+
"match": "\\b(\\s*\\?\\s*|\\s*(>\\s*|\\s*<)(=)?\\s*|\\s*\\.\\s*|\\s*:\\s*|\\s*/(=)?\\s*|\\s*~\\s*|\\s*\\+(\\+|=)?\\s*|\\s*-(-|=)?\\s*|\\s*\\*(\\*|=)?\\s*|\\s*%\\s*|\\s*>>\\s*|\\s*<<\\s*|\\s*=(=)?\\s*|\\s*!(=)?\\s*|\\s*<>\\s*|\\s*&\\s*|\\s*&&\\s*|\\s*\\^\\s*|\\s*\\|\\s*|\\s*\\|\\|\\s*|\\s*to\\s*|\\s*in\\s*|\\s*step\\s*)\\b",
|
48
|
+
"name": "keyword.operator.dm"
|
49
|
+
},
|
50
|
+
{
|
51
|
+
"match": "\\b([A-Z_][A-Z_0-9]*)\\b",
|
52
|
+
"name": "constant.language.dm"
|
53
|
+
},
|
54
|
+
{
|
55
|
+
"begin": "{\"",
|
56
|
+
"beginCaptures": {
|
57
|
+
"0": {
|
58
|
+
"name": "punctuation.definition.string.begin.dm"
|
59
|
+
}
|
60
|
+
},
|
61
|
+
"end": "\"}",
|
62
|
+
"endCaptures": {
|
63
|
+
"0": {
|
64
|
+
"name": "punctuation.definition.string.end.dm"
|
65
|
+
}
|
66
|
+
},
|
67
|
+
"name": "string.quoted.triple.dm",
|
68
|
+
"patterns": [
|
69
|
+
{
|
70
|
+
"include": "#string_escaped_char"
|
71
|
+
},
|
72
|
+
{
|
73
|
+
"include": "#string_embedded_expression"
|
74
|
+
}
|
75
|
+
]
|
76
|
+
},
|
77
|
+
{
|
78
|
+
"begin": "\"",
|
79
|
+
"beginCaptures": {
|
80
|
+
"0": {
|
81
|
+
"name": "punctuation.definition.string.begin.dm"
|
82
|
+
}
|
83
|
+
},
|
84
|
+
"end": "\"",
|
85
|
+
"endCaptures": {
|
86
|
+
"0": {
|
87
|
+
"name": "punctuation.definition.string.end.dm"
|
88
|
+
}
|
89
|
+
},
|
90
|
+
"name": "string.quoted.double.dm",
|
91
|
+
"patterns": [
|
92
|
+
{
|
93
|
+
"include": "#string_escaped_char"
|
94
|
+
},
|
95
|
+
{
|
96
|
+
"include": "#string_embedded_expression"
|
97
|
+
}
|
98
|
+
]
|
99
|
+
},
|
100
|
+
{
|
101
|
+
"begin": "'",
|
102
|
+
"beginCaptures": {
|
103
|
+
"0": {
|
104
|
+
"name": "punctuation.definition.string.begin.dm"
|
105
|
+
}
|
106
|
+
},
|
107
|
+
"end": "'",
|
108
|
+
"endCaptures": {
|
109
|
+
"0": {
|
110
|
+
"name": "punctuation.definition.string.end.dm"
|
111
|
+
}
|
112
|
+
},
|
113
|
+
"name": "string.quoted.single.dm",
|
114
|
+
"patterns": [
|
115
|
+
{
|
116
|
+
"include": "#string_escaped_char"
|
117
|
+
}
|
118
|
+
]
|
119
|
+
},
|
120
|
+
{
|
121
|
+
"begin": "(?x)\n^\\s* ((\\#)\\s*define) \\s+ # define\n((?<id>[a-zA-Z_][a-zA-Z0-9_]*)) # macro name\n(?:\n\t(\\()\n\t\t(\n\t\t\t\\s* \\g<id> \\s* # first argument\n\t\t\t((,) \\s* \\g<id> \\s*)* # additional arguments\n\t\t\t(?:\\.\\.\\.)? # varargs ellipsis?\n\t\t)\n\t(\\))\n)?",
|
122
|
+
"beginCaptures": {
|
123
|
+
"1": {
|
124
|
+
"name": "keyword.control.directive.define.dm"
|
125
|
+
},
|
126
|
+
"2": {
|
127
|
+
"name": "punctuation.definition.directive.dm"
|
128
|
+
},
|
129
|
+
"3": {
|
130
|
+
"name": "entity.name.function.preprocessor.dm"
|
131
|
+
},
|
132
|
+
"5": {
|
133
|
+
"name": "punctuation.definition.parameters.begin.dm"
|
134
|
+
},
|
135
|
+
"6": {
|
136
|
+
"name": "variable.parameter.preprocessor.dm"
|
137
|
+
},
|
138
|
+
"8": {
|
139
|
+
"name": "punctuation.separator.parameters.dm"
|
140
|
+
},
|
141
|
+
"9": {
|
142
|
+
"name": "punctuation.definition.parameters.end.dm"
|
143
|
+
}
|
144
|
+
},
|
145
|
+
"end": "(?=(?://|/\\*))|(?<!\\\\)(?=\\n)",
|
146
|
+
"name": "meta.preprocessor.macro.dm",
|
147
|
+
"patterns": [
|
148
|
+
{
|
149
|
+
"include": "$base"
|
150
|
+
}
|
151
|
+
]
|
152
|
+
},
|
153
|
+
{
|
154
|
+
"begin": "^\\s*(#\\s*(error|warn))\\b",
|
155
|
+
"captures": {
|
156
|
+
"1": {
|
157
|
+
"name": "keyword.control.import.error.dm"
|
158
|
+
}
|
159
|
+
},
|
160
|
+
"end": "$",
|
161
|
+
"name": "meta.preprocessor.diagnostic.dm",
|
162
|
+
"patterns": [
|
163
|
+
{
|
164
|
+
"match": "(?>\\\\\\s*\\n)",
|
165
|
+
"name": "punctuation.separator.continuation.dm"
|
166
|
+
}
|
167
|
+
]
|
168
|
+
},
|
169
|
+
{
|
170
|
+
"begin": "^\\s*(?:((#)\\s*(?:elif|else|if|ifdef|ifndef))|((#)\\s*(undef|include)))\\b",
|
171
|
+
"beginCaptures": {
|
172
|
+
"1": {
|
173
|
+
"name": "keyword.control.directive.conditional.dm"
|
174
|
+
},
|
175
|
+
"2": {
|
176
|
+
"name": "punctuation.definition.directive.dm"
|
177
|
+
},
|
178
|
+
"3": {
|
179
|
+
"name": "keyword.control.directive.$5.dm"
|
180
|
+
},
|
181
|
+
"4": {
|
182
|
+
"name": "punctuation.definition.directive.dm"
|
183
|
+
}
|
184
|
+
},
|
185
|
+
"end": "(?=(?://|/\\*))|(?<!\\\\)(?=\\n)",
|
186
|
+
"name": "meta.preprocessor.dm",
|
187
|
+
"patterns": [
|
188
|
+
{
|
189
|
+
"match": "(?>\\\\\\s*\\n)",
|
190
|
+
"name": "punctuation.separator.continuation.dm"
|
191
|
+
}
|
192
|
+
]
|
193
|
+
},
|
194
|
+
{
|
195
|
+
"include": "#block"
|
196
|
+
},
|
197
|
+
{
|
198
|
+
"begin": "(?x)\n\t\t\t\t(?: ^ # begin-of-line\n\t\t\t\t\t|\n\t\t\t\t\t\t (?: (?= \\s ) (?<!else|new|return) (?<=\\w) # or word + space before name\n\t\t\t\t\t\t\t | (?= \\s*[A-Za-z_] ) (?<!&&) (?<=[*&>]) # or type modifier before name\n\t\t\t\t\t\t )\n\t\t\t\t)\n\t\t\t\t(\\s*) (?!(while|for|do|if|else|switch|catch|enumerate|return|r?iterate)\\s*\\()\n\t\t\t\t(\n\t\t\t\t\t(?: [A-Za-z_][A-Za-z0-9_]*+ | :: )++ | # actual name\n\t\t\t\t\t(?: (?<=operator) (?: [-*&<>=+!]+ | \\(\\) | \\[\\] ) ) # if it is a C++ operator\n\t\t\t\t)\n\t\t\t\t \\s*(?=\\()",
|
199
|
+
"beginCaptures": {
|
200
|
+
"1": {
|
201
|
+
"name": "punctuation.whitespace.function.leading.dm"
|
202
|
+
},
|
203
|
+
"3": {
|
204
|
+
"name": "entity.name.function.dm"
|
205
|
+
},
|
206
|
+
"4": {
|
207
|
+
"name": "punctuation.definition.parameters.dm"
|
208
|
+
}
|
209
|
+
},
|
210
|
+
"end": "(?<=\\})|(?=#)|(;)?",
|
211
|
+
"name": "meta.function.dm",
|
212
|
+
"patterns": [
|
213
|
+
{
|
214
|
+
"include": "#comments"
|
215
|
+
},
|
216
|
+
{
|
217
|
+
"include": "#parens"
|
218
|
+
},
|
219
|
+
{
|
220
|
+
"match": "\\bconst\\b",
|
221
|
+
"name": "storage.modifier.dm"
|
222
|
+
},
|
223
|
+
{
|
224
|
+
"include": "#block"
|
225
|
+
}
|
226
|
+
]
|
227
|
+
}
|
228
|
+
],
|
229
|
+
"repository": {
|
230
|
+
"access": {
|
231
|
+
"match": "\\.[a-zA-Z_][a-zA-Z_0-9]*\\b(?!\\s*\\()",
|
232
|
+
"name": "variable.other.dot-access.dm"
|
233
|
+
},
|
234
|
+
"block": {
|
235
|
+
"begin": "\\{",
|
236
|
+
"end": "\\}",
|
237
|
+
"name": "meta.block.dm",
|
238
|
+
"patterns": [
|
239
|
+
{
|
240
|
+
"include": "#block_innards"
|
241
|
+
}
|
242
|
+
]
|
243
|
+
},
|
244
|
+
"block_innards": {
|
245
|
+
"patterns": [
|
246
|
+
{
|
247
|
+
"include": "#preprocessor-rule-enabled-block"
|
248
|
+
},
|
249
|
+
{
|
250
|
+
"include": "#preprocessor-rule-disabled-block"
|
251
|
+
},
|
252
|
+
{
|
253
|
+
"include": "#preprocessor-rule-other-block"
|
254
|
+
},
|
255
|
+
{
|
256
|
+
"include": "#access"
|
257
|
+
},
|
258
|
+
{
|
259
|
+
"captures": {
|
260
|
+
"1": {
|
261
|
+
"name": "punctuation.whitespace.function-call.leading.dm"
|
262
|
+
},
|
263
|
+
"2": {
|
264
|
+
"name": "support.function.any-method.dm"
|
265
|
+
},
|
266
|
+
"3": {
|
267
|
+
"name": "punctuation.definition.parameters.dm"
|
268
|
+
}
|
269
|
+
},
|
270
|
+
"match": "(?x) (?: (?= \\s ) (?:(?<=else|new|return) | (?<!\\w)) (\\s+))?\n\t\t\t(\\b\n\t\t\t\t(?!(while|for|do|if|else|switch|catch|enumerate|return|r?iterate)\\s*\\()(?:(?!NS)[A-Za-z_][A-Za-z0-9_]*+\\b | :: )++ # actual name\n\t\t\t)\n\t\t\t \\s*(\\()",
|
271
|
+
"name": "meta.function-call.dm"
|
272
|
+
},
|
273
|
+
{
|
274
|
+
"captures": {
|
275
|
+
"1": {
|
276
|
+
"name": "variable.other.dm"
|
277
|
+
},
|
278
|
+
"2": {
|
279
|
+
"name": "punctuation.definition.parameters.dm"
|
280
|
+
}
|
281
|
+
},
|
282
|
+
"match": "(?x)\n\t\t\t\t\t\t\t(?x)\n\t\t\t(?:\n\t\t\t\t\t (?: (?= \\s ) (?<!else|new|return) (?<=\\w)\\s+ # or word + space before name\n\t\t\t\t\t )\n\t\t\t)\n\t\t\t(\n\t\t\t\t(?: [A-Za-z_][A-Za-z0-9_]*+ | :: )++ | # actual name\n\t\t\t\t(?: (?<=operator) (?: [-*&<>=+!]+ | \\(\\) | \\[\\] ) )? # if it is a C++ operator\n\t\t\t)\n\t\t\t \\s*(\\()",
|
283
|
+
"name": "meta.initialization.dm"
|
284
|
+
},
|
285
|
+
{
|
286
|
+
"include": "#block"
|
287
|
+
},
|
288
|
+
{
|
289
|
+
"include": "$base"
|
290
|
+
}
|
291
|
+
]
|
292
|
+
},
|
293
|
+
"comments": {
|
294
|
+
"patterns": [
|
295
|
+
{
|
296
|
+
"captures": {
|
297
|
+
"1": {
|
298
|
+
"name": "meta.toc-list.banner.block.dm"
|
299
|
+
}
|
300
|
+
},
|
301
|
+
"match": "^/\\* =(\\s*.*?)\\s*= \\*/$\\n?",
|
302
|
+
"name": "comment.block.dm"
|
303
|
+
},
|
304
|
+
{
|
305
|
+
"begin": "/\\*",
|
306
|
+
"captures": {
|
307
|
+
"0": {
|
308
|
+
"name": "punctuation.definition.comment.dm"
|
309
|
+
}
|
310
|
+
},
|
311
|
+
"end": "\\*/",
|
312
|
+
"name": "comment.block.dm"
|
313
|
+
},
|
314
|
+
{
|
315
|
+
"match": "\\*/.*\\n",
|
316
|
+
"name": "invalid.illegal.stray-comment-end.dm"
|
317
|
+
},
|
318
|
+
{
|
319
|
+
"captures": {
|
320
|
+
"1": {
|
321
|
+
"name": "meta.toc-list.banner.line.dm"
|
322
|
+
}
|
323
|
+
},
|
324
|
+
"match": "^// =(\\s*.*?)\\s*=\\s*$\\n?",
|
325
|
+
"name": "comment.line.banner.dm"
|
326
|
+
},
|
327
|
+
{
|
328
|
+
"begin": "//",
|
329
|
+
"beginCaptures": {
|
330
|
+
"0": {
|
331
|
+
"name": "punctuation.definition.comment.dm"
|
332
|
+
}
|
333
|
+
},
|
334
|
+
"end": "$\\n?",
|
335
|
+
"name": "comment.line.double-slash.dm",
|
336
|
+
"patterns": [
|
337
|
+
{
|
338
|
+
"match": "(?>\\\\\\s*\\n)",
|
339
|
+
"name": "punctuation.separator.continuation.dm"
|
340
|
+
}
|
341
|
+
]
|
342
|
+
}
|
343
|
+
]
|
344
|
+
},
|
345
|
+
"disabled": {
|
346
|
+
"begin": "^\\s*#\\s*if(n?def)?\\b.*$",
|
347
|
+
"comment": "eat nested preprocessor if(def)s",
|
348
|
+
"end": "^\\s*#\\s*endif\\b.*$",
|
349
|
+
"patterns": [
|
350
|
+
{
|
351
|
+
"include": "#disabled"
|
352
|
+
}
|
353
|
+
]
|
354
|
+
},
|
355
|
+
"parens": {
|
356
|
+
"begin": "\\(",
|
357
|
+
"end": "\\)",
|
358
|
+
"name": "meta.parens.dm",
|
359
|
+
"patterns": [
|
360
|
+
{
|
361
|
+
"include": "$base"
|
362
|
+
}
|
363
|
+
]
|
364
|
+
},
|
365
|
+
"preprocessor-rule-disabled": {
|
366
|
+
"begin": "^\\s*(#(if)\\s+(0)\\b).*",
|
367
|
+
"captures": {
|
368
|
+
"1": {
|
369
|
+
"name": "meta.preprocessor.dm"
|
370
|
+
},
|
371
|
+
"2": {
|
372
|
+
"name": "keyword.control.import.if.dm"
|
373
|
+
},
|
374
|
+
"3": {
|
375
|
+
"name": "constant.numeric.preprocessor.dm"
|
376
|
+
}
|
377
|
+
},
|
378
|
+
"end": "^\\s*(#\\s*(endif)\\b)",
|
379
|
+
"patterns": [
|
380
|
+
{
|
381
|
+
"begin": "^\\s*(#\\s*(else)\\b)",
|
382
|
+
"captures": {
|
383
|
+
"1": {
|
384
|
+
"name": "meta.preprocessor.dm"
|
385
|
+
},
|
386
|
+
"2": {
|
387
|
+
"name": "keyword.control.import.else.dm"
|
388
|
+
}
|
389
|
+
},
|
390
|
+
"end": "(?=^\\s*#\\s*endif\\b.*$)",
|
391
|
+
"patterns": [
|
392
|
+
{
|
393
|
+
"include": "$base"
|
394
|
+
}
|
395
|
+
]
|
396
|
+
},
|
397
|
+
{
|
398
|
+
"begin": "",
|
399
|
+
"end": "(?=^\\s*#\\s*(else|endif)\\b.*$)",
|
400
|
+
"name": "comment.block.preprocessor.if-branch",
|
401
|
+
"patterns": [
|
402
|
+
{
|
403
|
+
"include": "#disabled"
|
404
|
+
}
|
405
|
+
]
|
406
|
+
}
|
407
|
+
]
|
408
|
+
},
|
409
|
+
"preprocessor-rule-disabled-block": {
|
410
|
+
"begin": "^\\s*(#(if)\\s+(0)\\b).*",
|
411
|
+
"captures": {
|
412
|
+
"1": {
|
413
|
+
"name": "meta.preprocessor.dm"
|
414
|
+
},
|
415
|
+
"2": {
|
416
|
+
"name": "keyword.control.import.if.dm"
|
417
|
+
},
|
418
|
+
"3": {
|
419
|
+
"name": "constant.numeric.preprocessor.dm"
|
420
|
+
}
|
421
|
+
},
|
422
|
+
"end": "^\\s*(#\\s*(endif)\\b)",
|
423
|
+
"patterns": [
|
424
|
+
{
|
425
|
+
"begin": "^\\s*(#\\s*(else)\\b)",
|
426
|
+
"captures": {
|
427
|
+
"1": {
|
428
|
+
"name": "meta.preprocessor.dm"
|
429
|
+
},
|
430
|
+
"2": {
|
431
|
+
"name": "keyword.control.import.else.dm"
|
432
|
+
}
|
433
|
+
},
|
434
|
+
"end": "(?=^\\s*#\\s*endif\\b.*$)",
|
435
|
+
"patterns": [
|
436
|
+
{
|
437
|
+
"include": "#block_innards"
|
438
|
+
}
|
439
|
+
]
|
440
|
+
},
|
441
|
+
{
|
442
|
+
"begin": "",
|
443
|
+
"end": "(?=^\\s*#\\s*(else|endif)\\b.*$)",
|
444
|
+
"name": "comment.block.preprocessor.if-branch.in-block",
|
445
|
+
"patterns": [
|
446
|
+
{
|
447
|
+
"include": "#disabled"
|
448
|
+
}
|
449
|
+
]
|
450
|
+
}
|
451
|
+
]
|
452
|
+
},
|
453
|
+
"preprocessor-rule-enabled": {
|
454
|
+
"begin": "^\\s*(#(if)\\s+(0*1)\\b)",
|
455
|
+
"captures": {
|
456
|
+
"1": {
|
457
|
+
"name": "meta.preprocessor.dm"
|
458
|
+
},
|
459
|
+
"2": {
|
460
|
+
"name": "keyword.control.import.if.dm"
|
461
|
+
},
|
462
|
+
"3": {
|
463
|
+
"name": "constant.numeric.preprocessor.dm"
|
464
|
+
}
|
465
|
+
},
|
466
|
+
"end": "^\\s*(#\\s*(endif)\\b)",
|
467
|
+
"patterns": [
|
468
|
+
{
|
469
|
+
"begin": "^\\s*(#\\s*(else)\\b).*",
|
470
|
+
"captures": {
|
471
|
+
"1": {
|
472
|
+
"name": "meta.preprocessor.dm"
|
473
|
+
},
|
474
|
+
"2": {
|
475
|
+
"name": "keyword.control.import.else.dm"
|
476
|
+
}
|
477
|
+
},
|
478
|
+
"contentName": "comment.block.preprocessor.else-branch",
|
479
|
+
"end": "(?=^\\s*#\\s*endif\\b.*$)",
|
480
|
+
"patterns": [
|
481
|
+
{
|
482
|
+
"include": "#disabled"
|
483
|
+
}
|
484
|
+
]
|
485
|
+
},
|
486
|
+
{
|
487
|
+
"begin": "",
|
488
|
+
"end": "(?=^\\s*#\\s*(else|endif)\\b.*$)",
|
489
|
+
"patterns": [
|
490
|
+
{
|
491
|
+
"include": "$base"
|
492
|
+
}
|
493
|
+
]
|
494
|
+
}
|
495
|
+
]
|
496
|
+
},
|
497
|
+
"preprocessor-rule-enabled-block": {
|
498
|
+
"begin": "^\\s*(#(if)\\s+(0*1)\\b)",
|
499
|
+
"captures": {
|
500
|
+
"1": {
|
501
|
+
"name": "meta.preprocessor.dm"
|
502
|
+
},
|
503
|
+
"2": {
|
504
|
+
"name": "keyword.control.import.if.dm"
|
505
|
+
},
|
506
|
+
"3": {
|
507
|
+
"name": "constant.numeric.preprocessor.dm"
|
508
|
+
}
|
509
|
+
},
|
510
|
+
"end": "^\\s*(#\\s*(endif)\\b)",
|
511
|
+
"patterns": [
|
512
|
+
{
|
513
|
+
"begin": "^\\s*(#\\s*(else)\\b).*",
|
514
|
+
"captures": {
|
515
|
+
"1": {
|
516
|
+
"name": "meta.preprocessor.dm"
|
517
|
+
},
|
518
|
+
"2": {
|
519
|
+
"name": "keyword.control.import.else.dm"
|
520
|
+
}
|
521
|
+
},
|
522
|
+
"contentName": "comment.block.preprocessor.else-branch.in-block",
|
523
|
+
"end": "(?=^\\s*#\\s*endif\\b.*$)",
|
524
|
+
"patterns": [
|
525
|
+
{
|
526
|
+
"include": "#disabled"
|
527
|
+
}
|
528
|
+
]
|
529
|
+
},
|
530
|
+
{
|
531
|
+
"begin": "",
|
532
|
+
"end": "(?=^\\s*#\\s*(else|endif)\\b.*$)",
|
533
|
+
"patterns": [
|
534
|
+
{
|
535
|
+
"include": "#block_innards"
|
536
|
+
}
|
537
|
+
]
|
538
|
+
}
|
539
|
+
]
|
540
|
+
},
|
541
|
+
"preprocessor-rule-other": {
|
542
|
+
"begin": "^\\s*((#\\s*(if(n?def)?))\\b.*?(?:(?=(?://|/\\*))|$))",
|
543
|
+
"captures": {
|
544
|
+
"1": {
|
545
|
+
"name": "meta.preprocessor.dm"
|
546
|
+
},
|
547
|
+
"2": {
|
548
|
+
"name": "keyword.control.import.dm"
|
549
|
+
}
|
550
|
+
},
|
551
|
+
"end": "^\\s*((#\\s*(endif))\\b).*$",
|
552
|
+
"patterns": [
|
553
|
+
{
|
554
|
+
"include": "$base"
|
555
|
+
}
|
556
|
+
]
|
557
|
+
},
|
558
|
+
"preprocessor-rule-other-block": {
|
559
|
+
"begin": "^\\s*(#\\s*(if(n?def)?)\\b.*?(?:(?=(?://|/\\*))|$))",
|
560
|
+
"captures": {
|
561
|
+
"1": {
|
562
|
+
"name": "meta.preprocessor.dm"
|
563
|
+
},
|
564
|
+
"2": {
|
565
|
+
"name": "keyword.control.import.dm"
|
566
|
+
}
|
567
|
+
},
|
568
|
+
"end": "^\\s*(#\\s*(endif)\\b).*$",
|
569
|
+
"patterns": [
|
570
|
+
{
|
571
|
+
"include": "#block_innards"
|
572
|
+
}
|
573
|
+
]
|
574
|
+
},
|
575
|
+
"string_embedded_expression": {
|
576
|
+
"patterns": [
|
577
|
+
{
|
578
|
+
"begin": "(?<!\\\\)\\[",
|
579
|
+
"end": "\\]",
|
580
|
+
"name": "string.interpolated.dm",
|
581
|
+
"patterns": [
|
582
|
+
{
|
583
|
+
"include": "$self"
|
584
|
+
}
|
585
|
+
]
|
586
|
+
}
|
587
|
+
]
|
588
|
+
},
|
589
|
+
"string_escaped_char": {
|
590
|
+
"patterns": [
|
591
|
+
{
|
592
|
+
"match": "(?x)\n\\\\\n(\n\th(?:(?:er|im)self|ers|im)\n\t|([tTsS]?he) # Weird regex to match The, the, She, she and he at once.\n\t|He\n\t|[Hh]is\n\t|[aA]n?\n\t|(?:im)?proper\n\t|\\.\\.\\.\n\t|(?:icon|ref|[Rr]oman)(?=\\[) # Macros which need a [] after them.\n\t|[s<>\"n\\n ]\n)",
|
593
|
+
"name": "constant.character.escape.dm"
|
594
|
+
},
|
595
|
+
{
|
596
|
+
"match": "\\\\.",
|
597
|
+
"name": "invalid.illegal.unknown-escape.dm"
|
598
|
+
}
|
599
|
+
]
|
600
|
+
}
|
601
|
+
},
|
602
|
+
"scopeName": "source.dm"
|
603
|
+
}
|