github-linguist 4.8.0 → 4.8.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/grammars/source.assembly.json +121 -0
- data/grammars/source.gdscript.json +102 -7
- data/grammars/source.papyrus.skyrim.json +1328 -0
- data/grammars/source.pawn.json +736 -0
- data/grammars/source.perl6fe.json +1 -1
- data/grammars/source.puppet.json +47 -101
- data/grammars/source.renpy.json +2 -2
- data/grammars/source.shell.json +2 -1
- data/grammars/source.terra.json +146 -0
- data/grammars/source.toml.json +24 -1
- data/grammars/source.yaml.json +1 -0
- data/grammars/text.html.vue.json +0 -1
- data/lib/linguist/blob.rb +1 -1
- data/lib/linguist/heuristics.rb +1 -1
- data/lib/linguist/languages.json +1 -1
- data/lib/linguist/languages.yml +35 -12
- data/lib/linguist/lazy_blob.rb +1 -0
- data/lib/linguist/repository.rb +3 -0
- data/lib/linguist/samples.json +634 -157
- data/lib/linguist/shebang.rb +2 -2
- data/lib/linguist/version.rb +1 -1
- metadata +11 -19
- data/grammars/source.asm.x86.json +0 -182
- data/grammars/source.autoit.3.json +0 -132
- data/grammars/source.clips.json +0 -80
- data/grammars/source.compiled-papyrus.json +0 -11
- data/grammars/source.idris.json +0 -537
- data/grammars/source.inno.json +0 -69
- data/grammars/source.nix.json +0 -1200
- data/grammars/source.papyrus-assembly.json +0 -266
- data/grammars/source.papyrus.json +0 -231
- data/grammars/source.plsql.oracle.json +0 -642
- data/grammars/source.scad.json +0 -152
- data/grammars/text.html.creole.json +0 -329
@@ -0,0 +1,736 @@
|
|
1
|
+
{
|
2
|
+
"fileTypes": [
|
3
|
+
"pwn",
|
4
|
+
"inc"
|
5
|
+
],
|
6
|
+
"firstLineMatch": "-[*]-( Mode:)? C -[*]-",
|
7
|
+
"foldingStartMarker": "(?x)\n\t\t /\\*\\*(?!\\*)\n\t\t|^(?![^{]*?//|[^{]*?/\\*(?!.*?\\*/.*?\\{)).*?\\{\\s*($|//|/\\*(?!.*?\\*/.*\\S))\n\t",
|
8
|
+
"foldingStopMarker": "(?<!\\*)\\*\\*/|^\\s*\\}",
|
9
|
+
"keyEquivalent": "^~C",
|
10
|
+
"name": "Pawn",
|
11
|
+
"patterns": [
|
12
|
+
{
|
13
|
+
"include": "#preprocessor-rule-enabled"
|
14
|
+
},
|
15
|
+
{
|
16
|
+
"include": "#preprocessor-rule-disabled"
|
17
|
+
},
|
18
|
+
{
|
19
|
+
"include": "#preprocessor-rule-other"
|
20
|
+
},
|
21
|
+
{
|
22
|
+
"include": "#comments"
|
23
|
+
},
|
24
|
+
{
|
25
|
+
"include": "#operators"
|
26
|
+
},
|
27
|
+
{
|
28
|
+
"match": "\\b(assert|break|case|continue|default|do|else|exit|for|foreach|goto|if|return|sleep|state|switch|while)\\b",
|
29
|
+
"name": "keyword.control.c"
|
30
|
+
},
|
31
|
+
{
|
32
|
+
"match": "\\b(new|char|enum)\\b",
|
33
|
+
"name": "storage.type.c"
|
34
|
+
},
|
35
|
+
{
|
36
|
+
"match": "\\b(public|forward|native|hook|const|static|stock|inline)\\b",
|
37
|
+
"name": "storage.modifier.c"
|
38
|
+
},
|
39
|
+
{
|
40
|
+
"match": "\\b([A-Za-z_][A-Za-z0-9_]*)\\:\\s*\\b",
|
41
|
+
"name": "storage.modifier.c"
|
42
|
+
},
|
43
|
+
{
|
44
|
+
"comment": "common C constant naming idiom -- kConstantVariable",
|
45
|
+
"match": "\\bk[A-Z]\\w*\\b",
|
46
|
+
"name": "constant.other.variable.mac-classic.c"
|
47
|
+
},
|
48
|
+
{
|
49
|
+
"match": "\\bg[A-Z]\\w*\\b",
|
50
|
+
"name": "variable.other.readwrite.global.mac-classic.c"
|
51
|
+
},
|
52
|
+
{
|
53
|
+
"match": "\\bs[A-Z]\\w*\\b",
|
54
|
+
"name": "variable.other.readwrite.static.mac-classic.c"
|
55
|
+
},
|
56
|
+
{
|
57
|
+
"match": "\\b(true|false|TRUE|FALSE)\\b",
|
58
|
+
"name": "constant.language.c"
|
59
|
+
},
|
60
|
+
{
|
61
|
+
"include": "#sizeof"
|
62
|
+
},
|
63
|
+
{
|
64
|
+
"match": "\\b((0(x|X)[0-9a-fA-F\\_]*)|(0(b|B)[0-1\\_]*)|(([0-9\\_]+\\.?[0-9\\_]*)|(\\.[0-9\\_]+))?)?\\b",
|
65
|
+
"name": "constant.numeric.c"
|
66
|
+
},
|
67
|
+
{
|
68
|
+
"begin": "\"",
|
69
|
+
"beginCaptures": {
|
70
|
+
"0": {
|
71
|
+
"name": "punctuation.definition.string.begin.c"
|
72
|
+
}
|
73
|
+
},
|
74
|
+
"end": "\"",
|
75
|
+
"endCaptures": {
|
76
|
+
"0": {
|
77
|
+
"name": "punctuation.definition.string.end.c"
|
78
|
+
}
|
79
|
+
},
|
80
|
+
"name": "string.quoted.double.c",
|
81
|
+
"patterns": [
|
82
|
+
{
|
83
|
+
"include": "#string_escaped_char"
|
84
|
+
},
|
85
|
+
{
|
86
|
+
"include": "#string_placeholder"
|
87
|
+
}
|
88
|
+
]
|
89
|
+
},
|
90
|
+
{
|
91
|
+
"begin": "'",
|
92
|
+
"beginCaptures": {
|
93
|
+
"0": {
|
94
|
+
"name": "punctuation.definition.string.begin.c"
|
95
|
+
}
|
96
|
+
},
|
97
|
+
"end": "'",
|
98
|
+
"endCaptures": {
|
99
|
+
"0": {
|
100
|
+
"name": "punctuation.definition.string.end.c"
|
101
|
+
}
|
102
|
+
},
|
103
|
+
"name": "string.quoted.single.c",
|
104
|
+
"patterns": [
|
105
|
+
{
|
106
|
+
"include": "#string_escaped_char"
|
107
|
+
}
|
108
|
+
]
|
109
|
+
},
|
110
|
+
{
|
111
|
+
"match": "(?x)\n\t\t\t\t^\\s*(\\#|@)\\s*(emit) #pre-processor directive\n\t\t\t\t(\\s+\n\t\t\t\t\t([A-Z0-9a-z]+)\n\t\t\t\t\t((\\.)\n\t\t\t\t\t([A-Za-z]+)\n\t\t\t\t\t)?\n\t\t\t\t|\\s*)\n\t\t\t",
|
112
|
+
"captures": {
|
113
|
+
"2": {
|
114
|
+
"name": "keyword.control.import.c"
|
115
|
+
},
|
116
|
+
"4": {
|
117
|
+
"name": "entity.name.function.preprocessor.c"
|
118
|
+
},
|
119
|
+
"5": {
|
120
|
+
"name": "punctuation.separator.parameters.c"
|
121
|
+
},
|
122
|
+
"7": {
|
123
|
+
"name": "entity.name.function.preprocessor.c"
|
124
|
+
}
|
125
|
+
}
|
126
|
+
},
|
127
|
+
{
|
128
|
+
"begin": "(?x)\n \t\t^\\s*\\#\\s*(define)\\s+ # define\n \t\t((?<id>[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<id> \\s* # first argument\n \t\t ((,) \\s* \\g<id> \\s*)* # additional arguments\n \t\t (?:\\.\\.\\.)? # varargs ellipsis?\n \t\t )\n \t\t (\\)) # a close parenthesis\n \t\t)?\n \t",
|
129
|
+
"beginCaptures": {
|
130
|
+
"1": {
|
131
|
+
"name": "keyword.control.import.c"
|
132
|
+
},
|
133
|
+
"2": {
|
134
|
+
"name": "entity.name.function.preprocessor.c"
|
135
|
+
},
|
136
|
+
"4": {
|
137
|
+
"name": "punctuation.definition.parameters.c"
|
138
|
+
},
|
139
|
+
"5": {
|
140
|
+
"name": "variable.parameter.preprocessor.c"
|
141
|
+
},
|
142
|
+
"7": {
|
143
|
+
"name": "punctuation.separator.parameters.c"
|
144
|
+
},
|
145
|
+
"8": {
|
146
|
+
"name": "punctuation.definition.parameters.c"
|
147
|
+
}
|
148
|
+
},
|
149
|
+
"end": "(?=(?://|/\\*))|$",
|
150
|
+
"name": "meta.preprocessor.macro.c",
|
151
|
+
"patterns": [
|
152
|
+
{
|
153
|
+
"match": "(?>\\\\\\s*\\n)",
|
154
|
+
"name": "punctuation.separator.continuation.c"
|
155
|
+
},
|
156
|
+
{
|
157
|
+
"include": "$base"
|
158
|
+
}
|
159
|
+
]
|
160
|
+
},
|
161
|
+
{
|
162
|
+
"captures": {
|
163
|
+
"1": {
|
164
|
+
"name": "keyword.control.import.error.c"
|
165
|
+
}
|
166
|
+
},
|
167
|
+
"end": "$",
|
168
|
+
"name": "meta.preprocessor.diagnostic.c",
|
169
|
+
"patterns": [
|
170
|
+
{
|
171
|
+
"match": "(?>\\\\\\s*\\n)",
|
172
|
+
"name": "punctuation.separator.continuation.c"
|
173
|
+
}
|
174
|
+
]
|
175
|
+
},
|
176
|
+
{
|
177
|
+
"begin": "^\\s*#\\s*(include|tryinclude)\\b\\s+",
|
178
|
+
"captures": {
|
179
|
+
"1": {
|
180
|
+
"name": "keyword.control.import.include.c"
|
181
|
+
}
|
182
|
+
},
|
183
|
+
"end": "(?=(?://|/\\*))|$",
|
184
|
+
"name": "meta.preprocessor.macro.c",
|
185
|
+
"patterns": [
|
186
|
+
{
|
187
|
+
"match": "(?>\\\\\\s*\\n)",
|
188
|
+
"name": "punctuation.separator.continuation.c"
|
189
|
+
},
|
190
|
+
{
|
191
|
+
"begin": "\"",
|
192
|
+
"beginCaptures": {
|
193
|
+
"0": {
|
194
|
+
"name": "punctuation.definition.string.begin.c"
|
195
|
+
}
|
196
|
+
},
|
197
|
+
"end": "\"",
|
198
|
+
"endCaptures": {
|
199
|
+
"0": {
|
200
|
+
"name": "punctuation.definition.string.end.c"
|
201
|
+
}
|
202
|
+
},
|
203
|
+
"name": "string.quoted.double.include.c"
|
204
|
+
},
|
205
|
+
{
|
206
|
+
"begin": "<",
|
207
|
+
"beginCaptures": {
|
208
|
+
"0": {
|
209
|
+
"name": "punctuation.definition.string.begin.c"
|
210
|
+
}
|
211
|
+
},
|
212
|
+
"end": ">",
|
213
|
+
"endCaptures": {
|
214
|
+
"0": {
|
215
|
+
"name": "punctuation.definition.string.end.c"
|
216
|
+
}
|
217
|
+
},
|
218
|
+
"name": "string.quoted.other.lt-gt.include.c"
|
219
|
+
}
|
220
|
+
]
|
221
|
+
},
|
222
|
+
{
|
223
|
+
"include": "#pragma-mark"
|
224
|
+
},
|
225
|
+
{
|
226
|
+
"begin": "^\\s*#\\s*(assert|endinput|file|else|line|section)\\b",
|
227
|
+
"captures": {
|
228
|
+
"1": {
|
229
|
+
"name": "keyword.control.import.c"
|
230
|
+
}
|
231
|
+
},
|
232
|
+
"end": "(?=(?://|/\\*))|$",
|
233
|
+
"name": "meta.preprocessor.macro.c",
|
234
|
+
"patterns": [
|
235
|
+
{
|
236
|
+
"match": "(?>\\\\\\s*\\n)",
|
237
|
+
"name": "punctuation.separator.continuation.c"
|
238
|
+
}
|
239
|
+
]
|
240
|
+
},
|
241
|
+
{
|
242
|
+
"begin": "^\\s*#\\s*(pragma|undef)\\s+([a-zA-Z0-9_]*?)(?:(?=(?://|/\\*))|$)",
|
243
|
+
"captures": {
|
244
|
+
"1": {
|
245
|
+
"name": "keyword.control.import.c"
|
246
|
+
},
|
247
|
+
"2": {
|
248
|
+
"name": "entity.name.function.preprocessor.c"
|
249
|
+
}
|
250
|
+
},
|
251
|
+
"end": "(?=(?://|/\\*))|$",
|
252
|
+
"name": "meta.preprocessor.macro.c",
|
253
|
+
"patterns": [
|
254
|
+
{
|
255
|
+
"match": "(?>\\\\\\s*\\n)",
|
256
|
+
"name": "punctuation.separator.continuation.c"
|
257
|
+
}
|
258
|
+
]
|
259
|
+
},
|
260
|
+
{
|
261
|
+
"begin": "^\\s*#\\s*(error|warning)\\s+(.*?)(?:(?=(?://|/\\*))|$)",
|
262
|
+
"captures": {
|
263
|
+
"1": {
|
264
|
+
"name": "keyword.control.import.c"
|
265
|
+
},
|
266
|
+
"2": {
|
267
|
+
"name": "string.quoted.double.c"
|
268
|
+
}
|
269
|
+
},
|
270
|
+
"end": "(?=(?://|/\\*))|$",
|
271
|
+
"name": "meta.preprocessor.macro.c",
|
272
|
+
"patterns": [
|
273
|
+
{
|
274
|
+
"match": "(?>\\\\\\s*\\n)",
|
275
|
+
"name": "punctuation.separator.continuation.c"
|
276
|
+
}
|
277
|
+
]
|
278
|
+
},
|
279
|
+
{
|
280
|
+
"include": "#block"
|
281
|
+
},
|
282
|
+
{
|
283
|
+
"begin": "(?x)\n \t\t(?: ^ # begin-of-line\n \t\t |\n \t\t (?: (?= \\s ) (?<!else|new|return) (?<=\\w) # or word + space before name\n \t\t | (?= \\s*[A-Za-z_] ) (?<!&&) (?<=[*&>]) # or type modifier before name\n \t\t )\n \t\t)\n \t\t(\\s*) (?!(assert|break|case|continue|default|do|else|exit|for|foreach|goto|if|return|sleep|state|switch|while)\\s*\\()\n \t\t(\n \t\t\t(?: [A-Za-z_][A-Za-z0-9_]*+ | :: )++ | # actual name\n \t\t\t(?: (?<=operator) (?: [-*&<>=+!]+ | \\(\\) | \\[\\] ) ) # if it is a C++ operator\n \t\t)\n \t\t \\s*(?=\\()",
|
284
|
+
"beginCaptures": {
|
285
|
+
"1": {
|
286
|
+
"name": "punctuation.whitespace.function.leading.c"
|
287
|
+
},
|
288
|
+
"3": {
|
289
|
+
"name": "entity.name.function.c"
|
290
|
+
},
|
291
|
+
"4": {
|
292
|
+
"name": "punctuation.definition.parameters.c"
|
293
|
+
}
|
294
|
+
},
|
295
|
+
"end": "(?<=\\})|(?=#)|(;)",
|
296
|
+
"name": "meta.function.c",
|
297
|
+
"patterns": [
|
298
|
+
{
|
299
|
+
"include": "#comments"
|
300
|
+
},
|
301
|
+
{
|
302
|
+
"include": "#parens"
|
303
|
+
},
|
304
|
+
{
|
305
|
+
"match": "\\b(const|override)\\b",
|
306
|
+
"name": "storage.modifier.c"
|
307
|
+
},
|
308
|
+
{
|
309
|
+
"include": "#block"
|
310
|
+
}
|
311
|
+
]
|
312
|
+
}
|
313
|
+
],
|
314
|
+
"repository": {
|
315
|
+
"block": {
|
316
|
+
"begin": "\\{",
|
317
|
+
"end": "\\}",
|
318
|
+
"name": "meta.block.c",
|
319
|
+
"patterns": [
|
320
|
+
{
|
321
|
+
"include": "#block_innards"
|
322
|
+
}
|
323
|
+
]
|
324
|
+
},
|
325
|
+
"block_innards": {
|
326
|
+
"patterns": [
|
327
|
+
{
|
328
|
+
"include": "#preprocessor-rule-enabled-block"
|
329
|
+
},
|
330
|
+
{
|
331
|
+
"include": "#preprocessor-rule-disabled-block"
|
332
|
+
},
|
333
|
+
{
|
334
|
+
"include": "#preprocessor-rule-other-block"
|
335
|
+
},
|
336
|
+
{
|
337
|
+
"include": "#sizeof"
|
338
|
+
},
|
339
|
+
{
|
340
|
+
"include": "#access"
|
341
|
+
},
|
342
|
+
{
|
343
|
+
"captures": {
|
344
|
+
"1": {
|
345
|
+
"name": "punctuation.whitespace.support.function.leading.c"
|
346
|
+
},
|
347
|
+
"2": {
|
348
|
+
"name": "support.function.C99.c"
|
349
|
+
}
|
350
|
+
}
|
351
|
+
},
|
352
|
+
{
|
353
|
+
"captures": {
|
354
|
+
"1": {
|
355
|
+
"name": "punctuation.whitespace.function-call.leading.c"
|
356
|
+
},
|
357
|
+
"2": {
|
358
|
+
"name": "support.function.any-method.c"
|
359
|
+
},
|
360
|
+
"3": {
|
361
|
+
"name": "punctuation.definition.parameters.c"
|
362
|
+
}
|
363
|
+
},
|
364
|
+
"match": "(?x) (?: (?= \\s ) (?:(?<=else|new|return) | (?<!\\w)) (\\s+))?\n\t\t\t(\\b\n\t\t\t\t(?!(assert|break|case|continue|default|do|else|exit|for|foreach|goto|if|return|sleep|state|switch|while)\\s*\\()(?:(?!NS)[A-Za-z_][A-Za-z0-9_]*+\\b | :: )++ # actual name\n\t\t\t)\n\t\t\t \\s*(\\()",
|
365
|
+
"name": "meta.function-call.c"
|
366
|
+
},
|
367
|
+
{
|
368
|
+
"captures": {
|
369
|
+
"1": {
|
370
|
+
"name": "variable.other.c"
|
371
|
+
},
|
372
|
+
"2": {
|
373
|
+
"name": "punctuation.definition.parameters.c"
|
374
|
+
}
|
375
|
+
},
|
376
|
+
"match": "(?x)\n\t\t\t (?x)\n\t\t\t(?:\n\t\t\t (?: (?= \\s ) (?<!else|new|return) (?<=\\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(?: (?<=operator) (?: [-*&<>=+!]+ | \\(\\) | \\[\\] ) )? # if it is a C++ operator\n\t\t\t)\n\t\t\t \\s*(\\()",
|
377
|
+
"name": "meta.initialization.c"
|
378
|
+
},
|
379
|
+
{
|
380
|
+
"include": "#block"
|
381
|
+
},
|
382
|
+
{
|
383
|
+
"include": "$base"
|
384
|
+
}
|
385
|
+
]
|
386
|
+
},
|
387
|
+
"comments": {
|
388
|
+
"patterns": [
|
389
|
+
{
|
390
|
+
"captures": {
|
391
|
+
"1": {
|
392
|
+
"name": "meta.toc-list.banner.block.c"
|
393
|
+
}
|
394
|
+
},
|
395
|
+
"match": "^/\\* =(\\s*.*?)\\s*= \\*/$\\n?",
|
396
|
+
"name": "comment.block.c"
|
397
|
+
},
|
398
|
+
{
|
399
|
+
"begin": "/\\*",
|
400
|
+
"captures": {
|
401
|
+
"0": {
|
402
|
+
"name": "punctuation.definition.comment.c"
|
403
|
+
}
|
404
|
+
},
|
405
|
+
"end": "\\*/",
|
406
|
+
"name": "comment.block.c"
|
407
|
+
},
|
408
|
+
{
|
409
|
+
"match": "\\*/.*\\n",
|
410
|
+
"name": "invalid.illegal.stray-comment-end.c"
|
411
|
+
},
|
412
|
+
{
|
413
|
+
"captures": {
|
414
|
+
"1": {
|
415
|
+
"name": "meta.toc-list.banner.line.c"
|
416
|
+
}
|
417
|
+
},
|
418
|
+
"match": "^// =(\\s*.*?)\\s*=\\s*$\\n?",
|
419
|
+
"name": "comment.line.banner.c++"
|
420
|
+
},
|
421
|
+
{
|
422
|
+
"begin": "//",
|
423
|
+
"beginCaptures": {
|
424
|
+
"0": {
|
425
|
+
"name": "punctuation.definition.comment.c"
|
426
|
+
}
|
427
|
+
},
|
428
|
+
"end": "$\\n?",
|
429
|
+
"name": "comment.line.double-slash.c++",
|
430
|
+
"patterns": [
|
431
|
+
{
|
432
|
+
"match": "(?>\\\\\\s*\\n)",
|
433
|
+
"name": "punctuation.separator.continuation.c++"
|
434
|
+
}
|
435
|
+
]
|
436
|
+
}
|
437
|
+
]
|
438
|
+
},
|
439
|
+
"disabled": {
|
440
|
+
"begin": "^\\s*#\\s*(if|elseif)\\s*(!?defined)?\\b.*$",
|
441
|
+
"comment": "eat nested preprocessor if(def)s",
|
442
|
+
"end": "^\\s*#\\s*endif\\b.*$",
|
443
|
+
"patterns": [
|
444
|
+
{
|
445
|
+
"include": "#disabled"
|
446
|
+
},
|
447
|
+
{
|
448
|
+
"include": "#pragma-mark"
|
449
|
+
}
|
450
|
+
]
|
451
|
+
},
|
452
|
+
"parens": {
|
453
|
+
"begin": "\\(",
|
454
|
+
"end": "\\)",
|
455
|
+
"name": "meta.parens.c",
|
456
|
+
"patterns": [
|
457
|
+
{
|
458
|
+
"include": "$base"
|
459
|
+
}
|
460
|
+
]
|
461
|
+
},
|
462
|
+
"pragma-mark": {
|
463
|
+
"captures": {
|
464
|
+
"1": {
|
465
|
+
"name": "meta.preprocessor.c"
|
466
|
+
},
|
467
|
+
"2": {
|
468
|
+
"name": "keyword.control.import.pragma.c"
|
469
|
+
},
|
470
|
+
"3": {
|
471
|
+
"name": "keyword.control.import.pragma.c"
|
472
|
+
}
|
473
|
+
},
|
474
|
+
"match": "^\\s*(#\\s*(pragma)\\s+(align|amxlimit|amxram|codepage|compress|ctrlchar|deprecated|dynamic|library|overlay|pack|rational|semicolon|tabsize|unused))",
|
475
|
+
"name": "meta.section"
|
476
|
+
},
|
477
|
+
"preprocessor-rule-disabled": {
|
478
|
+
"begin": "^\\s*(#(if)\\s+(0)\\b).*",
|
479
|
+
"captures": {
|
480
|
+
"1": {
|
481
|
+
"name": "meta.preprocessor.c"
|
482
|
+
},
|
483
|
+
"2": {
|
484
|
+
"name": "keyword.control.import.if.c"
|
485
|
+
},
|
486
|
+
"3": {
|
487
|
+
"name": "constant.numeric.preprocessor.c"
|
488
|
+
}
|
489
|
+
},
|
490
|
+
"end": "^\\s*(#\\s*(endif)\\b)",
|
491
|
+
"patterns": [
|
492
|
+
{
|
493
|
+
"begin": "^\\s*(#\\s*(else)\\b)",
|
494
|
+
"captures": {
|
495
|
+
"1": {
|
496
|
+
"name": "meta.preprocessor.c"
|
497
|
+
},
|
498
|
+
"2": {
|
499
|
+
"name": "keyword.control.import.else.c"
|
500
|
+
}
|
501
|
+
},
|
502
|
+
"end": "(?=^\\s*#\\s*endif\\b.*$)",
|
503
|
+
"patterns": [
|
504
|
+
{
|
505
|
+
"include": "$base"
|
506
|
+
}
|
507
|
+
]
|
508
|
+
},
|
509
|
+
{
|
510
|
+
"begin": "",
|
511
|
+
"end": "(?=^\\s*#\\s*(else|endif)\\b.*$)",
|
512
|
+
"name": "comment.block.preprocessor.if-branch",
|
513
|
+
"patterns": [
|
514
|
+
{
|
515
|
+
"include": "#disabled"
|
516
|
+
},
|
517
|
+
{
|
518
|
+
"include": "#pragma-mark"
|
519
|
+
}
|
520
|
+
]
|
521
|
+
}
|
522
|
+
]
|
523
|
+
},
|
524
|
+
"preprocessor-rule-disabled-block": {
|
525
|
+
"begin": "^\\s*(#(if)\\s+(0)\\b).*",
|
526
|
+
"captures": {
|
527
|
+
"1": {
|
528
|
+
"name": "meta.preprocessor.c"
|
529
|
+
},
|
530
|
+
"2": {
|
531
|
+
"name": "keyword.control.import.if.c"
|
532
|
+
},
|
533
|
+
"3": {
|
534
|
+
"name": "constant.numeric.preprocessor.c"
|
535
|
+
}
|
536
|
+
},
|
537
|
+
"end": "^\\s*(#\\s*(endif)\\b)",
|
538
|
+
"patterns": [
|
539
|
+
{
|
540
|
+
"begin": "^\\s*(#\\s*(else)\\b)",
|
541
|
+
"captures": {
|
542
|
+
"1": {
|
543
|
+
"name": "meta.preprocessor.c"
|
544
|
+
},
|
545
|
+
"2": {
|
546
|
+
"name": "keyword.control.import.else.c"
|
547
|
+
}
|
548
|
+
},
|
549
|
+
"end": "(?=^\\s*#\\s*endif\\b.*$)",
|
550
|
+
"patterns": [
|
551
|
+
{
|
552
|
+
"include": "#block_innards"
|
553
|
+
}
|
554
|
+
]
|
555
|
+
},
|
556
|
+
{
|
557
|
+
"begin": "",
|
558
|
+
"end": "(?=^\\s*#\\s*(else|endif)\\b.*$)",
|
559
|
+
"name": "comment.block.preprocessor.if-branch.in-block",
|
560
|
+
"patterns": [
|
561
|
+
{
|
562
|
+
"include": "#disabled"
|
563
|
+
},
|
564
|
+
{
|
565
|
+
"include": "#pragma-mark"
|
566
|
+
}
|
567
|
+
]
|
568
|
+
}
|
569
|
+
]
|
570
|
+
},
|
571
|
+
"preprocessor-rule-enabled": {
|
572
|
+
"begin": "^\\s*(#(if)\\s+(0*1)\\b)",
|
573
|
+
"captures": {
|
574
|
+
"1": {
|
575
|
+
"name": "meta.preprocessor.c"
|
576
|
+
},
|
577
|
+
"2": {
|
578
|
+
"name": "keyword.control.import.if.c"
|
579
|
+
},
|
580
|
+
"3": {
|
581
|
+
"name": "constant.numeric.preprocessor.c"
|
582
|
+
}
|
583
|
+
},
|
584
|
+
"end": "^\\s*(#\\s*(endif)\\b)",
|
585
|
+
"patterns": [
|
586
|
+
{
|
587
|
+
"begin": "^\\s*(#\\s*(else)\\b).*",
|
588
|
+
"captures": {
|
589
|
+
"1": {
|
590
|
+
"name": "meta.preprocessor.c"
|
591
|
+
},
|
592
|
+
"2": {
|
593
|
+
"name": "keyword.control.import.else.c"
|
594
|
+
}
|
595
|
+
},
|
596
|
+
"contentName": "comment.block.preprocessor.else-branch",
|
597
|
+
"end": "(?=^\\s*#\\s*endif\\b.*$)",
|
598
|
+
"patterns": [
|
599
|
+
{
|
600
|
+
"include": "#disabled"
|
601
|
+
},
|
602
|
+
{
|
603
|
+
"include": "#pragma-mark"
|
604
|
+
}
|
605
|
+
]
|
606
|
+
},
|
607
|
+
{
|
608
|
+
"begin": "",
|
609
|
+
"end": "(?=^\\s*#\\s*(else|endif)\\b.*$)",
|
610
|
+
"patterns": [
|
611
|
+
{
|
612
|
+
"include": "$base"
|
613
|
+
}
|
614
|
+
]
|
615
|
+
}
|
616
|
+
]
|
617
|
+
},
|
618
|
+
"preprocessor-rule-enabled-block": {
|
619
|
+
"begin": "^\\s*(#(if)\\s+(0*1)\\b)",
|
620
|
+
"captures": {
|
621
|
+
"1": {
|
622
|
+
"name": "meta.preprocessor.c"
|
623
|
+
},
|
624
|
+
"2": {
|
625
|
+
"name": "keyword.control.import.if.c"
|
626
|
+
},
|
627
|
+
"3": {
|
628
|
+
"name": "constant.numeric.preprocessor.c"
|
629
|
+
}
|
630
|
+
},
|
631
|
+
"end": "^\\s*(#\\s*(endif)\\b)",
|
632
|
+
"patterns": [
|
633
|
+
{
|
634
|
+
"begin": "^\\s*(#\\s*(else)\\b).*",
|
635
|
+
"captures": {
|
636
|
+
"1": {
|
637
|
+
"name": "meta.preprocessor.c"
|
638
|
+
},
|
639
|
+
"2": {
|
640
|
+
"name": "keyword.control.import.else.c"
|
641
|
+
}
|
642
|
+
},
|
643
|
+
"contentName": "comment.block.preprocessor.else-branch.in-block",
|
644
|
+
"end": "(?=^\\s*#\\s*endif\\b.*$)",
|
645
|
+
"patterns": [
|
646
|
+
{
|
647
|
+
"include": "#disabled"
|
648
|
+
},
|
649
|
+
{
|
650
|
+
"include": "#pragma-mark"
|
651
|
+
}
|
652
|
+
]
|
653
|
+
},
|
654
|
+
{
|
655
|
+
"begin": "",
|
656
|
+
"end": "(?=^\\s*#\\s*(else|endif)\\b.*$)",
|
657
|
+
"patterns": [
|
658
|
+
{
|
659
|
+
"include": "#block_innards"
|
660
|
+
}
|
661
|
+
]
|
662
|
+
}
|
663
|
+
]
|
664
|
+
},
|
665
|
+
"preprocessor-rule-other": {
|
666
|
+
"begin": "^\\s*(#\\s*((if|elseif)\\s*(!?defined)?)\\b\\s*(.*?)(?:(?=(?://|/\\*))|$))",
|
667
|
+
"captures": {
|
668
|
+
"1": {
|
669
|
+
"name": "meta.preprocessor.macro.c"
|
670
|
+
},
|
671
|
+
"2": {
|
672
|
+
"name": "keyword.control.import.c"
|
673
|
+
},
|
674
|
+
"5": {
|
675
|
+
"name": "entity.name.function.preprocessor.c"
|
676
|
+
}
|
677
|
+
},
|
678
|
+
"end": "^\\s*(#\\s*(endif)\\b).*$",
|
679
|
+
"patterns": [
|
680
|
+
{
|
681
|
+
"include": "$base"
|
682
|
+
}
|
683
|
+
]
|
684
|
+
},
|
685
|
+
"preprocessor-rule-other-block": {
|
686
|
+
"begin": "^\\s*(#\\s*((if|elseif)\\s*(!?defined)?)\\b\\s*(.*?)(?:(?=(?://|/\\*))|$))",
|
687
|
+
"captures": {
|
688
|
+
"1": {
|
689
|
+
"name": "meta.preprocessor.macro.c"
|
690
|
+
},
|
691
|
+
"2": {
|
692
|
+
"name": "keyword.control.import.c"
|
693
|
+
},
|
694
|
+
"5": {
|
695
|
+
"name": "entity.name.function.preprocessor.c"
|
696
|
+
}
|
697
|
+
},
|
698
|
+
"end": "^\\s*(#\\s*(endif)\\b).*$",
|
699
|
+
"patterns": [
|
700
|
+
{
|
701
|
+
"include": "#block_innards"
|
702
|
+
}
|
703
|
+
]
|
704
|
+
},
|
705
|
+
"sizeof": {
|
706
|
+
"match": "\\b(sizeof)\\b",
|
707
|
+
"name": "keyword.operator.sizeof.c"
|
708
|
+
},
|
709
|
+
"string_escaped_char": {
|
710
|
+
"patterns": [
|
711
|
+
{
|
712
|
+
"match": "\\\\(\\\\|[abefnprtv'\"?]|[0-3]\\d{,2}|[4-7]\\d?|x[a-fA-F0-9]{,2}|u[a-fA-F0-9]{,4}|U[a-fA-F0-9]{,8})",
|
713
|
+
"name": "constant.character.escape.c"
|
714
|
+
},
|
715
|
+
{
|
716
|
+
"match": "\\\\.",
|
717
|
+
"name": "invalid.illegal.unknown-escape.c"
|
718
|
+
}
|
719
|
+
]
|
720
|
+
},
|
721
|
+
"string_placeholder": {
|
722
|
+
"patterns": [
|
723
|
+
{
|
724
|
+
"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[a-zA-Z%] # all letters, thanks to formatex specifier extensions\n \t\t\t\t\t",
|
725
|
+
"name": "constant.other.placeholder.c"
|
726
|
+
}
|
727
|
+
]
|
728
|
+
},
|
729
|
+
"operators": {
|
730
|
+
"match": "\\=|\\+|\\-|\\*|\\/|\\%|\\+\\+|\\-\\-|\\=\\=|\\!\\=|<|>|<\\=|>\\=|\\!|&&|\\||\\~|&|\\||\\^|<lt;|>>|\\+\\=|\\-\\=|\\*\\=|/\\=|\\%\\=|&\\=|\\|\\=|\\^\\=|<<\\=|>>\\=|\\->|\\->\\*|\\.|\\.\\*|\\?|\\\\:\\:",
|
731
|
+
"name": "keyword.operator.sizeof.c"
|
732
|
+
}
|
733
|
+
},
|
734
|
+
"scopeName": "source.pawn",
|
735
|
+
"uuid": "25066DC2-6B1D-11D9-9D5B-000D93589AF6"
|
736
|
+
}
|