github-linguist 7.4.0 → 7.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/grammars/annotation.liquidhaskell.haskell.json +15 -4
- data/grammars/hint.haskell.json +15 -4
- data/grammars/hint.message.haskell.json +15 -4
- data/grammars/hint.type.haskell.json +15 -4
- data/grammars/source.abap.json +14 -3
- data/grammars/source.apl.json +19 -2
- data/grammars/source.ats.json +17 -87
- data/grammars/source.ballerina.json +14 -19
- data/grammars/source.crystal.json +14 -2
- data/grammars/source.csound.json +37 -0
- data/grammars/source.css.json +25 -1
- data/grammars/source.css.scss.json +1724 -0
- data/grammars/source.gf.json +51 -0
- data/grammars/source.glsl.json +1 -1
- data/grammars/source.hack.json +2523 -0
- data/grammars/source.haskell.json +15 -4
- data/grammars/source.hc.json +709 -0
- data/grammars/source.hsig.json +15 -4
- data/grammars/source.hx.json +10 -6
- data/grammars/source.jolie.json +1 -1
- data/grammars/source.julia.json +114 -6
- data/grammars/source.m68k.json +412 -0
- data/grammars/source.mcfunction.json +62 -18
- data/grammars/source.objectscript.json +309 -0
- data/grammars/source.objectscript_class.json +674 -0
- data/grammars/source.objectscript_csp.json +19 -0
- data/grammars/source.objectscript_macros.json +226 -0
- data/grammars/source.powershell.json +21 -57
- data/grammars/source.rust.json +1 -1
- data/grammars/source.sass.json +836 -142
- data/grammars/source.sassdoc.json +346 -0
- data/grammars/source.scala.json +110 -10
- data/grammars/source.sqf.json +2 -1
- data/grammars/source.svelte.json +827 -0
- data/grammars/source.ts.json +8 -4
- data/grammars/source.tsql.json +507 -0
- data/grammars/source.tsx.json +8 -4
- data/grammars/source.viml.json +1 -1
- data/grammars/source.vtt.json +702 -0
- data/grammars/source.wollok.json +100 -0
- data/grammars/source.xojo.json +85 -0
- data/grammars/source.yara.json +3 -2
- data/grammars/source.zeek.json +412 -0
- data/grammars/source.zenscript.json +282 -0
- data/grammars/source.zig.json +2 -11
- data/grammars/text.haml.json +1 -1
- data/grammars/text.html.php.blade.json +3 -3
- data/grammars/text.html.vue.json +41 -1
- data/grammars/text.slim.json +1 -1
- data/grammars/text.tex.latex.haskell.json +15 -4
- data/grammars/version +1 -1
- data/lib/linguist/VERSION +1 -1
- data/lib/linguist/blob_helper.rb +5 -10
- data/lib/linguist/generated.rb +10 -2
- data/lib/linguist/heuristics.yml +14 -3
- data/lib/linguist/language.rb +3 -2
- data/lib/linguist/languages.json +1 -1
- data/lib/linguist/languages.yml +151 -16
- data/lib/linguist/samples.json +9844 -1711
- data/lib/linguist/samples.rb +8 -5
- data/lib/linguist/shebang.rb +6 -0
- data/lib/linguist/vendor.yml +3 -0
- metadata +25 -10
- data/grammars/source.bro.json +0 -403
- data/grammars/source.scss.json +0 -1287
@@ -357,7 +357,7 @@
|
|
357
357
|
{
|
358
358
|
"name": "meta.declaration.instance.deriving.haskell",
|
359
359
|
"contentName": "meta.type-signature.haskell",
|
360
|
-
"begin": "^([ \\t]*)(?:(deriving)(?:\\s+([\\p{Ll}_][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*))?)\\s+(instance)(?:(?\u003c=[\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}'])(?![\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']))",
|
360
|
+
"begin": "^([ \\t]*)(?:(?:(deriving)(?:\\s+([\\p{Ll}_][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*))?)\\s+|(deriving)\\s+(via)\\s+(.*)\\s+)?(instance)(?:(?\u003c=[\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}'])(?![\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']))",
|
361
361
|
"end": "^(?!\\1[ \\t]|[ \\t]*$)",
|
362
362
|
"patterns": [
|
363
363
|
{
|
@@ -365,9 +365,6 @@
|
|
365
365
|
},
|
366
366
|
{
|
367
367
|
"include": "#type_signature"
|
368
|
-
},
|
369
|
-
{
|
370
|
-
"include": "#deriving_via"
|
371
368
|
}
|
372
369
|
],
|
373
370
|
"beginCaptures": {
|
@@ -383,6 +380,20 @@
|
|
383
380
|
},
|
384
381
|
"4": {
|
385
382
|
"name": "keyword.other.haskell"
|
383
|
+
},
|
384
|
+
"5": {
|
385
|
+
"name": "keyword.other.haskell"
|
386
|
+
},
|
387
|
+
"6": {
|
388
|
+
"name": "meta.type-signature.haskell",
|
389
|
+
"patterns": [
|
390
|
+
{
|
391
|
+
"include": "#type_signature"
|
392
|
+
}
|
393
|
+
]
|
394
|
+
},
|
395
|
+
"7": {
|
396
|
+
"name": "keyword.other.haskell"
|
386
397
|
}
|
387
398
|
}
|
388
399
|
}
|
@@ -0,0 +1,709 @@
|
|
1
|
+
{
|
2
|
+
"name": "HolyC",
|
3
|
+
"scopeName": "source.hc",
|
4
|
+
"patterns": [
|
5
|
+
{
|
6
|
+
"include": "#preprocessor-rule-enabled"
|
7
|
+
},
|
8
|
+
{
|
9
|
+
"include": "#preprocessor-rule-disabled"
|
10
|
+
},
|
11
|
+
{
|
12
|
+
"include": "#preprocessor-rule-other"
|
13
|
+
},
|
14
|
+
{
|
15
|
+
"include": "#comments"
|
16
|
+
},
|
17
|
+
{
|
18
|
+
"name": "keyword.control.c",
|
19
|
+
"match": "\\b(break|case|continue|default|do|else|for|goto|if|return|switch|while|throw|try|catch|extern|MOV|CALL|PUSH|LEAVE|RET|SUB|SHR|ADD|RETF|CMP|JNE|BTS|INT|XOR|JC|JZ|LOOP|POP|TEST|SHL|ADC|SBB|JMP|INC)\\b"
|
20
|
+
},
|
21
|
+
{
|
22
|
+
"name": "storage.type.c",
|
23
|
+
"match": "\\b(U0|I8|U8|I16|U16|I32|U32|I64|U64|F64|Bool|class|union|DU8|DU16|DU32|DU64|RAX|RCX|RDX|RBX|RSP|RBP|RSI|RDI|EAX|ECX|EDX|EBX|ESP|EBP|ESI|EDI|AX|CX|DX|BX|SP|BP|SI|DI|SS|CS|DS|ES|FS|GS|CH)\\b"
|
24
|
+
},
|
25
|
+
{
|
26
|
+
"name": "storage.modifier.c",
|
27
|
+
"match": "\\b(asm|const|extern|register|restrict|static|volatile|inline|_extern|_import|IMPORT|public)\\b"
|
28
|
+
},
|
29
|
+
{
|
30
|
+
"name": "constant.other.variable.mac-classic.c",
|
31
|
+
"match": "\\bk[A-Z]\\w*\\b"
|
32
|
+
},
|
33
|
+
{
|
34
|
+
"name": "variable.other.readwrite.global.mac-classic.c",
|
35
|
+
"match": "\\bg[A-Z]\\w*\\b"
|
36
|
+
},
|
37
|
+
{
|
38
|
+
"name": "variable.other.readwrite.static.mac-classic.c",
|
39
|
+
"match": "\\bs[A-Z]\\w*\\b"
|
40
|
+
},
|
41
|
+
{
|
42
|
+
"name": "constant.language.c",
|
43
|
+
"match": "\\b(NULL|TRUE|FALSE|ON|OFF)\\b"
|
44
|
+
},
|
45
|
+
{
|
46
|
+
"include": "#sizeof"
|
47
|
+
},
|
48
|
+
{
|
49
|
+
"name": "constant.numeric.c",
|
50
|
+
"match": "(?x)\\b\n\t\t\t( (?i:\n\t\t\t 0x ( [0-9A-Fa-f]+ ( ' [0-9A-Fa-f]+ )* )? # Hexadecimal\n\t\t\t | 0b ( [0-1]+ ( ' [0-1]+ )* )? # Binary\n\t\t\t | 0 ( [0-7]+ ( ' [0-7]+ )* ) # Octal\n\t\t\t | ( [0-9]+ ( ' [0-9]+ )* ) # Decimal\n\t\t\t )\n\t\t\t ( ([uUfF] | u?ll? | U?LL?)\\b | (?\u003cinc\u003e') | \\b )\n\t\t\t| ( [0-9]+ ( ' [0-9]+ )* )?\n\t\t\t (?i:\n\t\t\t \\. ( [0-9]+ ( ' [0-9]+ )* ) E(\\+|-)? ( [0-9]+ ( ' [0-9]+ )* )\n\t\t\t | \\. ( [0-9]+ ( ' [0-9]+ )* )\n\t\t\t | E(\\+|-)? ( [0-9]+ ( ' [0-9]+ )* )\n\t\t\t )\n\t\t\t ( (?\u003cinc\u003e') | \\b )\n\t\t\t)",
|
51
|
+
"captures": {
|
52
|
+
"inc": {
|
53
|
+
"name": "invalid.illegal.digit-separator-should-not-be-last.c++"
|
54
|
+
}
|
55
|
+
}
|
56
|
+
},
|
57
|
+
{
|
58
|
+
"name": "string.quoted.double.c",
|
59
|
+
"begin": "\"",
|
60
|
+
"end": "\"",
|
61
|
+
"patterns": [
|
62
|
+
{
|
63
|
+
"include": "#string_escaped_char"
|
64
|
+
},
|
65
|
+
{
|
66
|
+
"include": "#string_placeholder"
|
67
|
+
}
|
68
|
+
],
|
69
|
+
"beginCaptures": {
|
70
|
+
"0": {
|
71
|
+
"name": "punctuation.definition.string.begin.c"
|
72
|
+
}
|
73
|
+
},
|
74
|
+
"endCaptures": {
|
75
|
+
"0": {
|
76
|
+
"name": "punctuation.definition.string.end.c"
|
77
|
+
}
|
78
|
+
}
|
79
|
+
},
|
80
|
+
{
|
81
|
+
"name": "string.quoted.single.c",
|
82
|
+
"begin": "'",
|
83
|
+
"end": "'",
|
84
|
+
"patterns": [
|
85
|
+
{
|
86
|
+
"include": "#string_escaped_char"
|
87
|
+
}
|
88
|
+
],
|
89
|
+
"beginCaptures": {
|
90
|
+
"0": {
|
91
|
+
"name": "punctuation.definition.string.begin.c"
|
92
|
+
}
|
93
|
+
},
|
94
|
+
"endCaptures": {
|
95
|
+
"0": {
|
96
|
+
"name": "punctuation.definition.string.end.c"
|
97
|
+
}
|
98
|
+
}
|
99
|
+
},
|
100
|
+
{
|
101
|
+
"name": "meta.preprocessor.macro.c",
|
102
|
+
"begin": "(?x)\n \t\t^\\s*\\#\\s*(define)\\s+ # define\n \t\t((?\u003cid\u003e[a-zA-Z_][a-zA-Z0-9_]*)) # macro name\n \t\t(?: # and optionally:\n \t\t (\\() # an open parenthesis\n \t\t (\n \t\t \\s* \\g\u003cid\u003e \\s* # first argument\n \t\t ((,) \\s* \\g\u003cid\u003e \\s*)* # additional arguments\n \t\t (?:\\.\\.\\.)? # varargs ellipsis?\n \t\t )\n \t\t (\\)) # a close parenthesis\n \t\t)?\n \t",
|
103
|
+
"end": "(?=(?://|/\\*))|$",
|
104
|
+
"patterns": [
|
105
|
+
{
|
106
|
+
"name": "punctuation.separator.continuation.c",
|
107
|
+
"match": "(?\u003e\\\\\\s*\\n)"
|
108
|
+
},
|
109
|
+
{
|
110
|
+
"include": "$base"
|
111
|
+
}
|
112
|
+
],
|
113
|
+
"beginCaptures": {
|
114
|
+
"1": {
|
115
|
+
"name": "keyword.control.import.define.c"
|
116
|
+
},
|
117
|
+
"2": {
|
118
|
+
"name": "entity.name.function.preprocessor.c"
|
119
|
+
},
|
120
|
+
"4": {
|
121
|
+
"name": "punctuation.definition.parameters.begin.c"
|
122
|
+
},
|
123
|
+
"5": {
|
124
|
+
"name": "variable.parameter.preprocessor.c"
|
125
|
+
},
|
126
|
+
"7": {
|
127
|
+
"name": "punctuation.separator.parameters.c"
|
128
|
+
},
|
129
|
+
"8": {
|
130
|
+
"name": "punctuation.definition.parameters.end.c"
|
131
|
+
}
|
132
|
+
}
|
133
|
+
},
|
134
|
+
{
|
135
|
+
"name": "meta.preprocessor.diagnostic.c",
|
136
|
+
"begin": "^\\s*#\\s*(error|warning|help_index|assert)\\b",
|
137
|
+
"end": "$",
|
138
|
+
"patterns": [
|
139
|
+
{
|
140
|
+
"name": "punctuation.separator.continuation.c",
|
141
|
+
"match": "(?\u003e\\\\\\s*\\n)"
|
142
|
+
}
|
143
|
+
],
|
144
|
+
"captures": {
|
145
|
+
"1": {
|
146
|
+
"name": "keyword.control.import.error.c"
|
147
|
+
}
|
148
|
+
}
|
149
|
+
},
|
150
|
+
{
|
151
|
+
"name": "meta.preprocessor.c.include",
|
152
|
+
"begin": "^\\s*#\\s*(include|import|exe)\\b",
|
153
|
+
"end": "(?=(?://|/\\*))|$",
|
154
|
+
"patterns": [
|
155
|
+
{
|
156
|
+
"name": "punctuation.separator.continuation.c",
|
157
|
+
"match": "(?\u003e\\\\\\s*\\n)"
|
158
|
+
},
|
159
|
+
{
|
160
|
+
"name": "string.quoted.double.include.c",
|
161
|
+
"begin": "\"",
|
162
|
+
"end": "\"",
|
163
|
+
"beginCaptures": {
|
164
|
+
"0": {
|
165
|
+
"name": "punctuation.definition.string.begin.c"
|
166
|
+
}
|
167
|
+
},
|
168
|
+
"endCaptures": {
|
169
|
+
"0": {
|
170
|
+
"name": "punctuation.definition.string.end.c"
|
171
|
+
}
|
172
|
+
}
|
173
|
+
},
|
174
|
+
{
|
175
|
+
"name": "string.quoted.other.lt-gt.include.c",
|
176
|
+
"begin": "\u003c",
|
177
|
+
"end": "\u003e",
|
178
|
+
"beginCaptures": {
|
179
|
+
"0": {
|
180
|
+
"name": "punctuation.definition.string.begin.c"
|
181
|
+
}
|
182
|
+
},
|
183
|
+
"endCaptures": {
|
184
|
+
"0": {
|
185
|
+
"name": "punctuation.definition.string.end.c"
|
186
|
+
}
|
187
|
+
}
|
188
|
+
}
|
189
|
+
],
|
190
|
+
"captures": {
|
191
|
+
"1": {
|
192
|
+
"name": "keyword.control.import.include.c"
|
193
|
+
}
|
194
|
+
}
|
195
|
+
},
|
196
|
+
{
|
197
|
+
"include": "#pragma-mark"
|
198
|
+
},
|
199
|
+
{
|
200
|
+
"name": "meta.preprocessor.c",
|
201
|
+
"begin": "^\\s*#\\s*(define|defined|elif|else|if|ifdef|ifndef|line|pragma|undef)\\b",
|
202
|
+
"end": "(?=(?://|/\\*))|$",
|
203
|
+
"patterns": [
|
204
|
+
{
|
205
|
+
"name": "punctuation.separator.continuation.c",
|
206
|
+
"match": "(?\u003e\\\\\\s*\\n)"
|
207
|
+
}
|
208
|
+
],
|
209
|
+
"captures": {
|
210
|
+
"1": {
|
211
|
+
"name": "keyword.control.import.c"
|
212
|
+
}
|
213
|
+
}
|
214
|
+
},
|
215
|
+
{
|
216
|
+
"name": "support.type.posix-reserved.c",
|
217
|
+
"match": "\\b([a-z0-9_]+_t)\\b"
|
218
|
+
},
|
219
|
+
{
|
220
|
+
"include": "#block"
|
221
|
+
},
|
222
|
+
{
|
223
|
+
"name": "meta.function.c",
|
224
|
+
"begin": "(?x)\n \t\t(?: ^ # begin-of-line\n \t\t | \n \t\t (?: (?= \\s ) (?\u003c!else|new|return) (?\u003c=\\w) # or word + space before name\n \t\t | (?= \\s*[A-Za-z_] ) (?\u003c!\u0026\u0026) (?\u003c=[*\u0026\u003e]) # or type modifier before name\n \t\t )\n \t\t)\n \t\t(\\s*) (?!(while|for|do|if|else|switch|catch|enumerate|return|sizeof|[cr]?iterate|(?:::)?new|(?:::)?delete)\\s*\\()\n \t\t(\n \t\t\t(?: [A-Za-z_][A-Za-z0-9_]*+ | :: )++ | # actual name\n \t\t\t(?: (?\u003c=operator) (?: [-*\u0026\u003c\u003e=+!]+ | \\(\\) | \\[\\] ) ) # if it is a C++ operator\n \t\t)\n \t\t \\s*(?=\\()",
|
225
|
+
"end": "(?\u003c=\\})|(?=#)|(;)",
|
226
|
+
"patterns": [
|
227
|
+
{
|
228
|
+
"include": "#comments"
|
229
|
+
},
|
230
|
+
{
|
231
|
+
"include": "#parens"
|
232
|
+
},
|
233
|
+
{
|
234
|
+
"name": "storage.modifier.$1.c++",
|
235
|
+
"match": "\\b(const|final|override|noexcept)\\b"
|
236
|
+
},
|
237
|
+
{
|
238
|
+
"include": "#block"
|
239
|
+
}
|
240
|
+
],
|
241
|
+
"beginCaptures": {
|
242
|
+
"1": {
|
243
|
+
"name": "punctuation.whitespace.function.leading.c"
|
244
|
+
},
|
245
|
+
"3": {
|
246
|
+
"name": "entity.name.function.c"
|
247
|
+
},
|
248
|
+
"4": {
|
249
|
+
"name": "punctuation.definition.parameters.c"
|
250
|
+
}
|
251
|
+
}
|
252
|
+
}
|
253
|
+
],
|
254
|
+
"repository": {
|
255
|
+
"access": {
|
256
|
+
"match": "(\\.|\\-\u003e)(?:\\s*(template)\\s+)?([a-zA-Z_][a-zA-Z_0-9]*)\\b(?!\\s*\\()",
|
257
|
+
"captures": {
|
258
|
+
"1": {
|
259
|
+
"name": "punctuation.separator.variable-access.c"
|
260
|
+
},
|
261
|
+
"2": {
|
262
|
+
"name": "storage.modifier.template.c++"
|
263
|
+
},
|
264
|
+
"3": {
|
265
|
+
"name": "variable.other.dot-access.c"
|
266
|
+
}
|
267
|
+
}
|
268
|
+
},
|
269
|
+
"block": {
|
270
|
+
"patterns": [
|
271
|
+
{
|
272
|
+
"name": "meta.block.c",
|
273
|
+
"begin": "\\{",
|
274
|
+
"end": "\\}",
|
275
|
+
"patterns": [
|
276
|
+
{
|
277
|
+
"include": "#block_innards"
|
278
|
+
}
|
279
|
+
],
|
280
|
+
"beginCaptures": {
|
281
|
+
"0": {
|
282
|
+
"name": "punctuation.section.block.begin.c"
|
283
|
+
}
|
284
|
+
},
|
285
|
+
"endCaptures": {
|
286
|
+
"0": {
|
287
|
+
"name": "punctuation.section.block.end.c"
|
288
|
+
}
|
289
|
+
}
|
290
|
+
}
|
291
|
+
]
|
292
|
+
},
|
293
|
+
"block_innards": {
|
294
|
+
"patterns": [
|
295
|
+
{
|
296
|
+
"include": "#preprocessor-rule-enabled-block"
|
297
|
+
},
|
298
|
+
{
|
299
|
+
"include": "#preprocessor-rule-disabled-block"
|
300
|
+
},
|
301
|
+
{
|
302
|
+
"include": "#preprocessor-rule-other-block"
|
303
|
+
},
|
304
|
+
{
|
305
|
+
"include": "#sizeof"
|
306
|
+
},
|
307
|
+
{
|
308
|
+
"include": "#access"
|
309
|
+
},
|
310
|
+
{
|
311
|
+
"include": "source.hc#functions"
|
312
|
+
},
|
313
|
+
{
|
314
|
+
"include": "#c_function_call"
|
315
|
+
},
|
316
|
+
{
|
317
|
+
"name": "meta.initialization.c",
|
318
|
+
"match": "(?x)\n\t\t\t (?x)\n\t\t\t(?: \n\t\t\t (?: (?= \\s ) (?\u003c!else|new|return) (?\u003c=\\w)\\s+ # or word + space before name\n\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(?: (?\u003c=operator) (?: [-*\u0026\u003c\u003e=+!]+ | \\(\\) | \\[\\] ) )? # if it is a C++ operator\n\t\t\t)\n\t\t\t \\s*(\\()",
|
319
|
+
"captures": {
|
320
|
+
"1": {
|
321
|
+
"name": "variable.other.c"
|
322
|
+
},
|
323
|
+
"2": {
|
324
|
+
"name": "punctuation.definition.parameters.c"
|
325
|
+
}
|
326
|
+
}
|
327
|
+
},
|
328
|
+
{
|
329
|
+
"include": "#block"
|
330
|
+
},
|
331
|
+
{
|
332
|
+
"include": "$base"
|
333
|
+
}
|
334
|
+
]
|
335
|
+
},
|
336
|
+
"c_function_call": {
|
337
|
+
"name": "meta.function-call.c",
|
338
|
+
"match": "(?x) (?: (?= \\s ) (?:(?\u003c=else|new|return) | (?\u003c!\\w)) (\\s+))?\n\t\t\t(\\b \n\t\t\t\t(?!(while|for|do|if|else|switch|catch|enumerate|return|sizeof|[cr]?iterate|(?:::)?new|(?:::)?delete)\\s*\\()(?:(?!NS)[A-Za-z_][A-Za-z0-9_]*+\\b | :: )++ # actual name\n\t\t\t)\n\t\t\t \\s*(\\()",
|
339
|
+
"captures": {
|
340
|
+
"1": {
|
341
|
+
"name": "punctuation.whitespace.function-call.leading.c"
|
342
|
+
},
|
343
|
+
"2": {
|
344
|
+
"name": "support.function.any-method.c"
|
345
|
+
},
|
346
|
+
"3": {
|
347
|
+
"name": "punctuation.definition.parameters.c"
|
348
|
+
}
|
349
|
+
}
|
350
|
+
},
|
351
|
+
"comments": {
|
352
|
+
"patterns": [
|
353
|
+
{
|
354
|
+
"name": "comment.block.c",
|
355
|
+
"match": "^/\\* =(\\s*.*?)\\s*= \\*/$\\n?",
|
356
|
+
"captures": {
|
357
|
+
"1": {
|
358
|
+
"name": "meta.toc-list.banner.block.c"
|
359
|
+
}
|
360
|
+
}
|
361
|
+
},
|
362
|
+
{
|
363
|
+
"name": "comment.block.c",
|
364
|
+
"begin": "/\\*",
|
365
|
+
"end": "\\*/",
|
366
|
+
"beginCaptures": {
|
367
|
+
"0": {
|
368
|
+
"name": "punctuation.definition.comment.begin.c"
|
369
|
+
}
|
370
|
+
},
|
371
|
+
"endCaptures": {
|
372
|
+
"0": {
|
373
|
+
"name": "punctuation.definition.comment.end.c"
|
374
|
+
}
|
375
|
+
}
|
376
|
+
},
|
377
|
+
{
|
378
|
+
"name": "invalid.illegal.stray-comment-end.c",
|
379
|
+
"match": "\\*/.*\\n"
|
380
|
+
},
|
381
|
+
{
|
382
|
+
"name": "comment.line.banner.c++",
|
383
|
+
"match": "^// =(\\s*.*?)\\s*=\\s*$\\n?",
|
384
|
+
"captures": {
|
385
|
+
"1": {
|
386
|
+
"name": "meta.toc-list.banner.line.c"
|
387
|
+
}
|
388
|
+
}
|
389
|
+
},
|
390
|
+
{
|
391
|
+
"begin": "(^[ \\t]+)?(?=//)",
|
392
|
+
"end": "(?!\\G)",
|
393
|
+
"patterns": [
|
394
|
+
{
|
395
|
+
"name": "comment.line.double-slash.c++",
|
396
|
+
"begin": "//",
|
397
|
+
"end": "\\n",
|
398
|
+
"patterns": [
|
399
|
+
{
|
400
|
+
"name": "punctuation.separator.continuation.c++",
|
401
|
+
"match": "(?\u003e\\\\\\s*\\n)"
|
402
|
+
}
|
403
|
+
],
|
404
|
+
"beginCaptures": {
|
405
|
+
"0": {
|
406
|
+
"name": "punctuation.definition.comment.c++"
|
407
|
+
}
|
408
|
+
}
|
409
|
+
}
|
410
|
+
],
|
411
|
+
"beginCaptures": {
|
412
|
+
"1": {
|
413
|
+
"name": "punctuation.whitespace.comment.leading.c++"
|
414
|
+
}
|
415
|
+
}
|
416
|
+
}
|
417
|
+
]
|
418
|
+
},
|
419
|
+
"disabled": {
|
420
|
+
"begin": "^\\s*#\\s*if(n?def)?\\b.*$",
|
421
|
+
"end": "^\\s*#\\s*endif\\b",
|
422
|
+
"patterns": [
|
423
|
+
{
|
424
|
+
"include": "#disabled"
|
425
|
+
},
|
426
|
+
{
|
427
|
+
"include": "#pragma-mark"
|
428
|
+
}
|
429
|
+
]
|
430
|
+
},
|
431
|
+
"parens": {
|
432
|
+
"name": "meta.parens.c",
|
433
|
+
"begin": "\\(",
|
434
|
+
"end": "\\)",
|
435
|
+
"patterns": [
|
436
|
+
{
|
437
|
+
"include": "$base"
|
438
|
+
}
|
439
|
+
],
|
440
|
+
"beginCaptures": {
|
441
|
+
"0": {
|
442
|
+
"name": "punctuation.section.parens.begin.c"
|
443
|
+
}
|
444
|
+
},
|
445
|
+
"endCaptures": {
|
446
|
+
"0": {
|
447
|
+
"name": "punctuation.section.parens.end.c"
|
448
|
+
}
|
449
|
+
}
|
450
|
+
},
|
451
|
+
"pragma-mark": {
|
452
|
+
"name": "meta.section",
|
453
|
+
"match": "^\\s*(#\\s*(pragma\\s+mark)\\s+(.*))",
|
454
|
+
"captures": {
|
455
|
+
"1": {
|
456
|
+
"name": "meta.preprocessor.c"
|
457
|
+
},
|
458
|
+
"2": {
|
459
|
+
"name": "keyword.control.import.pragma.c"
|
460
|
+
},
|
461
|
+
"3": {
|
462
|
+
"name": "meta.toc-list.pragma-mark.c"
|
463
|
+
}
|
464
|
+
}
|
465
|
+
},
|
466
|
+
"preprocessor-rule-disabled": {
|
467
|
+
"begin": "^\\s*(#(if)\\s+(0)\\b).*",
|
468
|
+
"end": "^\\s*(#\\s*(endif)\\b)",
|
469
|
+
"patterns": [
|
470
|
+
{
|
471
|
+
"begin": "^\\s*(#\\s*(else)\\b)",
|
472
|
+
"end": "(?=^\\s*#\\s*endif\\b)",
|
473
|
+
"patterns": [
|
474
|
+
{
|
475
|
+
"include": "$base"
|
476
|
+
}
|
477
|
+
],
|
478
|
+
"captures": {
|
479
|
+
"1": {
|
480
|
+
"name": "meta.preprocessor.c"
|
481
|
+
},
|
482
|
+
"2": {
|
483
|
+
"name": "keyword.control.import.else.c"
|
484
|
+
}
|
485
|
+
}
|
486
|
+
},
|
487
|
+
{
|
488
|
+
"name": "comment.block.preprocessor.if-branch",
|
489
|
+
"end": "(?=^\\s*#\\s*(else|endif)\\b)",
|
490
|
+
"patterns": [
|
491
|
+
{
|
492
|
+
"include": "#disabled"
|
493
|
+
},
|
494
|
+
{
|
495
|
+
"include": "#pragma-mark"
|
496
|
+
}
|
497
|
+
]
|
498
|
+
}
|
499
|
+
],
|
500
|
+
"captures": {
|
501
|
+
"1": {
|
502
|
+
"name": "meta.preprocessor.c"
|
503
|
+
},
|
504
|
+
"2": {
|
505
|
+
"name": "keyword.control.import.if.c"
|
506
|
+
},
|
507
|
+
"3": {
|
508
|
+
"name": "constant.numeric.preprocessor.c"
|
509
|
+
}
|
510
|
+
}
|
511
|
+
},
|
512
|
+
"preprocessor-rule-disabled-block": {
|
513
|
+
"begin": "^\\s*(#(if)\\s+(0)\\b).*",
|
514
|
+
"end": "^\\s*(#\\s*(endif)\\b)",
|
515
|
+
"patterns": [
|
516
|
+
{
|
517
|
+
"begin": "^\\s*(#\\s*(else)\\b)",
|
518
|
+
"end": "(?=^\\s*#\\s*endif\\b)",
|
519
|
+
"patterns": [
|
520
|
+
{
|
521
|
+
"include": "#block_innards"
|
522
|
+
}
|
523
|
+
],
|
524
|
+
"captures": {
|
525
|
+
"1": {
|
526
|
+
"name": "meta.preprocessor.c"
|
527
|
+
},
|
528
|
+
"2": {
|
529
|
+
"name": "keyword.control.import.else.c"
|
530
|
+
}
|
531
|
+
}
|
532
|
+
},
|
533
|
+
{
|
534
|
+
"name": "comment.block.preprocessor.if-branch.in-block",
|
535
|
+
"end": "(?=^\\s*#\\s*(else|endif)\\b)",
|
536
|
+
"patterns": [
|
537
|
+
{
|
538
|
+
"include": "#disabled"
|
539
|
+
},
|
540
|
+
{
|
541
|
+
"include": "#pragma-mark"
|
542
|
+
}
|
543
|
+
]
|
544
|
+
}
|
545
|
+
],
|
546
|
+
"captures": {
|
547
|
+
"1": {
|
548
|
+
"name": "meta.preprocessor.c"
|
549
|
+
},
|
550
|
+
"2": {
|
551
|
+
"name": "keyword.control.import.if.c"
|
552
|
+
},
|
553
|
+
"3": {
|
554
|
+
"name": "constant.numeric.preprocessor.c"
|
555
|
+
}
|
556
|
+
}
|
557
|
+
},
|
558
|
+
"preprocessor-rule-enabled": {
|
559
|
+
"begin": "^\\s*(#(if)\\s+(0*1)\\b)",
|
560
|
+
"end": "^\\s*(#\\s*(endif)\\b)",
|
561
|
+
"patterns": [
|
562
|
+
{
|
563
|
+
"contentName": "comment.block.preprocessor.else-branch",
|
564
|
+
"begin": "^\\s*(#\\s*(else)\\b).*",
|
565
|
+
"end": "(?=^\\s*#\\s*endif\\b)",
|
566
|
+
"patterns": [
|
567
|
+
{
|
568
|
+
"include": "#disabled"
|
569
|
+
},
|
570
|
+
{
|
571
|
+
"include": "#pragma-mark"
|
572
|
+
}
|
573
|
+
],
|
574
|
+
"captures": {
|
575
|
+
"1": {
|
576
|
+
"name": "meta.preprocessor.c"
|
577
|
+
},
|
578
|
+
"2": {
|
579
|
+
"name": "keyword.control.import.else.c"
|
580
|
+
}
|
581
|
+
}
|
582
|
+
},
|
583
|
+
{
|
584
|
+
"end": "(?=^\\s*#\\s*(else|endif)\\b)",
|
585
|
+
"patterns": [
|
586
|
+
{
|
587
|
+
"include": "$base"
|
588
|
+
}
|
589
|
+
]
|
590
|
+
}
|
591
|
+
],
|
592
|
+
"captures": {
|
593
|
+
"1": {
|
594
|
+
"name": "meta.preprocessor.c"
|
595
|
+
},
|
596
|
+
"2": {
|
597
|
+
"name": "keyword.control.import.if.c"
|
598
|
+
},
|
599
|
+
"3": {
|
600
|
+
"name": "constant.numeric.preprocessor.c"
|
601
|
+
}
|
602
|
+
}
|
603
|
+
},
|
604
|
+
"preprocessor-rule-enabled-block": {
|
605
|
+
"begin": "^\\s*(#(if)\\s+(0*1)\\b)",
|
606
|
+
"end": "^\\s*(#\\s*(endif)\\b)",
|
607
|
+
"patterns": [
|
608
|
+
{
|
609
|
+
"contentName": "comment.block.preprocessor.else-branch.in-block",
|
610
|
+
"begin": "^\\s*(#\\s*(else)\\b).*",
|
611
|
+
"end": "(?=^\\s*#\\s*endif\\b)",
|
612
|
+
"patterns": [
|
613
|
+
{
|
614
|
+
"include": "#disabled"
|
615
|
+
},
|
616
|
+
{
|
617
|
+
"include": "#pragma-mark"
|
618
|
+
}
|
619
|
+
],
|
620
|
+
"captures": {
|
621
|
+
"1": {
|
622
|
+
"name": "meta.preprocessor.c"
|
623
|
+
},
|
624
|
+
"2": {
|
625
|
+
"name": "keyword.control.import.else.c"
|
626
|
+
}
|
627
|
+
}
|
628
|
+
},
|
629
|
+
{
|
630
|
+
"end": "(?=^\\s*#\\s*(else|endif)\\b)",
|
631
|
+
"patterns": [
|
632
|
+
{
|
633
|
+
"include": "#block_innards"
|
634
|
+
}
|
635
|
+
]
|
636
|
+
}
|
637
|
+
],
|
638
|
+
"captures": {
|
639
|
+
"1": {
|
640
|
+
"name": "meta.preprocessor.c"
|
641
|
+
},
|
642
|
+
"2": {
|
643
|
+
"name": "keyword.control.import.if.c"
|
644
|
+
},
|
645
|
+
"3": {
|
646
|
+
"name": "constant.numeric.preprocessor.c"
|
647
|
+
}
|
648
|
+
}
|
649
|
+
},
|
650
|
+
"preprocessor-rule-other": {
|
651
|
+
"begin": "^\\s*(#\\s*(if(n?def)?)\\b.*?(?:(?=(?://|/\\*))|$))",
|
652
|
+
"end": "^\\s*(#\\s*(endif)\\b)",
|
653
|
+
"patterns": [
|
654
|
+
{
|
655
|
+
"include": "$base"
|
656
|
+
}
|
657
|
+
],
|
658
|
+
"captures": {
|
659
|
+
"1": {
|
660
|
+
"name": "meta.preprocessor.c"
|
661
|
+
},
|
662
|
+
"2": {
|
663
|
+
"name": "keyword.control.import.c"
|
664
|
+
}
|
665
|
+
}
|
666
|
+
},
|
667
|
+
"preprocessor-rule-other-block": {
|
668
|
+
"begin": "^\\s*(#\\s*(if(n?def)?)\\b.*?(?:(?=(?://|/\\*))|$))",
|
669
|
+
"end": "^\\s*(#\\s*(endif)\\b)",
|
670
|
+
"patterns": [
|
671
|
+
{
|
672
|
+
"include": "#block_innards"
|
673
|
+
}
|
674
|
+
],
|
675
|
+
"captures": {
|
676
|
+
"1": {
|
677
|
+
"name": "meta.preprocessor.c"
|
678
|
+
},
|
679
|
+
"2": {
|
680
|
+
"name": "keyword.control.import.c"
|
681
|
+
}
|
682
|
+
}
|
683
|
+
},
|
684
|
+
"sizeof": {
|
685
|
+
"name": "keyword.operator.sizeof.c",
|
686
|
+
"match": "\\b(sizeof)\\b"
|
687
|
+
},
|
688
|
+
"string_escaped_char": {
|
689
|
+
"patterns": [
|
690
|
+
{
|
691
|
+
"name": "constant.character.escape.c",
|
692
|
+
"match": "\\\\(\\\\|[abefnprtv'\"?]|[0-3]\\d{0,2}|[4-7]\\d?|x[a-fA-F0-9]{0,2}|u[a-fA-F0-9]{0,4}|U[a-fA-F0-9]{0,8})"
|
693
|
+
},
|
694
|
+
{
|
695
|
+
"name": "invalid.illegal.unknown-escape.c",
|
696
|
+
"match": "\\\\."
|
697
|
+
}
|
698
|
+
]
|
699
|
+
},
|
700
|
+
"string_placeholder": {
|
701
|
+
"patterns": [
|
702
|
+
{
|
703
|
+
"name": "constant.other.placeholder.c",
|
704
|
+
"match": "(?x)%\n \t\t\t\t\t\t(\\d+\\$)? # field (argument #)\n \t\t\t\t\t\t[#0\\- +']* # flags\n \t\t\t\t\t\t[,;:_]? # separator character (AltiVec)\n \t\t\t\t\t\t((-?\\d+)|\\*(-?\\d+\\$)?)? # minimum field width\n \t\t\t\t\t\t(\\.((-?\\d+)|\\*(-?\\d+\\$)?)?)? # precision\n \t\t\t\t\t\t(hh|h|ll|l|j|t|z|q|L|vh|vl|v|hv|hl)? # length modifier\n \t\t\t\t\t\t[diouxXDOUeEfFgGaACcSspn%] # conversion type\n \t\t\t\t\t"
|
705
|
+
}
|
706
|
+
]
|
707
|
+
}
|
708
|
+
}
|
709
|
+
}
|