crates/highlight/syntaxes/c.json 117.2 KiB raw
1
{
2
  "displayName": "C",
3
  "name": "c",
4
  "patterns": [
5
    {
6
      "include": "#preprocessor-rule-enabled"
7
    },
8
    {
9
      "include": "#preprocessor-rule-disabled"
10
    },
11
    {
12
      "include": "#preprocessor-rule-conditional"
13
    },
14
    {
15
      "include": "#predefined_macros"
16
    },
17
    {
18
      "include": "#comments"
19
    },
20
    {
21
      "include": "#switch_statement"
22
    },
23
    {
24
      "include": "#anon_pattern_1"
25
    },
26
    {
27
      "include": "#storage_types"
28
    },
29
    {
30
      "include": "#anon_pattern_2"
31
    },
32
    {
33
      "include": "#anon_pattern_3"
34
    },
35
    {
36
      "include": "#anon_pattern_4"
37
    },
38
    {
39
      "include": "#anon_pattern_5"
40
    },
41
    {
42
      "include": "#anon_pattern_6"
43
    },
44
    {
45
      "include": "#anon_pattern_7"
46
    },
47
    {
48
      "include": "#operators"
49
    },
50
    {
51
      "include": "#numbers"
52
    },
53
    {
54
      "include": "#strings"
55
    },
56
    {
57
      "include": "#anon_pattern_range_1"
58
    },
59
    {
60
      "include": "#anon_pattern_range_2"
61
    },
62
    {
63
      "include": "#anon_pattern_range_3"
64
    },
65
    {
66
      "include": "#pragma-mark"
67
    },
68
    {
69
      "include": "#anon_pattern_range_4"
70
    },
71
    {
72
      "include": "#anon_pattern_range_5"
73
    },
74
    {
75
      "include": "#anon_pattern_range_6"
76
    },
77
    {
78
      "include": "#anon_pattern_8"
79
    },
80
    {
81
      "include": "#anon_pattern_9"
82
    },
83
    {
84
      "include": "#anon_pattern_10"
85
    },
86
    {
87
      "include": "#anon_pattern_11"
88
    },
89
    {
90
      "include": "#anon_pattern_12"
91
    },
92
    {
93
      "include": "#anon_pattern_13"
94
    },
95
    {
96
      "include": "#block"
97
    },
98
    {
99
      "include": "#parens"
100
    },
101
    {
102
      "include": "#anon_pattern_range_7"
103
    },
104
    {
105
      "include": "#line_continuation_character"
106
    },
107
    {
108
      "include": "#anon_pattern_range_8"
109
    },
110
    {
111
      "include": "#anon_pattern_range_9"
112
    },
113
    {
114
      "include": "#anon_pattern_14"
115
    },
116
    {
117
      "include": "#anon_pattern_15"
118
    }
119
  ],
120
  "repository": {
121
    "access-method": {
122
      "begin": "([A-Z_a-z][0-9A-Z_a-z]*|(?<=[])]))\\s*(?:(\\.)|(->))((?:[A-Z_a-z][0-9A-Z_a-z]*\\s*(?:\\.|->))*)\\s*([A-Z_a-z][0-9A-Z_a-z]*)(\\()",
123
      "beginCaptures": {
124
        "1": {
125
          "name": "variable.object.c"
126
        },
127
        "2": {
128
          "name": "punctuation.separator.dot-access.c"
129
        },
130
        "3": {
131
          "name": "punctuation.separator.pointer-access.c"
132
        },
133
        "4": {
134
          "patterns": [
135
            {
136
              "match": "\\.",
137
              "name": "punctuation.separator.dot-access.c"
138
            },
139
            {
140
              "match": "->",
141
              "name": "punctuation.separator.pointer-access.c"
142
            },
143
            {
144
              "match": "[A-Z_a-z][0-9A-Z_a-z]*",
145
              "name": "variable.object.c"
146
            },
147
            {
148
              "match": ".+",
149
              "name": "everything.else.c"
150
            }
151
          ]
152
        },
153
        "5": {
154
          "name": "entity.name.function.member.c"
155
        },
156
        "6": {
157
          "name": "punctuation.section.arguments.begin.bracket.round.function.member.c"
158
        }
159
      },
160
      "end": "\\)",
161
      "endCaptures": {
162
        "0": {
163
          "name": "punctuation.section.arguments.end.bracket.round.function.member.c"
164
        }
165
      },
166
      "name": "meta.function-call.member.c",
167
      "patterns": [
168
        {
169
          "include": "#function-call-innards"
170
        }
171
      ]
172
    },
173
    "anon_pattern_1": {
174
      "match": "\\b(break|continue|do|else|for|goto|if|_Pragma|return|while)\\b",
175
      "name": "keyword.control.c"
176
    },
177
    "anon_pattern_10": {
178
      "match": "\\b((?:int8|int16|int32|int64|uint8|uint16|uint32|uint64|int_least8|int_least16|int_least32|int_least64|uint_least8|uint_least16|uint_least32|uint_least64|int_fast8|int_fast16|int_fast32|int_fast64|uint_fast8|uint_fast16|uint_fast32|uint_fast64|intptr|uintptr|intmax|uintmax)_t)\\b",
179
      "name": "support.type.stdint.c"
180
    },
181
    "anon_pattern_11": {
182
      "match": "\\b(noErr|kNilOptions|kInvalidID|kVariableLengthArray)\\b",
183
      "name": "support.constant.mac-classic.c"
184
    },
185
    "anon_pattern_12": {
186
      "match": "\\b(AbsoluteTime|Boolean|Byte|ByteCount|ByteOffset|BytePtr|CompTimeValue|ConstLogicalAddress|ConstStrFileNameParam|ConstStringPtr|Duration|Fixed|FixedPtr|Float32|Float32Point|Float64|Float80|Float96|FourCharCode|Fract|FractPtr|Handle|ItemCount|LogicalAddress|OptionBits|OSErr|OSStatus|OSType|OSTypePtr|PhysicalAddress|ProcessSerialNumber|ProcessSerialNumberPtr|ProcHandle|Ptr|ResType|ResTypePtr|ShortFixed|ShortFixedPtr|SignedByte|SInt16|SInt32|SInt64|SInt8|Size|StrFileName|StringHandle|StringPtr|TimeBase|TimeRecord|TimeScale|TimeValue|TimeValue64|UInt16|UInt32|UInt64|UInt8|UniChar|UniCharCount|UniCharCountPtr|UniCharPtr|UnicodeScalarValue|UniversalProcHandle|UniversalProcPtr|UnsignedFixed|UnsignedFixedPtr|UnsignedWide|UTF16Char|UTF32Char|UTF8Char)\\b",
187
      "name": "support.type.mac-classic.c"
188
    },
189
    "anon_pattern_13": {
190
      "match": "\\b([0-9A-Z_a-z]+_t)\\b",
191
      "name": "support.type.posix-reserved.c"
192
    },
193
    "anon_pattern_14": {
194
      "match": ";",
195
      "name": "punctuation.terminator.statement.c"
196
    },
197
    "anon_pattern_15": {
198
      "match": ",",
199
      "name": "punctuation.separator.delimiter.c"
200
    },
201
    "anon_pattern_2": {
202
      "match": "typedef",
203
      "name": "keyword.other.typedef.c"
204
    },
205
    "anon_pattern_3": {
206
      "match": "\\b(const|extern|register|restrict|static|volatile|inline)\\b",
207
      "name": "storage.modifier.c"
208
    },
209
    "anon_pattern_4": {
210
      "match": "\\bk[A-Z]\\w*\\b",
211
      "name": "constant.other.variable.mac-classic.c"
212
    },
213
    "anon_pattern_5": {
214
      "match": "\\bg[A-Z]\\w*\\b",
215
      "name": "variable.other.readwrite.global.mac-classic.c"
216
    },
217
    "anon_pattern_6": {
218
      "match": "\\bs[A-Z]\\w*\\b",
219
      "name": "variable.other.readwrite.static.mac-classic.c"
220
    },
221
    "anon_pattern_7": {
222
      "match": "\\b(NULL|true|false|TRUE|FALSE)\\b",
223
      "name": "constant.language.c"
224
    },
225
    "anon_pattern_8": {
226
      "match": "\\b(u_char|u_short|u_int|u_long|ushort|uint|u_quad_t|quad_t|qaddr_t|caddr_t|daddr_t|div_t|dev_t|fixpt_t|blkcnt_t|blksize_t|gid_t|in_addr_t|in_port_t|ino_t|key_t|mode_t|nlink_t|id_t|pid_t|off_t|segsz_t|swblk_t|uid_t|id_t|clock_t|size_t|ssize_t|time_t|useconds_t|suseconds_t)\\b",
227
      "name": "support.type.sys-types.c"
228
    },
229
    "anon_pattern_9": {
230
      "match": "\\b(pthread_(?:attr_|cond_|condattr_|mutex_|mutexattr_|once_|rwlock_|rwlockattr_||key_)t)\\b",
231
      "name": "support.type.pthread.c"
232
    },
233
    "anon_pattern_range_1": {
234
      "begin": "((?:(?>\\s+)|(/\\*)((?>(?:[^*]|(?>\\*+)[^/])*)((?>\\*+)/)))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z))((#)\\s*define)\\b\\s+((?<!\\w)[A-Z_a-z]\\w*(?!\\w))(?:(\\()([^()\\\\]+)(\\)))?",
235
      "beginCaptures": {
236
        "1": {
237
          "patterns": [
238
            {
239
              "include": "#inline_comment"
240
            }
241
          ]
242
        },
243
        "10": {
244
          "name": "punctuation.definition.parameters.end.c"
245
        },
246
        "2": {
247
          "name": "comment.block.c punctuation.definition.comment.begin.c"
248
        },
249
        "3": {
250
          "name": "comment.block.c"
251
        },
252
        "4": {
253
          "patterns": [
254
            {
255
              "match": "\\*/",
256
              "name": "comment.block.c punctuation.definition.comment.end.c"
257
            },
258
            {
259
              "match": "\\*",
260
              "name": "comment.block.c"
261
            }
262
          ]
263
        },
264
        "5": {
265
          "name": "keyword.control.directive.define.c"
266
        },
267
        "6": {
268
          "name": "punctuation.definition.directive.c"
269
        },
270
        "7": {
271
          "name": "entity.name.function.preprocessor.c"
272
        },
273
        "8": {
274
          "name": "punctuation.definition.parameters.begin.c"
275
        },
276
        "9": {
277
          "patterns": [
278
            {
279
              "captures": {
280
                "1": {
281
                  "name": "variable.parameter.preprocessor.c"
282
                }
283
              },
284
              "match": "(?<=[(,])\\s*((?<!\\w)[A-Z_a-z]\\w*(?!\\w))\\s*"
285
            },
286
            {
287
              "match": ",",
288
              "name": "punctuation.separator.parameters.c"
289
            },
290
            {
291
              "match": "\\.\\.\\.",
292
              "name": "ellipses.c punctuation.vararg-ellipses.variable.parameter.preprocessor.c"
293
            }
294
          ]
295
        }
296
      },
297
      "end": "(?<!\\\\)(?=\\n)",
298
      "name": "meta.preprocessor.macro.c",
299
      "patterns": [
300
        {
301
          "include": "#preprocessor-rule-define-line-contents"
302
        }
303
      ]
304
    },
305
    "anon_pattern_range_2": {
306
      "begin": "^\\s*((#)\\s*(error|warning))\\b\\s*",
307
      "beginCaptures": {
308
        "1": {
309
          "name": "keyword.control.directive.diagnostic.$3.c"
310
        },
311
        "2": {
312
          "name": "punctuation.definition.directive.c"
313
        }
314
      },
315
      "end": "(?<!\\\\)(?=\\n)",
316
      "name": "meta.preprocessor.diagnostic.c",
317
      "patterns": [
318
        {
319
          "begin": "\"",
320
          "beginCaptures": {
321
            "0": {
322
              "name": "punctuation.definition.string.begin.c"
323
            }
324
          },
325
          "end": "\"|(?<!\\\\)(?=\\s*\\n)",
326
          "endCaptures": {
327
            "0": {
328
              "name": "punctuation.definition.string.end.c"
329
            }
330
          },
331
          "name": "string.quoted.double.c",
332
          "patterns": [
333
            {
334
              "include": "#line_continuation_character"
335
            }
336
          ]
337
        },
338
        {
339
          "begin": "'",
340
          "beginCaptures": {
341
            "0": {
342
              "name": "punctuation.definition.string.begin.c"
343
            }
344
          },
345
          "end": "'|(?<!\\\\)(?=\\s*\\n)",
346
          "endCaptures": {
347
            "0": {
348
              "name": "punctuation.definition.string.end.c"
349
            }
350
          },
351
          "name": "string.quoted.single.c",
352
          "patterns": [
353
            {
354
              "include": "#line_continuation_character"
355
            }
356
          ]
357
        },
358
        {
359
          "begin": "[^\"']",
360
          "end": "(?<!\\\\)(?=\\s*\\n)",
361
          "name": "string.unquoted.single.c",
362
          "patterns": [
363
            {
364
              "include": "#line_continuation_character"
365
            },
366
            {
367
              "include": "#comments"
368
            }
369
          ]
370
        }
371
      ]
372
    },
373
    "anon_pattern_range_3": {
374
      "begin": "^\\s*((#)\\s*(i(?:nclude(?:_next)?|mport)))\\b\\s*",
375
      "beginCaptures": {
376
        "1": {
377
          "name": "keyword.control.directive.$3.c"
378
        },
379
        "2": {
380
          "name": "punctuation.definition.directive.c"
381
        }
382
      },
383
      "end": "(?=/[*/])|(?<!\\\\)(?=\\n)",
384
      "name": "meta.preprocessor.include.c",
385
      "patterns": [
386
        {
387
          "include": "#line_continuation_character"
388
        },
389
        {
390
          "begin": "\"",
391
          "beginCaptures": {
392
            "0": {
393
              "name": "punctuation.definition.string.begin.c"
394
            }
395
          },
396
          "end": "\"",
397
          "endCaptures": {
398
            "0": {
399
              "name": "punctuation.definition.string.end.c"
400
            }
401
          },
402
          "name": "string.quoted.double.include.c"
403
        },
404
        {
405
          "begin": "<",
406
          "beginCaptures": {
407
            "0": {
408
              "name": "punctuation.definition.string.begin.c"
409
            }
410
          },
411
          "end": ">",
412
          "endCaptures": {
413
            "0": {
414
              "name": "punctuation.definition.string.end.c"
415
            }
416
          },
417
          "name": "string.quoted.other.lt-gt.include.c"
418
        }
419
      ]
420
    },
421
    "anon_pattern_range_4": {
422
      "begin": "^\\s*((#)\\s*line)\\b",
423
      "beginCaptures": {
424
        "1": {
425
          "name": "keyword.control.directive.line.c"
426
        },
427
        "2": {
428
          "name": "punctuation.definition.directive.c"
429
        }
430
      },
431
      "end": "(?=/[*/])|(?<!\\\\)(?=\\n)",
432
      "name": "meta.preprocessor.c",
433
      "patterns": [
434
        {
435
          "include": "#strings"
436
        },
437
        {
438
          "include": "#numbers"
439
        },
440
        {
441
          "include": "#line_continuation_character"
442
        }
443
      ]
444
    },
445
    "anon_pattern_range_5": {
446
      "begin": "^\\s*((#)\\s*undef)\\b",
447
      "beginCaptures": {
448
        "1": {
449
          "name": "keyword.control.directive.undef.c"
450
        },
451
        "2": {
452
          "name": "punctuation.definition.directive.c"
453
        }
454
      },
455
      "end": "(?=/[*/])|(?<!\\\\)(?=\\n)",
456
      "name": "meta.preprocessor.c",
457
      "patterns": [
458
        {
459
          "match": "[$A-Z_a-z][$\\w]*",
460
          "name": "entity.name.function.preprocessor.c"
461
        },
462
        {
463
          "include": "#line_continuation_character"
464
        }
465
      ]
466
    },
467
    "anon_pattern_range_6": {
468
      "begin": "^\\s*((#)\\s*pragma)\\b",
469
      "beginCaptures": {
470
        "1": {
471
          "name": "keyword.control.directive.pragma.c"
472
        },
473
        "2": {
474
          "name": "punctuation.definition.directive.c"
475
        }
476
      },
477
      "end": "(?=/[*/])|(?<!\\\\)(?=\\n)",
478
      "name": "meta.preprocessor.pragma.c",
479
      "patterns": [
480
        {
481
          "include": "#strings"
482
        },
483
        {
484
          "match": "[$A-Z_a-z][-$\\w]*",
485
          "name": "entity.other.attribute-name.pragma.preprocessor.c"
486
        },
487
        {
488
          "include": "#numbers"
489
        },
490
        {
491
          "include": "#line_continuation_character"
492
        }
493
      ]
494
    },
495
    "anon_pattern_range_7": {
496
      "begin": "(?<!\\w)(?!\\s*(?:atomic_uint_least64_t|atomic_uint_least16_t|atomic_uint_least32_t|atomic_uint_least8_t|atomic_int_least16_t|atomic_uint_fast64_t|atomic_uint_fast32_t|atomic_int_least64_t|atomic_int_least32_t|pthread_rwlockattr_t|atomic_uint_fast16_t|pthread_mutexattr_t|atomic_int_fast16_t|atomic_uint_fast8_t|atomic_int_fast64_t|atomic_int_least8_t|atomic_int_fast32_t|atomic_int_fast8_t|pthread_condattr_t|pthread_rwlock_t|atomic_uintptr_t|atomic_ptrdiff_t|atomic_uintmax_t|atomic_intmax_t|atomic_char32_t|atomic_intptr_t|atomic_char16_t|pthread_mutex_t|pthread_cond_t|atomic_wchar_t|uint_least64_t|uint_least32_t|uint_least16_t|pthread_once_t|pthread_attr_t|uint_least8_t|int_least32_t|int_least16_t|pthread_key_t|uint_fast32_t|uint_fast64_t|uint_fast16_t|atomic_size_t|atomic_ushort|atomic_ullong|int_least64_t|atomic_ulong|int_least8_t|int_fast16_t|int_fast32_t|int_fast64_t|uint_fast8_t|memory_order|atomic_schar|atomic_uchar|atomic_short|atomic_llong|thread_local|atomic_bool|atomic_uint|atomic_long|int_fast8_t|suseconds_t|atomic_char|atomic_int|useconds_t|_Imaginary|uintmax_t|in_addr_t|in_port_t|_Noreturn|blksize_t|pthread_t|uintptr_t|volatile|u_quad_t|blkcnt_t|intmax_t|intptr_t|_Complex|uint16_t|uint32_t|uint64_t|_Alignof|_Alignas|continue|unsigned|restrict|intmax_t|register|int64_t|qaddr_t|segsz_t|_Atomic|alignas|default|caddr_t|nlink_t|typedef|u_short|fixpt_t|clock_t|swblk_t|ssize_t|alignof|daddr_t|int16_t|int32_t|uint8_t|struct|mode_t|size_t|time_t|ushort|u_long|u_char|int8_t|double|signed|static|extern|inline|return|switch|xor_eq|and_eq|bitand|not_eq|sizeof|quad_t|uid_t|bitor|union|off_t|key_t|ino_t|compl|u_int|short|const|false|while|float|pid_t|break|_Bool|or_eq|div_t|dev_t|gid_t|id_t|long|case|goto|else|bool|auto|id_t|enum|uint|true|NULL|void|char|for|not|int|and|xor|do|or|if)\\s*\\()(?=[A-Z_a-z]\\w*\\s*\\()",
497
      "end": "(?!\\G)(?<=\\))",
498
      "name": "meta.function.c",
499
      "patterns": [
500
        {
501
          "include": "#function-innards"
502
        }
503
      ]
504
    },
505
    "anon_pattern_range_8": {
506
      "begin": "([A-Z_a-z][0-9A-Z_a-z]*|(?<=[])]))?(\\[)(?!])",
507
      "beginCaptures": {
508
        "1": {
509
          "name": "variable.object.c"
510
        },
511
        "2": {
512
          "name": "punctuation.definition.begin.bracket.square.c"
513
        }
514
      },
515
      "end": "]",
516
      "endCaptures": {
517
        "0": {
518
          "name": "punctuation.definition.end.bracket.square.c"
519
        }
520
      },
521
      "name": "meta.bracket.square.access.c",
522
      "patterns": [
523
        {
524
          "include": "#function-call-innards"
525
        }
526
      ]
527
    },
528
    "anon_pattern_range_9": {
529
      "match": "\\[\\s*]",
530
      "name": "storage.modifier.array.bracket.square.c"
531
    },
532
    "backslash_escapes": {
533
      "match": "\\\\([\"'?\\\\abefnprtv]|[0-3][0-7]{0,2}|[4-7]\\d?|x\\h{0,2}|u\\h{0,4}|U\\h{0,8})",
534
      "name": "constant.character.escape.c"
535
    },
536
    "block": {
537
      "patterns": [
538
        {
539
          "begin": "\\{",
540
          "beginCaptures": {
541
            "0": {
542
              "name": "punctuation.section.block.begin.bracket.curly.c"
543
            }
544
          },
545
          "end": "}|(?=\\s*#\\s*e(?:lif|lse|ndif)\\b)",
546
          "endCaptures": {
547
            "0": {
548
              "name": "punctuation.section.block.end.bracket.curly.c"
549
            }
550
          },
551
          "name": "meta.block.c",
552
          "patterns": [
553
            {
554
              "include": "#block_innards"
555
            }
556
          ]
557
        }
558
      ]
559
    },
560
    "block_comment": {
561
      "patterns": [
562
        {
563
          "begin": "\\s*+(/\\*)",
564
          "beginCaptures": {
565
            "1": {
566
              "name": "punctuation.definition.comment.begin.c"
567
            }
568
          },
569
          "end": "\\*/",
570
          "endCaptures": {
571
            "0": {
572
              "name": "punctuation.definition.comment.end.c"
573
            }
574
          },
575
          "name": "comment.block.c"
576
        },
577
        {
578
          "begin": "\\s*+(/\\*)",
579
          "beginCaptures": {
580
            "1": {
581
              "name": "punctuation.definition.comment.begin.c"
582
            }
583
          },
584
          "end": "\\*/",
585
          "endCaptures": {
586
            "0": {
587
              "name": "punctuation.definition.comment.end.c"
588
            }
589
          },
590
          "name": "comment.block.c"
591
        }
592
      ]
593
    },
594
    "block_innards": {
595
      "patterns": [
596
        {
597
          "include": "#preprocessor-rule-enabled-block"
598
        },
599
        {
600
          "include": "#preprocessor-rule-disabled-block"
601
        },
602
        {
603
          "include": "#preprocessor-rule-conditional-block"
604
        },
605
        {
606
          "include": "#method_access"
607
        },
608
        {
609
          "include": "#member_access"
610
        },
611
        {
612
          "include": "#c_function_call"
613
        },
614
        {
615
          "begin": "(?=\\s)(?<!else|new|return)(?<=\\w)\\s+(and|and_eq|bitand|bitor|compl|not|not_eq|or|or_eq|typeid|xor|xor_eq|alignof|alignas)((?:[A-Z_a-z][0-9A-Z_a-z]*+|::)++|(?<=operator)(?:[-!\\&*+<=>]+|\\(\\)|\\[]))\\s*(\\()",
616
          "beginCaptures": {
617
            "1": {
618
              "name": "variable.other.c"
619
            },
620
            "2": {
621
              "name": "punctuation.section.parens.begin.bracket.round.initialization.c"
622
            }
623
          },
624
          "end": "\\)",
625
          "endCaptures": {
626
            "0": {
627
              "name": "punctuation.section.parens.end.bracket.round.initialization.c"
628
            }
629
          },
630
          "name": "meta.initialization.c",
631
          "patterns": [
632
            {
633
              "include": "#function-call-innards"
634
            }
635
          ]
636
        },
637
        {
638
          "begin": "\\{",
639
          "beginCaptures": {
640
            "0": {
641
              "name": "punctuation.section.block.begin.bracket.curly.c"
642
            }
643
          },
644
          "end": "}|(?=\\s*#\\s*e(?:lif|lse|ndif)\\b)",
645
          "endCaptures": {
646
            "0": {
647
              "name": "punctuation.section.block.end.bracket.curly.c"
648
            }
649
          },
650
          "patterns": [
651
            {
652
              "include": "#block_innards"
653
            }
654
          ]
655
        },
656
        {
657
          "include": "#parens-block"
658
        },
659
        {
660
          "include": "$self"
661
        }
662
      ]
663
    },
664
    "c_conditional_context": {
665
      "patterns": [
666
        {
667
          "include": "$self"
668
        },
669
        {
670
          "include": "#block_innards"
671
        }
672
      ]
673
    },
674
    "c_function_call": {
675
      "begin": "(?!(?:while|for|do|if|else|switch|catch|enumerate|return|typeid|alignof|alignas|sizeof|[cr]?iterate|and|and_eq|bitand|bitor|compl|not|not_eq|or|or_eq|typeid|xor|xor_eq|alignof|alignas)\\s*\\()(?=(?:[A-Z_a-z][0-9A-Z_a-z]*+|::)++\\s*\\(|(?<=operator)(?:[-!\\&*+<=>]+|\\(\\)|\\[])\\s*\\()",
676
      "end": "(?<=\\))(?!\\w)",
677
      "name": "meta.function-call.c",
678
      "patterns": [
679
        {
680
          "include": "#function-call-innards"
681
        }
682
      ]
683
    },
684
    "case_statement": {
685
      "begin": "((?>(?:(?>(?<!\\s)\\s+)|(/\\*)((?>(?:[^*]|(?>\\*+)[^/])*)((?>\\*+)/)))+|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z)))((?<!\\w)case(?!\\w))",
686
      "beginCaptures": {
687
        "1": {
688
          "patterns": [
689
            {
690
              "include": "#inline_comment"
691
            }
692
          ]
693
        },
694
        "2": {
695
          "name": "comment.block.c punctuation.definition.comment.begin.c"
696
        },
697
        "3": {
698
          "name": "comment.block.c"
699
        },
700
        "4": {
701
          "patterns": [
702
            {
703
              "match": "\\*/",
704
              "name": "comment.block.c punctuation.definition.comment.end.c"
705
            },
706
            {
707
              "match": "\\*",
708
              "name": "comment.block.c"
709
            }
710
          ]
711
        },
712
        "5": {
713
          "name": "keyword.control.case.c"
714
        }
715
      },
716
      "end": "(:)",
717
      "endCaptures": {
718
        "1": {
719
          "name": "punctuation.separator.colon.case.c"
720
        }
721
      },
722
      "name": "meta.conditional.case.c",
723
      "patterns": [
724
        {
725
          "include": "#evaluation_context"
726
        },
727
        {
728
          "include": "#c_conditional_context"
729
        }
730
      ]
731
    },
732
    "comments": {
733
      "patterns": [
734
        {
735
          "patterns": [
736
            {
737
              "patterns": [
738
                {
739
                  "begin": "^(?>\\s*)(//[!/]+)",
740
                  "beginCaptures": {
741
                    "1": {
742
                      "name": "punctuation.definition.comment.documentation.c"
743
                    }
744
                  },
745
                  "end": "(?<=\\n)(?<!\\\\\\n)",
746
                  "name": "comment.line.double-slash.documentation.c",
747
                  "patterns": [
748
                    {
749
                      "include": "#line_continuation_character"
750
                    },
751
                    {
752
                      "match": "(?<=[!*/\\s])[@\\\\](?:callergraph|callgraph|else|endif|f\\$|f\\[|f]|hidecallergraph|hidecallgraph|hiderefby|hiderefs|hideinitializer|htmlinclude|n|nosubgrouping|private|privatesection|protected|protectedsection|public|publicsection|pure|showinitializer|showrefby|showrefs|tableofcontents|[\"-%.<=>]|::|\\||---??)\\b(?:\\{[^}]*})?",
753
                      "name": "storage.type.class.doxygen.c"
754
                    },
755
                    {
756
                      "captures": {
757
                        "1": {
758
                          "name": "storage.type.class.doxygen.c"
759
                        },
760
                        "2": {
761
                          "name": "markup.italic.doxygen.c"
762
                        }
763
                      },
764
                      "match": "((?<=[!*/\\s])[@\\\\](?:a|em?))\\s+(\\S+)"
765
                    },
766
                    {
767
                      "captures": {
768
                        "1": {
769
                          "name": "storage.type.class.doxygen.c"
770
                        },
771
                        "2": {
772
                          "name": "markup.bold.doxygen.c"
773
                        }
774
                      },
775
                      "match": "((?<=[!*/\\s])[@\\\\]b)\\s+(\\S+)"
776
                    },
777
                    {
778
                      "captures": {
779
                        "1": {
780
                          "name": "storage.type.class.doxygen.c"
781
                        },
782
                        "2": {
783
                          "name": "markup.inline.raw.string.c"
784
                        }
785
                      },
786
                      "match": "((?<=[!*/\\s])[@\\\\][cp])\\s+(\\S+)"
787
                    },
788
                    {
789
                      "match": "(?<=[!*/\\s])[@\\\\](?:a|anchor|[bc]|cite|copybrief|copydetail|copydoc|def|dir|dontinclude|em??|emoji|enum|example|extends|file|idlexcept|implements|include|includedoc|includelineno|latexinclude|link|memberof|namespace|p|package|ref|refitem|related|relates|relatedalso|relatesalso|verbinclude)\\b(?:\\{[^}]*})?",
790
                      "name": "storage.type.class.doxygen.c"
791
                    },
792
                    {
793
                      "match": "(?<=[!*/\\s])[@\\\\](?:addindex|addtogroup|category|class|defgroup|diafile|dotfile|elseif|fn|headerfile|if|ifnot|image|ingroup|interface|line|mainpage|mscfile|name|overload|page|property|protocol|section|skip|skipline|snippet|snippetdoc|snippetlineno|struct|subpage|subsection|subsubsection|typedef|union|until|vhdlflow|weakgroup)\\b(?:\\{[^}]*})?",
794
                      "name": "storage.type.class.doxygen.c"
795
                    },
796
                    {
797
                      "captures": {
798
                        "1": {
799
                          "name": "storage.type.class.doxygen.c"
800
                        },
801
                        "2": {
802
                          "patterns": [
803
                            {
804
                              "match": "in|out",
805
                              "name": "keyword.other.parameter.direction.$0.c"
806
                            }
807
                          ]
808
                        },
809
                        "3": {
810
                          "name": "variable.parameter.c"
811
                        }
812
                      },
813
                      "match": "((?<=[!*/\\s])[@\\\\]param)(?:\\s*\\[((?:,?\\s*(?:in|out)\\s*)+)])?\\s+\\b(\\w+)\\b"
814
                    },
815
                    {
816
                      "match": "(?<=[!*/\\s])[@\\\\](?:arg|attention|authors??|brief|bug|copyright|date|deprecated|details|exception|invariant|li|note|par|paragraph|param|post|pre|remarks??|result|returns??|retval|sa|see|short|since|test|throw|todo|tparam|version|warning|xrefitem)\\b(?:\\{[^}]*})?",
817
                      "name": "storage.type.class.doxygen.c"
818
                    },
819
                    {
820
                      "match": "(?<=[!*/\\s])[@\\\\](?:code|cond|docbookonly|dot|htmlonly|internal|latexonly|link|manonly|msc|parblock|rtfonly|secreflist|uml|verbatim|xmlonly|endcode|endcond|enddocbookonly|enddot|endhtmlonly|endinternal|endlatexonly|endlink|endmanonly|endmsc|endparblock|endrtfonly|endsecreflist|enduml|endverbatim|endxmlonly)\\b(?:\\{[^}]*})?",
821
                      "name": "storage.type.class.doxygen.c"
822
                    },
823
                    {
824
                      "match": "\\b[A-Z]+:|@[_a-z]+:",
825
                      "name": "storage.type.class.gtkdoc"
826
                    }
827
                  ]
828
                },
829
                {
830
                  "captures": {
831
                    "1": {
832
                      "name": "punctuation.definition.comment.begin.documentation.c"
833
                    },
834
                    "2": {
835
                      "patterns": [
836
                        {
837
                          "match": "(?<=[!*/\\s])[@\\\\](?:callergraph|callgraph|else|endif|f\\$|f\\[|f]|hidecallergraph|hidecallgraph|hiderefby|hiderefs|hideinitializer|htmlinclude|n|nosubgrouping|private|privatesection|protected|protectedsection|public|publicsection|pure|showinitializer|showrefby|showrefs|tableofcontents|[\"-%.<=>]|::|\\||---??)\\b(?:\\{[^}]*})?",
838
                          "name": "storage.type.class.doxygen.c"
839
                        },
840
                        {
841
                          "captures": {
842
                            "1": {
843
                              "name": "storage.type.class.doxygen.c"
844
                            },
845
                            "2": {
846
                              "name": "markup.italic.doxygen.c"
847
                            }
848
                          },
849
                          "match": "((?<=[!*/\\s])[@\\\\](?:a|em?))\\s+(\\S+)"
850
                        },
851
                        {
852
                          "captures": {
853
                            "1": {
854
                              "name": "storage.type.class.doxygen.c"
855
                            },
856
                            "2": {
857
                              "name": "markup.bold.doxygen.c"
858
                            }
859
                          },
860
                          "match": "((?<=[!*/\\s])[@\\\\]b)\\s+(\\S+)"
861
                        },
862
                        {
863
                          "captures": {
864
                            "1": {
865
                              "name": "storage.type.class.doxygen.c"
866
                            },
867
                            "2": {
868
                              "name": "markup.inline.raw.string.c"
869
                            }
870
                          },
871
                          "match": "((?<=[!*/\\s])[@\\\\][cp])\\s+(\\S+)"
872
                        },
873
                        {
874
                          "match": "(?<=[!*/\\s])[@\\\\](?:a|anchor|[bc]|cite|copybrief|copydetail|copydoc|def|dir|dontinclude|em??|emoji|enum|example|extends|file|idlexcept|implements|include|includedoc|includelineno|latexinclude|link|memberof|namespace|p|package|ref|refitem|related|relates|relatedalso|relatesalso|verbinclude)\\b(?:\\{[^}]*})?",
875
                          "name": "storage.type.class.doxygen.c"
876
                        },
877
                        {
878
                          "match": "(?<=[!*/\\s])[@\\\\](?:addindex|addtogroup|category|class|defgroup|diafile|dotfile|elseif|fn|headerfile|if|ifnot|image|ingroup|interface|line|mainpage|mscfile|name|overload|page|property|protocol|section|skip|skipline|snippet|snippetdoc|snippetlineno|struct|subpage|subsection|subsubsection|typedef|union|until|vhdlflow|weakgroup)\\b(?:\\{[^}]*})?",
879
                          "name": "storage.type.class.doxygen.c"
880
                        },
881
                        {
882
                          "captures": {
883
                            "1": {
884
                              "name": "storage.type.class.doxygen.c"
885
                            },
886
                            "2": {
887
                              "patterns": [
888
                                {
889
                                  "match": "in|out",
890
                                  "name": "keyword.other.parameter.direction.$0.c"
891
                                }
892
                              ]
893
                            },
894
                            "3": {
895
                              "name": "variable.parameter.c"
896
                            }
897
                          },
898
                          "match": "((?<=[!*/\\s])[@\\\\]param)(?:\\s*\\[((?:,?\\s*(?:in|out)\\s*)+)])?\\s+\\b(\\w+)\\b"
899
                        },
900
                        {
901
                          "match": "(?<=[!*/\\s])[@\\\\](?:arg|attention|authors??|brief|bug|copyright|date|deprecated|details|exception|invariant|li|note|par|paragraph|param|post|pre|remarks??|result|returns??|retval|sa|see|short|since|test|throw|todo|tparam|version|warning|xrefitem)\\b(?:\\{[^}]*})?",
902
                          "name": "storage.type.class.doxygen.c"
903
                        },
904
                        {
905
                          "match": "(?<=[!*/\\s])[@\\\\](?:code|cond|docbookonly|dot|htmlonly|internal|latexonly|link|manonly|msc|parblock|rtfonly|secreflist|uml|verbatim|xmlonly|endcode|endcond|enddocbookonly|enddot|endhtmlonly|endinternal|endlatexonly|endlink|endmanonly|endmsc|endparblock|endrtfonly|endsecreflist|enduml|endverbatim|endxmlonly)\\b(?:\\{[^}]*})?",
906
                          "name": "storage.type.class.doxygen.c"
907
                        },
908
                        {
909
                          "match": "\\b[A-Z]+:|@[_a-z]+:",
910
                          "name": "storage.type.class.gtkdoc"
911
                        }
912
                      ]
913
                    },
914
                    "3": {
915
                      "name": "punctuation.definition.comment.end.documentation.c"
916
                    }
917
                  },
918
                  "match": "(/\\*[!*]+(?=\\s))(.+)([!*]*\\*/)",
919
                  "name": "comment.block.documentation.c"
920
                },
921
                {
922
                  "begin": "((?>\\s*)/\\*[!*]+(?:(?:\\n|$)|(?=\\s)))",
923
                  "beginCaptures": {
924
                    "1": {
925
                      "name": "punctuation.definition.comment.begin.documentation.c"
926
                    }
927
                  },
928
                  "end": "([!*]*\\*/)",
929
                  "endCaptures": {
930
                    "1": {
931
                      "name": "punctuation.definition.comment.end.documentation.c"
932
                    }
933
                  },
934
                  "name": "comment.block.documentation.c",
935
                  "patterns": [
936
                    {
937
                      "match": "(?<=[!*/\\s])[@\\\\](?:callergraph|callgraph|else|endif|f\\$|f\\[|f]|hidecallergraph|hidecallgraph|hiderefby|hiderefs|hideinitializer|htmlinclude|n|nosubgrouping|private|privatesection|protected|protectedsection|public|publicsection|pure|showinitializer|showrefby|showrefs|tableofcontents|[\"-%.<=>]|::|\\||---??)\\b(?:\\{[^}]*})?",
938
                      "name": "storage.type.class.doxygen.c"
939
                    },
940
                    {
941
                      "captures": {
942
                        "1": {
943
                          "name": "storage.type.class.doxygen.c"
944
                        },
945
                        "2": {
946
                          "name": "markup.italic.doxygen.c"
947
                        }
948
                      },
949
                      "match": "((?<=[!*/\\s])[@\\\\](?:a|em?))\\s+(\\S+)"
950
                    },
951
                    {
952
                      "captures": {
953
                        "1": {
954
                          "name": "storage.type.class.doxygen.c"
955
                        },
956
                        "2": {
957
                          "name": "markup.bold.doxygen.c"
958
                        }
959
                      },
960
                      "match": "((?<=[!*/\\s])[@\\\\]b)\\s+(\\S+)"
961
                    },
962
                    {
963
                      "captures": {
964
                        "1": {
965
                          "name": "storage.type.class.doxygen.c"
966
                        },
967
                        "2": {
968
                          "name": "markup.inline.raw.string.c"
969
                        }
970
                      },
971
                      "match": "((?<=[!*/\\s])[@\\\\][cp])\\s+(\\S+)"
972
                    },
973
                    {
974
                      "match": "(?<=[!*/\\s])[@\\\\](?:a|anchor|[bc]|cite|copybrief|copydetail|copydoc|def|dir|dontinclude|em??|emoji|enum|example|extends|file|idlexcept|implements|include|includedoc|includelineno|latexinclude|link|memberof|namespace|p|package|ref|refitem|related|relates|relatedalso|relatesalso|verbinclude)\\b(?:\\{[^}]*})?",
975
                      "name": "storage.type.class.doxygen.c"
976
                    },
977
                    {
978
                      "match": "(?<=[!*/\\s])[@\\\\](?:addindex|addtogroup|category|class|defgroup|diafile|dotfile|elseif|fn|headerfile|if|ifnot|image|ingroup|interface|line|mainpage|mscfile|name|overload|page|property|protocol|section|skip|skipline|snippet|snippetdoc|snippetlineno|struct|subpage|subsection|subsubsection|typedef|union|until|vhdlflow|weakgroup)\\b(?:\\{[^}]*})?",
979
                      "name": "storage.type.class.doxygen.c"
980
                    },
981
                    {
982
                      "captures": {
983
                        "1": {
984
                          "name": "storage.type.class.doxygen.c"
985
                        },
986
                        "2": {
987
                          "patterns": [
988
                            {
989
                              "match": "in|out",
990
                              "name": "keyword.other.parameter.direction.$0.c"
991
                            }
992
                          ]
993
                        },
994
                        "3": {
995
                          "name": "variable.parameter.c"
996
                        }
997
                      },
998
                      "match": "((?<=[!*/\\s])[@\\\\]param)(?:\\s*\\[((?:,?\\s*(?:in|out)\\s*)+)])?\\s+\\b(\\w+)\\b"
999
                    },
1000
                    {
1001
                      "match": "(?<=[!*/\\s])[@\\\\](?:arg|attention|authors??|brief|bug|copyright|date|deprecated|details|exception|invariant|li|note|par|paragraph|param|post|pre|remarks??|result|returns??|retval|sa|see|short|since|test|throw|todo|tparam|version|warning|xrefitem)\\b(?:\\{[^}]*})?",
1002
                      "name": "storage.type.class.doxygen.c"
1003
                    },
1004
                    {
1005
                      "match": "(?<=[!*/\\s])[@\\\\](?:code|cond|docbookonly|dot|htmlonly|internal|latexonly|link|manonly|msc|parblock|rtfonly|secreflist|uml|verbatim|xmlonly|endcode|endcond|enddocbookonly|enddot|endhtmlonly|endinternal|endlatexonly|endlink|endmanonly|endmsc|endparblock|endrtfonly|endsecreflist|enduml|endverbatim|endxmlonly)\\b(?:\\{[^}]*})?",
1006
                      "name": "storage.type.class.doxygen.c"
1007
                    },
1008
                    {
1009
                      "match": "\\b[A-Z]+:|@[_a-z]+:",
1010
                      "name": "storage.type.class.gtkdoc"
1011
                    }
1012
                  ]
1013
                },
1014
                {
1015
                  "captures": {
1016
                    "1": {
1017
                      "name": "meta.toc-list.banner.block.c"
1018
                    }
1019
                  },
1020
                  "match": "^/\\* =(\\s*.*?)\\s*= \\*/$\\n?",
1021
                  "name": "comment.block.banner.c"
1022
                },
1023
                {
1024
                  "begin": "(/\\*)",
1025
                  "beginCaptures": {
1026
                    "1": {
1027
                      "name": "punctuation.definition.comment.begin.c"
1028
                    }
1029
                  },
1030
                  "end": "(\\*/)",
1031
                  "endCaptures": {
1032
                    "1": {
1033
                      "name": "punctuation.definition.comment.end.c"
1034
                    }
1035
                  },
1036
                  "name": "comment.block.c"
1037
                },
1038
                {
1039
                  "captures": {
1040
                    "1": {
1041
                      "name": "meta.toc-list.banner.line.c"
1042
                    }
1043
                  },
1044
                  "match": "^// =(\\s*.*?)\\s*=$\\n?",
1045
                  "name": "comment.line.banner.c"
1046
                },
1047
                {
1048
                  "begin": "((?:^[\\t ]+)?)(?=//)",
1049
                  "beginCaptures": {
1050
                    "1": {
1051
                      "name": "punctuation.whitespace.comment.leading.c"
1052
                    }
1053
                  },
1054
                  "end": "(?!\\G)",
1055
                  "patterns": [
1056
                    {
1057
                      "begin": "(//)",
1058
                      "beginCaptures": {
1059
                        "1": {
1060
                          "name": "punctuation.definition.comment.c"
1061
                        }
1062
                      },
1063
                      "end": "(?=\\n)",
1064
                      "name": "comment.line.double-slash.c",
1065
                      "patterns": [
1066
                        {
1067
                          "include": "#line_continuation_character"
1068
                        }
1069
                      ]
1070
                    }
1071
                  ]
1072
                }
1073
              ]
1074
            },
1075
            {
1076
              "include": "#block_comment"
1077
            },
1078
            {
1079
              "include": "#line_comment"
1080
            }
1081
          ]
1082
        },
1083
        {
1084
          "include": "#block_comment"
1085
        },
1086
        {
1087
          "include": "#line_comment"
1088
        }
1089
      ]
1090
    },
1091
    "default_statement": {
1092
      "begin": "((?>(?:(?>(?<!\\s)\\s+)|(/\\*)((?>(?:[^*]|(?>\\*+)[^/])*)((?>\\*+)/)))+|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z)))((?<!\\w)default(?!\\w))",
1093
      "beginCaptures": {
1094
        "1": {
1095
          "patterns": [
1096
            {
1097
              "include": "#inline_comment"
1098
            }
1099
          ]
1100
        },
1101
        "2": {
1102
          "name": "comment.block.c punctuation.definition.comment.begin.c"
1103
        },
1104
        "3": {
1105
          "name": "comment.block.c"
1106
        },
1107
        "4": {
1108
          "patterns": [
1109
            {
1110
              "match": "\\*/",
1111
              "name": "comment.block.c punctuation.definition.comment.end.c"
1112
            },
1113
            {
1114
              "match": "\\*",
1115
              "name": "comment.block.c"
1116
            }
1117
          ]
1118
        },
1119
        "5": {
1120
          "name": "keyword.control.default.c"
1121
        }
1122
      },
1123
      "end": "(:)",
1124
      "endCaptures": {
1125
        "1": {
1126
          "name": "punctuation.separator.colon.case.default.c"
1127
        }
1128
      },
1129
      "name": "meta.conditional.case.c",
1130
      "patterns": [
1131
        {
1132
          "include": "#evaluation_context"
1133
        },
1134
        {
1135
          "include": "#c_conditional_context"
1136
        }
1137
      ]
1138
    },
1139
    "disabled": {
1140
      "begin": "^\\s*#\\s*if(n?def)?\\b.*$",
1141
      "end": "^\\s*#\\s*endif\\b",
1142
      "patterns": [
1143
        {
1144
          "include": "#disabled"
1145
        },
1146
        {
1147
          "include": "#pragma-mark"
1148
        }
1149
      ]
1150
    },
1151
    "evaluation_context": {
1152
      "patterns": [
1153
        {
1154
          "include": "#function-call-innards"
1155
        },
1156
        {
1157
          "include": "$self"
1158
        }
1159
      ]
1160
    },
1161
    "function-call-innards": {
1162
      "patterns": [
1163
        {
1164
          "include": "#comments"
1165
        },
1166
        {
1167
          "include": "#storage_types"
1168
        },
1169
        {
1170
          "include": "#method_access"
1171
        },
1172
        {
1173
          "include": "#member_access"
1174
        },
1175
        {
1176
          "include": "#operators"
1177
        },
1178
        {
1179
          "begin": "(?!(?:while|for|do|if|else|switch|catch|enumerate|return|typeid|alignof|alignas|sizeof|[cr]?iterate|and|and_eq|bitand|bitor|compl|not|not_eq|or|or_eq|typeid|xor|xor_eq|alignof|alignas)\\s*\\()((?:[A-Z_a-z][0-9A-Z_a-z]*+|::)++|(?<=operator)(?:[-!\\&*+<=>]+|\\(\\)|\\[]))\\s*(\\()",
1180
          "beginCaptures": {
1181
            "1": {
1182
              "name": "entity.name.function.c"
1183
            },
1184
            "2": {
1185
              "name": "punctuation.section.arguments.begin.bracket.round.c"
1186
            }
1187
          },
1188
          "end": "\\)",
1189
          "endCaptures": {
1190
            "0": {
1191
              "name": "punctuation.section.arguments.end.bracket.round.c"
1192
            }
1193
          },
1194
          "patterns": [
1195
            {
1196
              "include": "#function-call-innards"
1197
            }
1198
          ]
1199
        },
1200
        {
1201
          "begin": "\\(",
1202
          "beginCaptures": {
1203
            "0": {
1204
              "name": "punctuation.section.parens.begin.bracket.round.c"
1205
            }
1206
          },
1207
          "end": "\\)",
1208
          "endCaptures": {
1209
            "0": {
1210
              "name": "punctuation.section.parens.end.bracket.round.c"
1211
            }
1212
          },
1213
          "patterns": [
1214
            {
1215
              "include": "#function-call-innards"
1216
            }
1217
          ]
1218
        },
1219
        {
1220
          "include": "#block_innards"
1221
        }
1222
      ]
1223
    },
1224
    "function-innards": {
1225
      "patterns": [
1226
        {
1227
          "include": "#comments"
1228
        },
1229
        {
1230
          "include": "#storage_types"
1231
        },
1232
        {
1233
          "include": "#operators"
1234
        },
1235
        {
1236
          "include": "#vararg_ellipses"
1237
        },
1238
        {
1239
          "begin": "(?!(?:while|for|do|if|else|switch|catch|enumerate|return|typeid|alignof|alignas|sizeof|[cr]?iterate|and|and_eq|bitand|bitor|compl|not|not_eq|or|or_eq|typeid|xor|xor_eq|alignof|alignas)\\s*\\()((?:[A-Z_a-z][0-9A-Z_a-z]*+|::)++|(?<=operator)(?:[-!\\&*+<=>]+|\\(\\)|\\[]))\\s*(\\()",
1240
          "beginCaptures": {
1241
            "1": {
1242
              "name": "entity.name.function.c"
1243
            },
1244
            "2": {
1245
              "name": "punctuation.section.parameters.begin.bracket.round.c"
1246
            }
1247
          },
1248
          "end": "\\)",
1249
          "endCaptures": {
1250
            "0": {
1251
              "name": "punctuation.section.parameters.end.bracket.round.c"
1252
            }
1253
          },
1254
          "name": "meta.function.definition.parameters.c",
1255
          "patterns": [
1256
            {
1257
              "include": "#probably_a_parameter"
1258
            },
1259
            {
1260
              "include": "#function-innards"
1261
            }
1262
          ]
1263
        },
1264
        {
1265
          "begin": "\\(",
1266
          "beginCaptures": {
1267
            "0": {
1268
              "name": "punctuation.section.parens.begin.bracket.round.c"
1269
            }
1270
          },
1271
          "end": "\\)",
1272
          "endCaptures": {
1273
            "0": {
1274
              "name": "punctuation.section.parens.end.bracket.round.c"
1275
            }
1276
          },
1277
          "patterns": [
1278
            {
1279
              "include": "#function-innards"
1280
            }
1281
          ]
1282
        },
1283
        {
1284
          "include": "$self"
1285
        }
1286
      ]
1287
    },
1288
    "inline_comment": {
1289
      "patterns": [
1290
        {
1291
          "patterns": [
1292
            {
1293
              "captures": {
1294
                "1": {
1295
                  "name": "comment.block.c punctuation.definition.comment.begin.c"
1296
                },
1297
                "2": {
1298
                  "name": "comment.block.c"
1299
                },
1300
                "3": {
1301
                  "patterns": [
1302
                    {
1303
                      "match": "\\*/",
1304
                      "name": "comment.block.c punctuation.definition.comment.end.c"
1305
                    },
1306
                    {
1307
                      "match": "\\*",
1308
                      "name": "comment.block.c"
1309
                    }
1310
                  ]
1311
                }
1312
              },
1313
              "match": "(/\\*)((?>(?:[^*]|(?>\\*+)[^/])*)((?>\\*+)/))"
1314
            },
1315
            {
1316
              "captures": {
1317
                "1": {
1318
                  "name": "comment.block.c punctuation.definition.comment.begin.c"
1319
                },
1320
                "2": {
1321
                  "name": "comment.block.c"
1322
                },
1323
                "3": {
1324
                  "patterns": [
1325
                    {
1326
                      "match": "\\*/",
1327
                      "name": "comment.block.c punctuation.definition.comment.end.c"
1328
                    },
1329
                    {
1330
                      "match": "\\*",
1331
                      "name": "comment.block.c"
1332
                    }
1333
                  ]
1334
                }
1335
              },
1336
              "match": "(/\\*)((?:[^*]|\\*++[^/])*+(\\*++/))"
1337
            }
1338
          ]
1339
        },
1340
        {
1341
          "captures": {
1342
            "1": {
1343
              "name": "comment.block.c punctuation.definition.comment.begin.c"
1344
            },
1345
            "2": {
1346
              "name": "comment.block.c"
1347
            },
1348
            "3": {
1349
              "patterns": [
1350
                {
1351
                  "match": "\\*/",
1352
                  "name": "comment.block.c punctuation.definition.comment.end.c"
1353
                },
1354
                {
1355
                  "match": "\\*",
1356
                  "name": "comment.block.c"
1357
                }
1358
              ]
1359
            }
1360
          },
1361
          "match": "(/\\*)((?:[^*]|\\*++[^/])*+(\\*++/))"
1362
        }
1363
      ]
1364
    },
1365
    "line_comment": {
1366
      "patterns": [
1367
        {
1368
          "begin": "\\s*+(//)",
1369
          "beginCaptures": {
1370
            "1": {
1371
              "name": "punctuation.definition.comment.c"
1372
            }
1373
          },
1374
          "end": "(?<=\\n)(?<!\\\\\\n)",
1375
          "endCaptures": {
1376
          },
1377
          "name": "comment.line.double-slash.c",
1378
          "patterns": [
1379
            {
1380
              "include": "#line_continuation_character"
1381
            }
1382
          ]
1383
        },
1384
        {
1385
          "begin": "\\s*+(//)",
1386
          "beginCaptures": {
1387
            "1": {
1388
              "name": "punctuation.definition.comment.c"
1389
            }
1390
          },
1391
          "end": "(?<=\\n)(?<!\\\\\\n)",
1392
          "endCaptures": {
1393
          },
1394
          "name": "comment.line.double-slash.c",
1395
          "patterns": [
1396
            {
1397
              "include": "#line_continuation_character"
1398
            }
1399
          ]
1400
        }
1401
      ]
1402
    },
1403
    "line_continuation_character": {
1404
      "patterns": [
1405
        {
1406
          "captures": {
1407
            "1": {
1408
              "name": "constant.character.escape.line-continuation.c"
1409
            }
1410
          },
1411
          "match": "(\\\\)\\n"
1412
        }
1413
      ]
1414
    },
1415
    "member_access": {
1416
      "captures": {
1417
        "1": {
1418
          "name": "variable.other.object.access.c"
1419
        },
1420
        "2": {
1421
          "name": "punctuation.separator.dot-access.c"
1422
        },
1423
        "3": {
1424
          "name": "punctuation.separator.pointer-access.c"
1425
        },
1426
        "4": {
1427
          "patterns": [
1428
            {
1429
              "include": "#member_access"
1430
            },
1431
            {
1432
              "include": "#method_access"
1433
            },
1434
            {
1435
              "captures": {
1436
                "1": {
1437
                  "name": "variable.other.object.access.c"
1438
                },
1439
                "2": {
1440
                  "name": "punctuation.separator.dot-access.c"
1441
                },
1442
                "3": {
1443
                  "name": "punctuation.separator.pointer-access.c"
1444
                }
1445
              },
1446
              "match": "((?:[A-Z_a-z]\\w*|(?<=[])]))\\s*)(?:(\\.\\*?)|(->\\*?))"
1447
            }
1448
          ]
1449
        },
1450
        "5": {
1451
          "name": "variable.other.member.c"
1452
        }
1453
      },
1454
      "match": "((?:[A-Z_a-z]\\w*|(?<=[])]))\\s*)(?:(\\.\\*?)|(->\\*?))((?:[A-Z_a-z]\\w*\\s*(?:\\.\\*?|->\\*?)\\s*)*)\\s*\\b((?!(?:atomic_uint_least64_t|atomic_uint_least16_t|atomic_uint_least32_t|atomic_uint_least8_t|atomic_int_least16_t|atomic_uint_fast64_t|atomic_uint_fast32_t|atomic_int_least64_t|atomic_int_least32_t|pthread_rwlockattr_t|atomic_uint_fast16_t|pthread_mutexattr_t|atomic_int_fast16_t|atomic_uint_fast8_t|atomic_int_fast64_t|atomic_int_least8_t|atomic_int_fast32_t|atomic_int_fast8_t|pthread_condattr_t|atomic_uintptr_t|atomic_ptrdiff_t|pthread_rwlock_t|atomic_uintmax_t|pthread_mutex_t|atomic_intmax_t|atomic_intptr_t|atomic_char32_t|atomic_char16_t|pthread_attr_t|atomic_wchar_t|uint_least64_t|uint_least32_t|uint_least16_t|pthread_cond_t|pthread_once_t|uint_fast64_t|uint_fast16_t|atomic_size_t|uint_least8_t|int_least64_t|int_least32_t|int_least16_t|pthread_key_t|atomic_ullong|atomic_ushort|uint_fast32_t|atomic_schar|atomic_short|uint_fast8_t|int_fast64_t|int_fast32_t|int_fast16_t|atomic_ulong|atomic_llong|int_least8_t|atomic_uchar|memory_order|suseconds_t|int_fast8_t|atomic_bool|atomic_char|atomic_uint|atomic_long|atomic_int|useconds_t|_Imaginary|blksize_t|pthread_t|in_addr_t|uintptr_t|in_port_t|uintmax_t|blkcnt_t|uint16_t|unsigned|_Complex|uint32_t|intptr_t|intmax_t|uint64_t|u_quad_t|int64_t|int32_t|ssize_t|caddr_t|clock_t|uint8_t|u_short|swblk_t|segsz_t|int16_t|fixpt_t|daddr_t|nlink_t|qaddr_t|size_t|time_t|mode_t|signed|quad_t|ushort|u_long|u_char|double|int8_t|ino_t|uid_t|pid_t|_Bool|float|dev_t|div_t|short|gid_t|off_t|u_int|key_t|id_t|uint|long|void|char|bool|id_t|int)\\b)[A-Z_a-z]\\w*\\b(?!\\())"
1455
    },
1456
    "method_access": {
1457
      "begin": "((?:[A-Z_a-z]\\w*|(?<=[])]))\\s*)(?:(\\.\\*?)|(->\\*?))((?:[A-Z_a-z]\\w*\\s*(?:\\.\\*?|->\\*?)\\s*)*)\\s*([A-Z_a-z]\\w*)(\\()",
1458
      "beginCaptures": {
1459
        "1": {
1460
          "name": "variable.other.object.access.c"
1461
        },
1462
        "2": {
1463
          "name": "punctuation.separator.dot-access.c"
1464
        },
1465
        "3": {
1466
          "name": "punctuation.separator.pointer-access.c"
1467
        },
1468
        "4": {
1469
          "patterns": [
1470
            {
1471
              "include": "#member_access"
1472
            },
1473
            {
1474
              "include": "#method_access"
1475
            },
1476
            {
1477
              "captures": {
1478
                "1": {
1479
                  "name": "variable.other.object.access.c"
1480
                },
1481
                "2": {
1482
                  "name": "punctuation.separator.dot-access.c"
1483
                },
1484
                "3": {
1485
                  "name": "punctuation.separator.pointer-access.c"
1486
                }
1487
              },
1488
              "match": "((?:[A-Z_a-z]\\w*|(?<=[])]))\\s*)(?:(\\.\\*?)|(->\\*?))"
1489
            }
1490
          ]
1491
        },
1492
        "5": {
1493
          "name": "entity.name.function.member.c"
1494
        },
1495
        "6": {
1496
          "name": "punctuation.section.arguments.begin.bracket.round.function.member.c"
1497
        }
1498
      },
1499
      "contentName": "meta.function-call.member.c",
1500
      "end": "(\\))",
1501
      "endCaptures": {
1502
        "1": {
1503
          "name": "punctuation.section.arguments.end.bracket.round.function.member.c"
1504
        }
1505
      },
1506
      "patterns": [
1507
        {
1508
          "include": "#function-call-innards"
1509
        }
1510
      ]
1511
    },
1512
    "numbers": {
1513
      "captures": {
1514
        "0": {
1515
          "patterns": [
1516
            {
1517
              "begin": "(?=.)",
1518
              "end": "$",
1519
              "patterns": [
1520
                {
1521
                  "captures": {
1522
                    "1": {
1523
                      "name": "keyword.other.unit.hexadecimal.c"
1524
                    },
1525
                    "10": {
1526
                      "name": "keyword.operator.minus.exponent.hexadecimal.c"
1527
                    },
1528
                    "11": {
1529
                      "name": "constant.numeric.exponent.hexadecimal.c",
1530
                      "patterns": [
1531
                        {
1532
                          "match": "(?<=\\h)'(?=\\h)",
1533
                          "name": "punctuation.separator.constant.numeric"
1534
                        }
1535
                      ]
1536
                    },
1537
                    "12": {
1538
                      "name": "keyword.other.unit.suffix.floating-point.c"
1539
                    },
1540
                    "2": {
1541
                      "name": "constant.numeric.hexadecimal.c",
1542
                      "patterns": [
1543
                        {
1544
                          "match": "(?<=\\h)'(?=\\h)",
1545
                          "name": "punctuation.separator.constant.numeric"
1546
                        }
1547
                      ]
1548
                    },
1549
                    "3": {
1550
                      "name": "punctuation.separator.constant.numeric"
1551
                    },
1552
                    "4": {
1553
                      "name": "constant.numeric.hexadecimal.c"
1554
                    },
1555
                    "5": {
1556
                      "name": "constant.numeric.hexadecimal.c",
1557
                      "patterns": [
1558
                        {
1559
                          "match": "(?<=\\h)'(?=\\h)",
1560
                          "name": "punctuation.separator.constant.numeric"
1561
                        }
1562
                      ]
1563
                    },
1564
                    "6": {
1565
                      "name": "punctuation.separator.constant.numeric"
1566
                    },
1567
                    "8": {
1568
                      "name": "keyword.other.unit.exponent.hexadecimal.c"
1569
                    },
1570
                    "9": {
1571
                      "name": "keyword.operator.plus.exponent.hexadecimal.c"
1572
                    }
1573
                  },
1574
                  "match": "\\G(0[Xx])(\\h(?:\\h|((?<=\\h)'(?=\\h)))*)?((?<=\\h)\\.|\\.(?=\\h))(\\h(?:\\h|((?<=\\h)'(?=\\h)))*)?((?<!')([Pp])(\\+?)(-?)([0-9](?:[0-9]|(?<=\\h)'(?=\\h))*))?([FLfl](?!\\w))?$"
1575
                },
1576
                {
1577
                  "captures": {
1578
                    "10": {
1579
                      "name": "keyword.operator.minus.exponent.decimal.c"
1580
                    },
1581
                    "11": {
1582
                      "name": "constant.numeric.exponent.decimal.c",
1583
                      "patterns": [
1584
                        {
1585
                          "match": "(?<=\\h)'(?=\\h)",
1586
                          "name": "punctuation.separator.constant.numeric"
1587
                        }
1588
                      ]
1589
                    },
1590
                    "12": {
1591
                      "name": "keyword.other.unit.suffix.floating-point.c"
1592
                    },
1593
                    "2": {
1594
                      "name": "constant.numeric.decimal.c",
1595
                      "patterns": [
1596
                        {
1597
                          "match": "(?<=\\h)'(?=\\h)",
1598
                          "name": "punctuation.separator.constant.numeric"
1599
                        }
1600
                      ]
1601
                    },
1602
                    "3": {
1603
                      "name": "punctuation.separator.constant.numeric"
1604
                    },
1605
                    "4": {
1606
                      "name": "constant.numeric.decimal.point.c"
1607
                    },
1608
                    "5": {
1609
                      "name": "constant.numeric.decimal.c",
1610
                      "patterns": [
1611
                        {
1612
                          "match": "(?<=\\h)'(?=\\h)",
1613
                          "name": "punctuation.separator.constant.numeric"
1614
                        }
1615
                      ]
1616
                    },
1617
                    "6": {
1618
                      "name": "punctuation.separator.constant.numeric"
1619
                    },
1620
                    "8": {
1621
                      "name": "keyword.other.unit.exponent.decimal.c"
1622
                    },
1623
                    "9": {
1624
                      "name": "keyword.operator.plus.exponent.decimal.c"
1625
                    }
1626
                  },
1627
                  "match": "\\G((?=[.0-9])(?!0[BXbx]))([0-9](?:[0-9]|((?<=\\h)'(?=\\h)))*)?((?<=[0-9])\\.|\\.(?=[0-9]))([0-9](?:[0-9]|((?<=\\h)'(?=\\h)))*)?((?<!')([Ee])(\\+?)(-?)([0-9](?:[0-9]|(?<=\\h)'(?=\\h))*))?([FLfl](?!\\w))?$"
1628
                },
1629
                {
1630
                  "captures": {
1631
                    "1": {
1632
                      "name": "keyword.other.unit.binary.c"
1633
                    },
1634
                    "2": {
1635
                      "name": "constant.numeric.binary.c",
1636
                      "patterns": [
1637
                        {
1638
                          "match": "(?<=\\h)'(?=\\h)",
1639
                          "name": "punctuation.separator.constant.numeric"
1640
                        }
1641
                      ]
1642
                    },
1643
                    "3": {
1644
                      "name": "punctuation.separator.constant.numeric"
1645
                    },
1646
                    "4": {
1647
                      "name": "keyword.other.unit.suffix.integer.c"
1648
                    }
1649
                  },
1650
                  "match": "\\G(0[Bb])([01](?:[01]|((?<=\\h)'(?=\\h)))*)((?:(?:(?:(?:(?:[Uu]|[Uu]ll?)|[Uu]LL?)|ll?[Uu]?)|LL?[Uu]?)|[Ff])(?!\\w))?$"
1651
                },
1652
                {
1653
                  "captures": {
1654
                    "1": {
1655
                      "name": "keyword.other.unit.octal.c"
1656
                    },
1657
                    "2": {
1658
                      "name": "constant.numeric.octal.c",
1659
                      "patterns": [
1660
                        {
1661
                          "match": "(?<=\\h)'(?=\\h)",
1662
                          "name": "punctuation.separator.constant.numeric"
1663
                        }
1664
                      ]
1665
                    },
1666
                    "3": {
1667
                      "name": "punctuation.separator.constant.numeric"
1668
                    },
1669
                    "4": {
1670
                      "name": "keyword.other.unit.suffix.integer.c"
1671
                    }
1672
                  },
1673
                  "match": "\\G(0)((?:[0-7]|((?<=\\h)'(?=\\h)))+)((?:(?:(?:(?:(?:[Uu]|[Uu]ll?)|[Uu]LL?)|ll?[Uu]?)|LL?[Uu]?)|[Ff])(?!\\w))?$"
1674
                },
1675
                {
1676
                  "captures": {
1677
                    "1": {
1678
                      "name": "keyword.other.unit.hexadecimal.c"
1679
                    },
1680
                    "2": {
1681
                      "name": "constant.numeric.hexadecimal.c",
1682
                      "patterns": [
1683
                        {
1684
                          "match": "(?<=\\h)'(?=\\h)",
1685
                          "name": "punctuation.separator.constant.numeric"
1686
                        }
1687
                      ]
1688
                    },
1689
                    "3": {
1690
                      "name": "punctuation.separator.constant.numeric"
1691
                    },
1692
                    "5": {
1693
                      "name": "keyword.other.unit.exponent.hexadecimal.c"
1694
                    },
1695
                    "6": {
1696
                      "name": "keyword.operator.plus.exponent.hexadecimal.c"
1697
                    },
1698
                    "7": {
1699
                      "name": "keyword.operator.minus.exponent.hexadecimal.c"
1700
                    },
1701
                    "8": {
1702
                      "name": "constant.numeric.exponent.hexadecimal.c",
1703
                      "patterns": [
1704
                        {
1705
                          "match": "(?<=\\h)'(?=\\h)",
1706
                          "name": "punctuation.separator.constant.numeric"
1707
                        }
1708
                      ]
1709
                    },
1710
                    "9": {
1711
                      "name": "keyword.other.unit.suffix.integer.c"
1712
                    }
1713
                  },
1714
                  "match": "\\G(0[Xx])(\\h(?:\\h|((?<=\\h)'(?=\\h)))*)((?<!')([Pp])(\\+?)(-?)([0-9](?:[0-9]|(?<=\\h)'(?=\\h))*))?((?:(?:(?:(?:(?:[Uu]|[Uu]ll?)|[Uu]LL?)|ll?[Uu]?)|LL?[Uu]?)|[Ff])(?!\\w))?$"
1715
                },
1716
                {
1717
                  "captures": {
1718
                    "2": {
1719
                      "name": "constant.numeric.decimal.c",
1720
                      "patterns": [
1721
                        {
1722
                          "match": "(?<=\\h)'(?=\\h)",
1723
                          "name": "punctuation.separator.constant.numeric"
1724
                        }
1725
                      ]
1726
                    },
1727
                    "3": {
1728
                      "name": "punctuation.separator.constant.numeric"
1729
                    },
1730
                    "5": {
1731
                      "name": "keyword.other.unit.exponent.decimal.c"
1732
                    },
1733
                    "6": {
1734
                      "name": "keyword.operator.plus.exponent.decimal.c"
1735
                    },
1736
                    "7": {
1737
                      "name": "keyword.operator.minus.exponent.decimal.c"
1738
                    },
1739
                    "8": {
1740
                      "name": "constant.numeric.exponent.decimal.c",
1741
                      "patterns": [
1742
                        {
1743
                          "match": "(?<=\\h)'(?=\\h)",
1744
                          "name": "punctuation.separator.constant.numeric"
1745
                        }
1746
                      ]
1747
                    },
1748
                    "9": {
1749
                      "name": "keyword.other.unit.suffix.integer.c"
1750
                    }
1751
                  },
1752
                  "match": "\\G((?=[.0-9])(?!0[BXbx]))([0-9](?:[0-9]|((?<=\\h)'(?=\\h)))*)((?<!')([Ee])(\\+?)(-?)([0-9](?:[0-9]|(?<=\\h)'(?=\\h))*))?((?:(?:(?:(?:(?:[Uu]|[Uu]ll?)|[Uu]LL?)|ll?[Uu]?)|LL?[Uu]?)|[Ff])(?!\\w))?$"
1753
                },
1754
                {
1755
                  "match": "(?:['.0-9A-Z_a-z]|(?<=[EPep])[-+])+",
1756
                  "name": "invalid.illegal.constant.numeric"
1757
                }
1758
              ]
1759
            }
1760
          ]
1761
        }
1762
      },
1763
      "match": "(?<!\\w)\\.?\\d(?:['.0-9A-Z_a-z]|(?<=[EPep])[-+])*"
1764
    },
1765
    "operators": {
1766
      "patterns": [
1767
        {
1768
          "match": "(?<![$\\w])(sizeof)(?![$\\w])",
1769
          "name": "keyword.operator.sizeof.c"
1770
        },
1771
        {
1772
          "match": "--",
1773
          "name": "keyword.operator.decrement.c"
1774
        },
1775
        {
1776
          "match": "\\+\\+",
1777
          "name": "keyword.operator.increment.c"
1778
        },
1779
        {
1780
          "match": "(?:[-%*+]|(?<!\\()/)=",
1781
          "name": "keyword.operator.assignment.compound.c"
1782
        },
1783
        {
1784
          "match": "(?:[\\&^]|<<|>>|\\|)=",
1785
          "name": "keyword.operator.assignment.compound.bitwise.c"
1786
        },
1787
        {
1788
          "match": "<<|>>",
1789
          "name": "keyword.operator.bitwise.shift.c"
1790
        },
1791
        {
1792
          "match": "!=|<=|>=|==|[<>]",
1793
          "name": "keyword.operator.comparison.c"
1794
        },
1795
        {
1796
          "match": "&&|!|\\|\\|",
1797
          "name": "keyword.operator.logical.c"
1798
        },
1799
        {
1800
          "match": "[\\&^|~]",
1801
          "name": "keyword.operator.c"
1802
        },
1803
        {
1804
          "match": "=",
1805
          "name": "keyword.operator.assignment.c"
1806
        },
1807
        {
1808
          "match": "[-%*+/]",
1809
          "name": "keyword.operator.c"
1810
        },
1811
        {
1812
          "begin": "(\\?)",
1813
          "beginCaptures": {
1814
            "1": {
1815
              "name": "keyword.operator.ternary.c"
1816
            }
1817
          },
1818
          "end": "(:)",
1819
          "endCaptures": {
1820
            "1": {
1821
              "name": "keyword.operator.ternary.c"
1822
            }
1823
          },
1824
          "patterns": [
1825
            {
1826
              "include": "#function-call-innards"
1827
            },
1828
            {
1829
              "include": "$self"
1830
            }
1831
          ]
1832
        }
1833
      ]
1834
    },
1835
    "parens": {
1836
      "begin": "\\(",
1837
      "beginCaptures": {
1838
        "0": {
1839
          "name": "punctuation.section.parens.begin.bracket.round.c"
1840
        }
1841
      },
1842
      "end": "\\)",
1843
      "endCaptures": {
1844
        "0": {
1845
          "name": "punctuation.section.parens.end.bracket.round.c"
1846
        }
1847
      },
1848
      "name": "meta.parens.c",
1849
      "patterns": [
1850
        {
1851
          "include": "$self"
1852
        }
1853
      ]
1854
    },
1855
    "parens-block": {
1856
      "begin": "\\(",
1857
      "beginCaptures": {
1858
        "0": {
1859
          "name": "punctuation.section.parens.begin.bracket.round.c"
1860
        }
1861
      },
1862
      "end": "\\)",
1863
      "endCaptures": {
1864
        "0": {
1865
          "name": "punctuation.section.parens.end.bracket.round.c"
1866
        }
1867
      },
1868
      "name": "meta.parens.block.c",
1869
      "patterns": [
1870
        {
1871
          "include": "#block_innards"
1872
        },
1873
        {
1874
          "match": "(?-im:(?<!:):(?!:))",
1875
          "name": "punctuation.range-based.c"
1876
        }
1877
      ]
1878
    },
1879
    "pragma-mark": {
1880
      "captures": {
1881
        "1": {
1882
          "name": "meta.preprocessor.pragma.c"
1883
        },
1884
        "2": {
1885
          "name": "keyword.control.directive.pragma.pragma-mark.c"
1886
        },
1887
        "3": {
1888
          "name": "punctuation.definition.directive.c"
1889
        },
1890
        "4": {
1891
          "name": "entity.name.tag.pragma-mark.c"
1892
        }
1893
      },
1894
      "match": "^\\s*(((#)\\s*pragma\\s+mark)\\s+(.*))",
1895
      "name": "meta.section.c"
1896
    },
1897
    "predefined_macros": {
1898
      "patterns": [
1899
        {
1900
          "captures": {
1901
            "1": {
1902
              "name": "entity.name.other.preprocessor.macro.predefined.$1.c"
1903
            }
1904
          },
1905
          "match": "\\b(__cplusplus|__DATE__|__FILE__|__LINE__|__STDC__|__STDC_HOSTED__|__STDC_NO_COMPLEX__|__STDC_VERSION__|__STDCPP_THREADS__|__TIME__|NDEBUG|__OBJC__|__ASSEMBLER__|__ATOM__|__AVX__|__AVX2__|_CHAR_UNSIGNED|__CLR_VER|_CONTROL_FLOW_GUARD|__COUNTER__|__cplusplus_cli|__cplusplus_winrt|_CPPRTTI|_CPPUNWIND|_DEBUG|_DLL|__FUNCDNAME__|__FUNCSIG__|__FUNCTION__|_INTEGRAL_MAX_BITS|__INTELLISENSE__|_ISO_VOLATILE|_KERNEL_MODE|_M_AMD64|_M_ARM|_M_ARM_ARMV7VE|_M_ARM_FP|_M_ARM64|_M_CEE|_M_CEE_PURE|_M_CEE_SAFE|_M_FP_EXCEPT|_M_FP_FAST|_M_FP_PRECISE|_M_FP_STRICT|_M_IX86|_M_IX86_FP|_M_X64|_MANAGED|_MSC_BUILD|_MSC_EXTENSIONS|_MSC_FULL_VER|_MSC_VER|_MSVC_LANG|__MSVC_RUNTIME_CHECKS|_MT|_NATIVE_WCHAR_T_DEFINED|_OPENMP|_PREFAST|__TIMESTAMP__|_VC_NO_DEFAULTLIB|_WCHAR_T_DEFINED|_WIN32|_WIN64|_WINRT_DLL|_ATL_VER|_MFC_VER|__GFORTRAN__|__GNUC__|__GNUC_MINOR__|__GNUC_PATCHLEVEL__|__GNUG__|__STRICT_ANSI__|__BASE_FILE__|__INCLUDE_LEVEL__|__ELF__|__VERSION__|__OPTIMIZE__|__OPTIMIZE_SIZE__|__NO_INLINE__|__GNUC_STDC_INLINE__|__CHAR_UNSIGNED__|__WCHAR_UNSIGNED__|__REGISTER_PREFIX__|__SIZE_TYPE__|__PTRDIFF_TYPE__|__WCHAR_TYPE__|__WINT_TYPE__|__INTMAX_TYPE__|__UINTMAX_TYPE__|__SIG_ATOMIC_TYPE__|__INT8_TYPE__|__INT16_TYPE__|__INT32_TYPE__|__INT64_TYPE__|__UINT8_TYPE__|__UINT16_TYPE__|__UINT32_TYPE__|__UINT64_TYPE__|__INT_LEAST8_TYPE__|__INT_LEAST16_TYPE__|__INT_LEAST32_TYPE__|__INT_LEAST64_TYPE__|__UINT_LEAST8_TYPE__|__UINT_LEAST16_TYPE__|__UINT_LEAST32_TYPE__|__UINT_LEAST64_TYPE__|__INT_FAST8_TYPE__|__INT_FAST16_TYPE__|__INT_FAST32_TYPE__|__INT_FAST64_TYPE__|__UINT_FAST8_TYPE__|__UINT_FAST16_TYPE__|__UINT_FAST32_TYPE__|__UINT_FAST64_TYPE__|__INTPTR_TYPE__|__UINTPTR_TYPE__|__CHAR_BIT__|__SCHAR_MAX__|__WCHAR_MAX__|__SHRT_MAX__|__INT_MAX__|__LONG_MAX__|__LONG_LONG_MAX__|__WINT_MAX__|__SIZE_MAX__|__PTRDIFF_MAX__|__INTMAX_MAX__|__UINTMAX_MAX__|__SIG_ATOMIC_MAX__|__INT8_MAX__|__INT16_MAX__|__INT32_MAX__|__INT64_MAX__|__UINT8_MAX__|__UINT16_MAX__|__UINT32_MAX__|__UINT64_MAX__|__INT_LEAST8_MAX__|__INT_LEAST16_MAX__|__INT_LEAST32_MAX__|__INT_LEAST64_MAX__|__UINT_LEAST8_MAX__|__UINT_LEAST16_MAX__|__UINT_LEAST32_MAX__|__UINT_LEAST64_MAX__|__INT_FAST8_MAX__|__INT_FAST16_MAX__|__INT_FAST32_MAX__|__INT_FAST64_MAX__|__UINT_FAST8_MAX__|__UINT_FAST16_MAX__|__UINT_FAST32_MAX__|__UINT_FAST64_MAX__|__INTPTR_MAX__|__UINTPTR_MAX__|__WCHAR_MIN__|__WINT_MIN__|__SIG_ATOMIC_MIN__|__SCHAR_WIDTH__|__SHRT_WIDTH__|__INT_WIDTH__|__LONG_WIDTH__|__LONG_LONG_WIDTH__|__PTRDIFF_WIDTH__|__SIG_ATOMIC_WIDTH__|__SIZE_WIDTH__|__WCHAR_WIDTH__|__WINT_WIDTH__|__INT_LEAST8_WIDTH__|__INT_LEAST16_WIDTH__|__INT_LEAST32_WIDTH__|__INT_LEAST64_WIDTH__|__INT_FAST8_WIDTH__|__INT_FAST16_WIDTH__|__INT_FAST32_WIDTH__|__INT_FAST64_WIDTH__|__INTPTR_WIDTH__|__INTMAX_WIDTH__|__SIZEOF_INT__|__SIZEOF_LONG__|__SIZEOF_LONG_LONG__|__SIZEOF_SHORT__|__SIZEOF_POINTER__|__SIZEOF_FLOAT__|__SIZEOF_DOUBLE__|__SIZEOF_LONG_DOUBLE__|__SIZEOF_SIZE_T__|__SIZEOF_WCHAR_T__|__SIZEOF_WINT_T__|__SIZEOF_PTRDIFF_T__|__BYTE_ORDER__|__ORDER_LITTLE_ENDIAN__|__ORDER_BIG_ENDIAN__|__ORDER_PDP_ENDIAN__|__FLOAT_WORD_ORDER__|__DEPRECATED|__EXCEPTIONS|__GXX_RTTI|__USING_SJLJ_EXCEPTIONS__|__GXX_EXPERIMENTAL_CXX0X__|__GXX_WEAK__|__NEXT_RUNTIME__|__LP64__|_LP64|__SSP__|__SSP_ALL__|__SSP_STRONG__|__SSP_EXPLICIT__|__SANITIZE_ADDRESS__|__SANITIZE_THREAD__|__GCC_HAVE_SYNC_COMPARE_AND_SWAP_1|__GCC_HAVE_SYNC_COMPARE_AND_SWAP_2|__GCC_HAVE_SYNC_COMPARE_AND_SWAP_4|__GCC_HAVE_SYNC_COMPARE_AND_SWAP_8|__GCC_HAVE_SYNC_COMPARE_AND_SWAP_16|__HAVE_SPECULATION_SAFE_VALUE|__GCC_HAVE_DWARF2_CFI_ASM|__FP_FAST_FMAF??|__FP_FAST_FMAL|__FP_FAST_FMAF16|__FP_FAST_FMAF32|__FP_FAST_FMAF64|__FP_FAST_FMAF128|__FP_FAST_FMAF32X|__FP_FAST_FMAF64X|__FP_FAST_FMAF128X|__GCC_IEC_559|__GCC_IEC_559_COMPLEX|__NO_MATH_ERRNO__|__has_builtin|__has_feature|__has_extension|__has_cpp_attribute|__has_c_attribute|__has_attribute|__has_declspec_attribute|__is_identifier|__has_include|__has_include_next|__has_warning|__BASE_FILE__|__FILE_NAME__|__clang__|__clang_major__|__clang_minor__|__clang_patchlevel__|__clang_version__|__fp16|_Float16)\\b"
1906
        },
1907
        {
1908
          "match": "\\b__([A-Z_]+)__\\b",
1909
          "name": "entity.name.other.preprocessor.macro.predefined.probably.$1.c"
1910
        }
1911
      ]
1912
    },
1913
    "preprocessor-rule-conditional": {
1914
      "patterns": [
1915
        {
1916
          "begin": "^\\s*((#)\\s*if(?:n?def)?)\\b",
1917
          "beginCaptures": {
1918
            "0": {
1919
              "name": "meta.preprocessor.c"
1920
            },
1921
            "1": {
1922
              "name": "keyword.control.directive.conditional.c"
1923
            },
1924
            "2": {
1925
              "name": "punctuation.definition.directive.c"
1926
            }
1927
          },
1928
          "end": "^\\s*((#)\\s*endif)\\b",
1929
          "endCaptures": {
1930
            "0": {
1931
              "name": "meta.preprocessor.c"
1932
            },
1933
            "1": {
1934
              "name": "keyword.control.directive.conditional.c"
1935
            },
1936
            "2": {
1937
              "name": "punctuation.definition.directive.c"
1938
            }
1939
          },
1940
          "patterns": [
1941
            {
1942
              "begin": "\\G(?=.)(?!/(?:/|\\*(?!.*\\\\\\s*\\n)))",
1943
              "end": "(?=//)|(?=/\\*(?!.*\\\\\\s*\\n))|(?<!\\\\)(?=\\n)",
1944
              "name": "meta.preprocessor.c",
1945
              "patterns": [
1946
                {
1947
                  "include": "#preprocessor-rule-conditional-line"
1948
                }
1949
              ]
1950
            },
1951
            {
1952
              "include": "#preprocessor-rule-enabled-elif"
1953
            },
1954
            {
1955
              "include": "#preprocessor-rule-enabled-else"
1956
            },
1957
            {
1958
              "include": "#preprocessor-rule-disabled-elif"
1959
            },
1960
            {
1961
              "begin": "^\\s*((#)\\s*elif)\\b",
1962
              "beginCaptures": {
1963
                "1": {
1964
                  "name": "keyword.control.directive.conditional.c"
1965
                },
1966
                "2": {
1967
                  "name": "punctuation.definition.directive.c"
1968
                }
1969
              },
1970
              "end": "(?=//)|(?=/\\*(?!.*\\\\\\s*\\n))|(?<!\\\\)(?=\\n)",
1971
              "name": "meta.preprocessor.c",
1972
              "patterns": [
1973
                {
1974
                  "include": "#preprocessor-rule-conditional-line"
1975
                }
1976
              ]
1977
            },
1978
            {
1979
              "include": "$self"
1980
            }
1981
          ]
1982
        },
1983
        {
1984
          "captures": {
1985
            "0": {
1986
              "name": "invalid.illegal.stray-$1.c"
1987
            }
1988
          },
1989
          "match": "^\\s*#\\s*(e(?:lse|lif|ndif))\\b"
1990
        }
1991
      ]
1992
    },
1993
    "preprocessor-rule-conditional-block": {
1994
      "patterns": [
1995
        {
1996
          "begin": "^\\s*((#)\\s*if(?:n?def)?)\\b",
1997
          "beginCaptures": {
1998
            "0": {
1999
              "name": "meta.preprocessor.c"
2000
            },
2001
            "1": {
2002
              "name": "keyword.control.directive.conditional.c"
2003
            },
2004
            "2": {
2005
              "name": "punctuation.definition.directive.c"
2006
            }
2007
          },
2008
          "end": "^\\s*((#)\\s*endif)\\b",
2009
          "endCaptures": {
2010
            "0": {
2011
              "name": "meta.preprocessor.c"
2012
            },
2013
            "1": {
2014
              "name": "keyword.control.directive.conditional.c"
2015
            },
2016
            "2": {
2017
              "name": "punctuation.definition.directive.c"
2018
            }
2019
          },
2020
          "patterns": [
2021
            {
2022
              "begin": "\\G(?=.)(?!/(?:/|\\*(?!.*\\\\\\s*\\n)))",
2023
              "end": "(?=//)|(?=/\\*(?!.*\\\\\\s*\\n))|(?<!\\\\)(?=\\n)",
2024
              "name": "meta.preprocessor.c",
2025
              "patterns": [
2026
                {
2027
                  "include": "#preprocessor-rule-conditional-line"
2028
                }
2029
              ]
2030
            },
2031
            {
2032
              "include": "#preprocessor-rule-enabled-elif-block"
2033
            },
2034
            {
2035
              "include": "#preprocessor-rule-enabled-else-block"
2036
            },
2037
            {
2038
              "include": "#preprocessor-rule-disabled-elif"
2039
            },
2040
            {
2041
              "begin": "^\\s*((#)\\s*elif)\\b",
2042
              "beginCaptures": {
2043
                "1": {
2044
                  "name": "keyword.control.directive.conditional.c"
2045
                },
2046
                "2": {
2047
                  "name": "punctuation.definition.directive.c"
2048
                }
2049
              },
2050
              "end": "(?=//)|(?=/\\*(?!.*\\\\\\s*\\n))|(?<!\\\\)(?=\\n)",
2051
              "name": "meta.preprocessor.c",
2052
              "patterns": [
2053
                {
2054
                  "include": "#preprocessor-rule-conditional-line"
2055
                }
2056
              ]
2057
            },
2058
            {
2059
              "include": "#block_innards"
2060
            }
2061
          ]
2062
        },
2063
        {
2064
          "captures": {
2065
            "0": {
2066
              "name": "invalid.illegal.stray-$1.c"
2067
            }
2068
          },
2069
          "match": "^\\s*#\\s*(e(?:lse|lif|ndif))\\b"
2070
        }
2071
      ]
2072
    },
2073
    "preprocessor-rule-conditional-line": {
2074
      "patterns": [
2075
        {
2076
          "match": "\\bdefined\\b(?:\\s*$|(?=\\s*\\(*\\s*(?!defined\\b)[$A-Z_a-z][$\\w]*\\b\\s*\\)*\\s*(?:\\n|//|/\\*|[:?]|&&|\\|\\||\\\\\\s*\\n)))",
2077
          "name": "keyword.control.directive.conditional.c"
2078
        },
2079
        {
2080
          "match": "\\bdefined\\b",
2081
          "name": "invalid.illegal.macro-name.c"
2082
        },
2083
        {
2084
          "include": "#comments"
2085
        },
2086
        {
2087
          "include": "#strings"
2088
        },
2089
        {
2090
          "include": "#numbers"
2091
        },
2092
        {
2093
          "begin": "\\?",
2094
          "beginCaptures": {
2095
            "0": {
2096
              "name": "keyword.operator.ternary.c"
2097
            }
2098
          },
2099
          "end": ":",
2100
          "endCaptures": {
2101
            "0": {
2102
              "name": "keyword.operator.ternary.c"
2103
            }
2104
          },
2105
          "patterns": [
2106
            {
2107
              "include": "#preprocessor-rule-conditional-line"
2108
            }
2109
          ]
2110
        },
2111
        {
2112
          "include": "#operators"
2113
        },
2114
        {
2115
          "match": "\\b(NULL|true|false|TRUE|FALSE)\\b",
2116
          "name": "constant.language.c"
2117
        },
2118
        {
2119
          "match": "[$A-Z_a-z][$\\w]*",
2120
          "name": "entity.name.function.preprocessor.c"
2121
        },
2122
        {
2123
          "include": "#line_continuation_character"
2124
        },
2125
        {
2126
          "begin": "\\(",
2127
          "beginCaptures": {
2128
            "0": {
2129
              "name": "punctuation.section.parens.begin.bracket.round.c"
2130
            }
2131
          },
2132
          "end": "\\)|(?=//)|(?=/\\*(?!.*\\\\\\s*\\n))|(?<!\\\\)(?=\\n)",
2133
          "endCaptures": {
2134
            "0": {
2135
              "name": "punctuation.section.parens.end.bracket.round.c"
2136
            }
2137
          },
2138
          "patterns": [
2139
            {
2140
              "include": "#preprocessor-rule-conditional-line"
2141
            }
2142
          ]
2143
        }
2144
      ]
2145
    },
2146
    "preprocessor-rule-define-line-blocks": {
2147
      "patterns": [
2148
        {
2149
          "begin": "\\{",
2150
          "beginCaptures": {
2151
            "0": {
2152
              "name": "punctuation.section.block.begin.bracket.curly.c"
2153
            }
2154
          },
2155
          "end": "}|(?=\\s*#\\s*e(?:lif|lse|ndif)\\b)|(?<!\\\\)(?=\\s*\\n)",
2156
          "endCaptures": {
2157
            "0": {
2158
              "name": "punctuation.section.block.end.bracket.curly.c"
2159
            }
2160
          },
2161
          "patterns": [
2162
            {
2163
              "include": "#preprocessor-rule-define-line-blocks"
2164
            },
2165
            {
2166
              "include": "#preprocessor-rule-define-line-contents"
2167
            }
2168
          ]
2169
        },
2170
        {
2171
          "include": "#preprocessor-rule-define-line-contents"
2172
        }
2173
      ]
2174
    },
2175
    "preprocessor-rule-define-line-contents": {
2176
      "patterns": [
2177
        {
2178
          "include": "#vararg_ellipses"
2179
        },
2180
        {
2181
          "begin": "\\{",
2182
          "beginCaptures": {
2183
            "0": {
2184
              "name": "punctuation.section.block.begin.bracket.curly.c"
2185
            }
2186
          },
2187
          "end": "}|(?=\\s*#\\s*e(?:lif|lse|ndif)\\b)|(?<!\\\\)(?=\\s*\\n)",
2188
          "endCaptures": {
2189
            "0": {
2190
              "name": "punctuation.section.block.end.bracket.curly.c"
2191
            }
2192
          },
2193
          "name": "meta.block.c",
2194
          "patterns": [
2195
            {
2196
              "include": "#preprocessor-rule-define-line-blocks"
2197
            }
2198
          ]
2199
        },
2200
        {
2201
          "match": "\\(",
2202
          "name": "punctuation.section.parens.begin.bracket.round.c"
2203
        },
2204
        {
2205
          "match": "\\)",
2206
          "name": "punctuation.section.parens.end.bracket.round.c"
2207
        },
2208
        {
2209
          "begin": "(?!(?:while|for|do|if|else|switch|catch|enumerate|return|typeid|alignof|alignas|sizeof|[cr]?iterate|and|and_eq|bitand|bitor|compl|not|not_eq|or|or_eq|typeid|xor|xor_eq|alignof|alignas|asm|__asm__|auto|bool|_Bool|char|_Complex|double|enum|float|_Imaginary|int|long|short|signed|struct|typedef|union|unsigned|void)\\s*\\()(?=(?:[A-Z_a-z][0-9A-Z_a-z]*+|::)++\\s*\\(|(?<=operator)(?:[-!\\&*+<=>]+|\\(\\)|\\[])\\s*\\()",
2210
          "end": "(?<=\\))(?!\\w)|(?<!\\\\)(?=\\s*\\n)",
2211
          "name": "meta.function.c",
2212
          "patterns": [
2213
            {
2214
              "include": "#preprocessor-rule-define-line-functions"
2215
            }
2216
          ]
2217
        },
2218
        {
2219
          "begin": "\"",
2220
          "beginCaptures": {
2221
            "0": {
2222
              "name": "punctuation.definition.string.begin.c"
2223
            }
2224
          },
2225
          "end": "\"|(?<!\\\\)(?=\\s*\\n)",
2226
          "endCaptures": {
2227
            "0": {
2228
              "name": "punctuation.definition.string.end.c"
2229
            }
2230
          },
2231
          "name": "string.quoted.double.c",
2232
          "patterns": [
2233
            {
2234
              "include": "#string_escaped_char"
2235
            },
2236
            {
2237
              "include": "#string_placeholder"
2238
            },
2239
            {
2240
              "include": "#line_continuation_character"
2241
            }
2242
          ]
2243
        },
2244
        {
2245
          "begin": "'",
2246
          "beginCaptures": {
2247
            "0": {
2248
              "name": "punctuation.definition.string.begin.c"
2249
            }
2250
          },
2251
          "end": "'|(?<!\\\\)(?=\\s*\\n)",
2252
          "endCaptures": {
2253
            "0": {
2254
              "name": "punctuation.definition.string.end.c"
2255
            }
2256
          },
2257
          "name": "string.quoted.single.c",
2258
          "patterns": [
2259
            {
2260
              "include": "#string_escaped_char"
2261
            },
2262
            {
2263
              "include": "#line_continuation_character"
2264
            }
2265
          ]
2266
        },
2267
        {
2268
          "include": "#method_access"
2269
        },
2270
        {
2271
          "include": "#member_access"
2272
        },
2273
        {
2274
          "include": "$self"
2275
        }
2276
      ]
2277
    },
2278
    "preprocessor-rule-define-line-functions": {
2279
      "patterns": [
2280
        {
2281
          "include": "#comments"
2282
        },
2283
        {
2284
          "include": "#storage_types"
2285
        },
2286
        {
2287
          "include": "#vararg_ellipses"
2288
        },
2289
        {
2290
          "include": "#method_access"
2291
        },
2292
        {
2293
          "include": "#member_access"
2294
        },
2295
        {
2296
          "include": "#operators"
2297
        },
2298
        {
2299
          "begin": "(?!(?:while|for|do|if|else|switch|catch|enumerate|return|typeid|alignof|alignas|sizeof|[cr]?iterate|and|and_eq|bitand|bitor|compl|not|not_eq|or|or_eq|typeid|xor|xor_eq|alignof|alignas)\\s*\\()((?:[A-Z_a-z][0-9A-Z_a-z]*+|::)++|(?<=operator)(?:[-!\\&*+<=>]+|\\(\\)|\\[]))\\s*(\\()",
2300
          "beginCaptures": {
2301
            "1": {
2302
              "name": "entity.name.function.c"
2303
            },
2304
            "2": {
2305
              "name": "punctuation.section.arguments.begin.bracket.round.c"
2306
            }
2307
          },
2308
          "end": "(\\))|(?<!\\\\)(?=\\s*\\n)",
2309
          "endCaptures": {
2310
            "1": {
2311
              "name": "punctuation.section.arguments.end.bracket.round.c"
2312
            }
2313
          },
2314
          "patterns": [
2315
            {
2316
              "include": "#preprocessor-rule-define-line-functions"
2317
            }
2318
          ]
2319
        },
2320
        {
2321
          "begin": "\\(",
2322
          "beginCaptures": {
2323
            "0": {
2324
              "name": "punctuation.section.parens.begin.bracket.round.c"
2325
            }
2326
          },
2327
          "end": "(\\))|(?<!\\\\)(?=\\s*\\n)",
2328
          "endCaptures": {
2329
            "1": {
2330
              "name": "punctuation.section.parens.end.bracket.round.c"
2331
            }
2332
          },
2333
          "patterns": [
2334
            {
2335
              "include": "#preprocessor-rule-define-line-functions"
2336
            }
2337
          ]
2338
        },
2339
        {
2340
          "include": "#preprocessor-rule-define-line-contents"
2341
        }
2342
      ]
2343
    },
2344
    "preprocessor-rule-disabled": {
2345
      "patterns": [
2346
        {
2347
          "begin": "^\\s*((#)\\s*if)\\b(?=\\s*\\(*\\b0+\\b\\)*\\s*(?:$|//|/\\*))",
2348
          "beginCaptures": {
2349
            "0": {
2350
              "name": "meta.preprocessor.c"
2351
            },
2352
            "1": {
2353
              "name": "keyword.control.directive.conditional.c"
2354
            },
2355
            "2": {
2356
              "name": "punctuation.definition.directive.c"
2357
            }
2358
          },
2359
          "end": "^\\s*((#)\\s*endif)\\b",
2360
          "endCaptures": {
2361
            "0": {
2362
              "name": "meta.preprocessor.c"
2363
            },
2364
            "1": {
2365
              "name": "keyword.control.directive.conditional.c"
2366
            },
2367
            "2": {
2368
              "name": "punctuation.definition.directive.c"
2369
            }
2370
          },
2371
          "patterns": [
2372
            {
2373
              "begin": "\\G(?=.)(?!/(?:/|\\*(?!.*\\\\\\s*\\n)))",
2374
              "end": "(?=//)|(?=/\\*(?!.*\\\\\\s*\\n))|(?=\\n)",
2375
              "name": "meta.preprocessor.c",
2376
              "patterns": [
2377
                {
2378
                  "include": "#preprocessor-rule-conditional-line"
2379
                }
2380
              ]
2381
            },
2382
            {
2383
              "include": "#comments"
2384
            },
2385
            {
2386
              "include": "#preprocessor-rule-enabled-elif"
2387
            },
2388
            {
2389
              "include": "#preprocessor-rule-enabled-else"
2390
            },
2391
            {
2392
              "include": "#preprocessor-rule-disabled-elif"
2393
            },
2394
            {
2395
              "begin": "^\\s*((#)\\s*elif)\\b",
2396
              "beginCaptures": {
2397
                "0": {
2398
                  "name": "meta.preprocessor.c"
2399
                },
2400
                "1": {
2401
                  "name": "keyword.control.directive.conditional.c"
2402
                },
2403
                "2": {
2404
                  "name": "punctuation.definition.directive.c"
2405
                }
2406
              },
2407
              "end": "(?=^\\s*((#)\\s*e(?:lif|lse|ndif))\\b)",
2408
              "patterns": [
2409
                {
2410
                  "begin": "\\G(?=.)(?!/(?:/|\\*(?!.*\\\\\\s*\\n)))",
2411
                  "end": "(?=//)|(?=/\\*(?!.*\\\\\\s*\\n))|(?<!\\\\)(?=\\n)",
2412
                  "name": "meta.preprocessor.c",
2413
                  "patterns": [
2414
                    {
2415
                      "include": "#preprocessor-rule-conditional-line"
2416
                    }
2417
                  ]
2418
                },
2419
                {
2420
                  "include": "$self"
2421
                }
2422
              ]
2423
            },
2424
            {
2425
              "begin": "\\n",
2426
              "contentName": "comment.block.preprocessor.if-branch.c",
2427
              "end": "(?=^\\s*((#)\\s*e(?:lse|lif|ndif))\\b)",
2428
              "patterns": [
2429
                {
2430
                  "include": "#disabled"
2431
                },
2432
                {
2433
                  "include": "#pragma-mark"
2434
                }
2435
              ]
2436
            }
2437
          ]
2438
        }
2439
      ]
2440
    },
2441
    "preprocessor-rule-disabled-block": {
2442
      "patterns": [
2443
        {
2444
          "begin": "^\\s*((#)\\s*if)\\b(?=\\s*\\(*\\b0+\\b\\)*\\s*(?:$|//|/\\*))",
2445
          "beginCaptures": {
2446
            "0": {
2447
              "name": "meta.preprocessor.c"
2448
            },
2449
            "1": {
2450
              "name": "keyword.control.directive.conditional.c"
2451
            },
2452
            "2": {
2453
              "name": "punctuation.definition.directive.c"
2454
            }
2455
          },
2456
          "end": "^\\s*((#)\\s*endif)\\b",
2457
          "endCaptures": {
2458
            "0": {
2459
              "name": "meta.preprocessor.c"
2460
            },
2461
            "1": {
2462
              "name": "keyword.control.directive.conditional.c"
2463
            },
2464
            "2": {
2465
              "name": "punctuation.definition.directive.c"
2466
            }
2467
          },
2468
          "patterns": [
2469
            {
2470
              "begin": "\\G(?=.)(?!/(?:/|\\*(?!.*\\\\\\s*\\n)))",
2471
              "end": "(?=//)|(?=/\\*(?!.*\\\\\\s*\\n))|(?=\\n)",
2472
              "name": "meta.preprocessor.c",
2473
              "patterns": [
2474
                {
2475
                  "include": "#preprocessor-rule-conditional-line"
2476
                }
2477
              ]
2478
            },
2479
            {
2480
              "include": "#comments"
2481
            },
2482
            {
2483
              "include": "#preprocessor-rule-enabled-elif-block"
2484
            },
2485
            {
2486
              "include": "#preprocessor-rule-enabled-else-block"
2487
            },
2488
            {
2489
              "include": "#preprocessor-rule-disabled-elif"
2490
            },
2491
            {
2492
              "begin": "^\\s*((#)\\s*elif)\\b",
2493
              "beginCaptures": {
2494
                "0": {
2495
                  "name": "meta.preprocessor.c"
2496
                },
2497
                "1": {
2498
                  "name": "keyword.control.directive.conditional.c"
2499
                },
2500
                "2": {
2501
                  "name": "punctuation.definition.directive.c"
2502
                }
2503
              },
2504
              "end": "(?=^\\s*((#)\\s*e(?:lif|lse|ndif))\\b)",
2505
              "patterns": [
2506
                {
2507
                  "begin": "\\G(?=.)(?!/(?:/|\\*(?!.*\\\\\\s*\\n)))",
2508
                  "end": "(?=//)|(?=/\\*(?!.*\\\\\\s*\\n))|(?<!\\\\)(?=\\n)",
2509
                  "name": "meta.preprocessor.c",
2510
                  "patterns": [
2511
                    {
2512
                      "include": "#preprocessor-rule-conditional-line"
2513
                    }
2514
                  ]
2515
                },
2516
                {
2517
                  "include": "#block_innards"
2518
                }
2519
              ]
2520
            },
2521
            {
2522
              "begin": "\\n",
2523
              "contentName": "comment.block.preprocessor.if-branch.in-block.c",
2524
              "end": "(?=^\\s*((#)\\s*e(?:lse|lif|ndif))\\b)",
2525
              "patterns": [
2526
                {
2527
                  "include": "#disabled"
2528
                },
2529
                {
2530
                  "include": "#pragma-mark"
2531
                }
2532
              ]
2533
            }
2534
          ]
2535
        }
2536
      ]
2537
    },
2538
    "preprocessor-rule-disabled-elif": {
2539
      "begin": "^\\s*((#)\\s*elif)\\b(?=\\s*\\(*\\b0+\\b\\)*\\s*(?:$|//|/\\*))",
2540
      "beginCaptures": {
2541
        "0": {
2542
          "name": "meta.preprocessor.c"
2543
        },
2544
        "1": {
2545
          "name": "keyword.control.directive.conditional.c"
2546
        },
2547
        "2": {
2548
          "name": "punctuation.definition.directive.c"
2549
        }
2550
      },
2551
      "end": "(?=^\\s*((#)\\s*e(?:lif|lse|ndif))\\b)",
2552
      "patterns": [
2553
        {
2554
          "begin": "\\G(?=.)(?!/(?:/|\\*(?!.*\\\\\\s*\\n)))",
2555
          "end": "(?=//)|(?=/\\*(?!.*\\\\\\s*\\n))|(?<!\\\\)(?=\\n)",
2556
          "name": "meta.preprocessor.c",
2557
          "patterns": [
2558
            {
2559
              "include": "#preprocessor-rule-conditional-line"
2560
            }
2561
          ]
2562
        },
2563
        {
2564
          "include": "#comments"
2565
        },
2566
        {
2567
          "begin": "\\n",
2568
          "contentName": "comment.block.preprocessor.elif-branch.c",
2569
          "end": "(?=^\\s*((#)\\s*e(?:lse|lif|ndif))\\b)",
2570
          "patterns": [
2571
            {
2572
              "include": "#disabled"
2573
            },
2574
            {
2575
              "include": "#pragma-mark"
2576
            }
2577
          ]
2578
        }
2579
      ]
2580
    },
2581
    "preprocessor-rule-enabled": {
2582
      "patterns": [
2583
        {
2584
          "begin": "^\\s*((#)\\s*if)\\b(?=\\s*\\(*\\b0*1\\b\\)*\\s*(?:$|//|/\\*))",
2585
          "beginCaptures": {
2586
            "0": {
2587
              "name": "meta.preprocessor.c"
2588
            },
2589
            "1": {
2590
              "name": "keyword.control.directive.conditional.c"
2591
            },
2592
            "2": {
2593
              "name": "punctuation.definition.directive.c"
2594
            },
2595
            "3": {
2596
              "name": "constant.numeric.preprocessor.c"
2597
            }
2598
          },
2599
          "end": "^\\s*((#)\\s*endif)\\b",
2600
          "endCaptures": {
2601
            "0": {
2602
              "name": "meta.preprocessor.c"
2603
            },
2604
            "1": {
2605
              "name": "keyword.control.directive.conditional.c"
2606
            },
2607
            "2": {
2608
              "name": "punctuation.definition.directive.c"
2609
            }
2610
          },
2611
          "patterns": [
2612
            {
2613
              "begin": "\\G(?=.)(?!/(?:/|\\*(?!.*\\\\\\s*\\n)))",
2614
              "end": "(?=//)|(?=/\\*(?!.*\\\\\\s*\\n))|(?=\\n)",
2615
              "name": "meta.preprocessor.c",
2616
              "patterns": [
2617
                {
2618
                  "include": "#preprocessor-rule-conditional-line"
2619
                }
2620
              ]
2621
            },
2622
            {
2623
              "include": "#comments"
2624
            },
2625
            {
2626
              "begin": "^\\s*((#)\\s*else)\\b",
2627
              "beginCaptures": {
2628
                "0": {
2629
                  "name": "meta.preprocessor.c"
2630
                },
2631
                "1": {
2632
                  "name": "keyword.control.directive.conditional.c"
2633
                },
2634
                "2": {
2635
                  "name": "punctuation.definition.directive.c"
2636
                }
2637
              },
2638
              "contentName": "comment.block.preprocessor.else-branch.c",
2639
              "end": "(?=^\\s*((#)\\s*endif)\\b)",
2640
              "patterns": [
2641
                {
2642
                  "include": "#disabled"
2643
                },
2644
                {
2645
                  "include": "#pragma-mark"
2646
                }
2647
              ]
2648
            },
2649
            {
2650
              "begin": "^\\s*((#)\\s*elif)\\b",
2651
              "beginCaptures": {
2652
                "0": {
2653
                  "name": "meta.preprocessor.c"
2654
                },
2655
                "1": {
2656
                  "name": "keyword.control.directive.conditional.c"
2657
                },
2658
                "2": {
2659
                  "name": "punctuation.definition.directive.c"
2660
                }
2661
              },
2662
              "contentName": "comment.block.preprocessor.if-branch.c",
2663
              "end": "(?=^\\s*((#)\\s*e(?:lse|lif|ndif))\\b)",
2664
              "patterns": [
2665
                {
2666
                  "include": "#disabled"
2667
                },
2668
                {
2669
                  "include": "#pragma-mark"
2670
                }
2671
              ]
2672
            },
2673
            {
2674
              "begin": "\\n",
2675
              "end": "(?=^\\s*((#)\\s*e(?:lse|lif|ndif))\\b)",
2676
              "patterns": [
2677
                {
2678
                  "include": "$self"
2679
                }
2680
              ]
2681
            }
2682
          ]
2683
        }
2684
      ]
2685
    },
2686
    "preprocessor-rule-enabled-block": {
2687
      "patterns": [
2688
        {
2689
          "begin": "^\\s*((#)\\s*if)\\b(?=\\s*\\(*\\b0*1\\b\\)*\\s*(?:$|//|/\\*))",
2690
          "beginCaptures": {
2691
            "0": {
2692
              "name": "meta.preprocessor.c"
2693
            },
2694
            "1": {
2695
              "name": "keyword.control.directive.conditional.c"
2696
            },
2697
            "2": {
2698
              "name": "punctuation.definition.directive.c"
2699
            }
2700
          },
2701
          "end": "^\\s*((#)\\s*endif)\\b",
2702
          "endCaptures": {
2703
            "0": {
2704
              "name": "meta.preprocessor.c"
2705
            },
2706
            "1": {
2707
              "name": "keyword.control.directive.conditional.c"
2708
            },
2709
            "2": {
2710
              "name": "punctuation.definition.directive.c"
2711
            }
2712
          },
2713
          "patterns": [
2714
            {
2715
              "begin": "\\G(?=.)(?!/(?:/|\\*(?!.*\\\\\\s*\\n)))",
2716
              "end": "(?=//)|(?=/\\*(?!.*\\\\\\s*\\n))|(?=\\n)",
2717
              "name": "meta.preprocessor.c",
2718
              "patterns": [
2719
                {
2720
                  "include": "#preprocessor-rule-conditional-line"
2721
                }
2722
              ]
2723
            },
2724
            {
2725
              "include": "#comments"
2726
            },
2727
            {
2728
              "begin": "^\\s*((#)\\s*else)\\b",
2729
              "beginCaptures": {
2730
                "0": {
2731
                  "name": "meta.preprocessor.c"
2732
                },
2733
                "1": {
2734
                  "name": "keyword.control.directive.conditional.c"
2735
                },
2736
                "2": {
2737
                  "name": "punctuation.definition.directive.c"
2738
                }
2739
              },
2740
              "contentName": "comment.block.preprocessor.else-branch.in-block.c",
2741
              "end": "(?=^\\s*((#)\\s*endif)\\b)",
2742
              "patterns": [
2743
                {
2744
                  "include": "#disabled"
2745
                },
2746
                {
2747
                  "include": "#pragma-mark"
2748
                }
2749
              ]
2750
            },
2751
            {
2752
              "begin": "^\\s*((#)\\s*elif)\\b",
2753
              "beginCaptures": {
2754
                "0": {
2755
                  "name": "meta.preprocessor.c"
2756
                },
2757
                "1": {
2758
                  "name": "keyword.control.directive.conditional.c"
2759
                },
2760
                "2": {
2761
                  "name": "punctuation.definition.directive.c"
2762
                }
2763
              },
2764
              "contentName": "comment.block.preprocessor.if-branch.in-block.c",
2765
              "end": "(?=^\\s*((#)\\s*e(?:lse|lif|ndif))\\b)",
2766
              "patterns": [
2767
                {
2768
                  "include": "#disabled"
2769
                },
2770
                {
2771
                  "include": "#pragma-mark"
2772
                }
2773
              ]
2774
            },
2775
            {
2776
              "begin": "\\n",
2777
              "end": "(?=^\\s*((#)\\s*e(?:lse|lif|ndif))\\b)",
2778
              "patterns": [
2779
                {
2780
                  "include": "#block_innards"
2781
                }
2782
              ]
2783
            }
2784
          ]
2785
        }
2786
      ]
2787
    },
2788
    "preprocessor-rule-enabled-elif": {
2789
      "begin": "^\\s*((#)\\s*elif)\\b(?=\\s*\\(*\\b0*1\\b\\)*\\s*(?:$|//|/\\*))",
2790
      "beginCaptures": {
2791
        "0": {
2792
          "name": "meta.preprocessor.c"
2793
        },
2794
        "1": {
2795
          "name": "keyword.control.directive.conditional.c"
2796
        },
2797
        "2": {
2798
          "name": "punctuation.definition.directive.c"
2799
        }
2800
      },
2801
      "end": "(?=^\\s*((#)\\s*endif)\\b)",
2802
      "patterns": [
2803
        {
2804
          "begin": "\\G(?=.)(?!/(?:/|\\*(?!.*\\\\\\s*\\n)))",
2805
          "end": "(?=//)|(?=/\\*(?!.*\\\\\\s*\\n))|(?<!\\\\)(?=\\n)",
2806
          "name": "meta.preprocessor.c",
2807
          "patterns": [
2808
            {
2809
              "include": "#preprocessor-rule-conditional-line"
2810
            }
2811
          ]
2812
        },
2813
        {
2814
          "include": "#comments"
2815
        },
2816
        {
2817
          "begin": "\\n",
2818
          "end": "(?=^\\s*((#)\\s*endif)\\b)",
2819
          "patterns": [
2820
            {
2821
              "begin": "^\\s*((#)\\s*(else))\\b",
2822
              "beginCaptures": {
2823
                "0": {
2824
                  "name": "meta.preprocessor.c"
2825
                },
2826
                "1": {
2827
                  "name": "keyword.control.directive.conditional.c"
2828
                },
2829
                "2": {
2830
                  "name": "punctuation.definition.directive.c"
2831
                }
2832
              },
2833
              "contentName": "comment.block.preprocessor.elif-branch.c",
2834
              "end": "(?=^\\s*((#)\\s*endif)\\b)",
2835
              "patterns": [
2836
                {
2837
                  "include": "#disabled"
2838
                },
2839
                {
2840
                  "include": "#pragma-mark"
2841
                }
2842
              ]
2843
            },
2844
            {
2845
              "begin": "^\\s*((#)\\s*(elif))\\b",
2846
              "beginCaptures": {
2847
                "0": {
2848
                  "name": "meta.preprocessor.c"
2849
                },
2850
                "1": {
2851
                  "name": "keyword.control.directive.conditional.c"
2852
                },
2853
                "2": {
2854
                  "name": "punctuation.definition.directive.c"
2855
                }
2856
              },
2857
              "contentName": "comment.block.preprocessor.elif-branch.c",
2858
              "end": "(?=^\\s*((#)\\s*e(?:lse|lif|ndif))\\b)",
2859
              "patterns": [
2860
                {
2861
                  "include": "#disabled"
2862
                },
2863
                {
2864
                  "include": "#pragma-mark"
2865
                }
2866
              ]
2867
            },
2868
            {
2869
              "include": "$self"
2870
            }
2871
          ]
2872
        }
2873
      ]
2874
    },
2875
    "preprocessor-rule-enabled-elif-block": {
2876
      "begin": "^\\s*((#)\\s*elif)\\b(?=\\s*\\(*\\b0*1\\b\\)*\\s*(?:$|//|/\\*))",
2877
      "beginCaptures": {
2878
        "0": {
2879
          "name": "meta.preprocessor.c"
2880
        },
2881
        "1": {
2882
          "name": "keyword.control.directive.conditional.c"
2883
        },
2884
        "2": {
2885
          "name": "punctuation.definition.directive.c"
2886
        }
2887
      },
2888
      "end": "(?=^\\s*((#)\\s*endif)\\b)",
2889
      "patterns": [
2890
        {
2891
          "begin": "\\G(?=.)(?!/(?:/|\\*(?!.*\\\\\\s*\\n)))",
2892
          "end": "(?=//)|(?=/\\*(?!.*\\\\\\s*\\n))|(?<!\\\\)(?=\\n)",
2893
          "name": "meta.preprocessor.c",
2894
          "patterns": [
2895
            {
2896
              "include": "#preprocessor-rule-conditional-line"
2897
            }
2898
          ]
2899
        },
2900
        {
2901
          "include": "#comments"
2902
        },
2903
        {
2904
          "begin": "\\n",
2905
          "end": "(?=^\\s*((#)\\s*endif)\\b)",
2906
          "patterns": [
2907
            {
2908
              "begin": "^\\s*((#)\\s*(else))\\b",
2909
              "beginCaptures": {
2910
                "0": {
2911
                  "name": "meta.preprocessor.c"
2912
                },
2913
                "1": {
2914
                  "name": "keyword.control.directive.conditional.c"
2915
                },
2916
                "2": {
2917
                  "name": "punctuation.definition.directive.c"
2918
                }
2919
              },
2920
              "contentName": "comment.block.preprocessor.elif-branch.in-block.c",
2921
              "end": "(?=^\\s*((#)\\s*endif)\\b)",
2922
              "patterns": [
2923
                {
2924
                  "include": "#disabled"
2925
                },
2926
                {
2927
                  "include": "#pragma-mark"
2928
                }
2929
              ]
2930
            },
2931
            {
2932
              "begin": "^\\s*((#)\\s*(elif))\\b",
2933
              "beginCaptures": {
2934
                "0": {
2935
                  "name": "meta.preprocessor.c"
2936
                },
2937
                "1": {
2938
                  "name": "keyword.control.directive.conditional.c"
2939
                },
2940
                "2": {
2941
                  "name": "punctuation.definition.directive.c"
2942
                }
2943
              },
2944
              "contentName": "comment.block.preprocessor.elif-branch.c",
2945
              "end": "(?=^\\s*((#)\\s*e(?:lse|lif|ndif))\\b)",
2946
              "patterns": [
2947
                {
2948
                  "include": "#disabled"
2949
                },
2950
                {
2951
                  "include": "#pragma-mark"
2952
                }
2953
              ]
2954
            },
2955
            {
2956
              "include": "#block_innards"
2957
            }
2958
          ]
2959
        }
2960
      ]
2961
    },
2962
    "preprocessor-rule-enabled-else": {
2963
      "begin": "^\\s*((#)\\s*else)\\b",
2964
      "beginCaptures": {
2965
        "0": {
2966
          "name": "meta.preprocessor.c"
2967
        },
2968
        "1": {
2969
          "name": "keyword.control.directive.conditional.c"
2970
        },
2971
        "2": {
2972
          "name": "punctuation.definition.directive.c"
2973
        }
2974
      },
2975
      "end": "(?=^\\s*((#)\\s*endif)\\b)",
2976
      "patterns": [
2977
        {
2978
          "include": "$self"
2979
        }
2980
      ]
2981
    },
2982
    "preprocessor-rule-enabled-else-block": {
2983
      "begin": "^\\s*((#)\\s*else)\\b",
2984
      "beginCaptures": {
2985
        "0": {
2986
          "name": "meta.preprocessor.c"
2987
        },
2988
        "1": {
2989
          "name": "keyword.control.directive.conditional.c"
2990
        },
2991
        "2": {
2992
          "name": "punctuation.definition.directive.c"
2993
        }
2994
      },
2995
      "end": "(?=^\\s*((#)\\s*endif)\\b)",
2996
      "patterns": [
2997
        {
2998
          "include": "#block_innards"
2999
        }
3000
      ]
3001
    },
3002
    "probably_a_parameter": {
3003
      "captures": {
3004
        "1": {
3005
          "name": "variable.parameter.probably.c"
3006
        }
3007
      },
3008
      "match": "(?<=[0-9A-Z_a-z] |[]\\&)*>])\\s*([A-Z_a-z]\\w*)\\s*(?=(?:\\[]\\s*)?[),])"
3009
    },
3010
    "static_assert": {
3011
      "begin": "((?>(?:(?>(?<!\\s)\\s+)|(/\\*)((?>(?:[^*]|(?>\\*+)[^/])*)((?>\\*+)/)))+|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z)))((?<!\\w)static_assert|_Static_assert(?!\\w))((?>(?:(?>(?<!\\s)\\s+)|(/\\*)((?>(?:[^*]|(?>\\*+)[^/])*)((?>\\*+)/)))+|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z)))(\\()",
3012
      "beginCaptures": {
3013
        "1": {
3014
          "patterns": [
3015
            {
3016
              "include": "#inline_comment"
3017
            }
3018
          ]
3019
        },
3020
        "10": {
3021
          "name": "punctuation.section.arguments.begin.bracket.round.static_assert.c"
3022
        },
3023
        "2": {
3024
          "name": "comment.block.c punctuation.definition.comment.begin.c"
3025
        },
3026
        "3": {
3027
          "name": "comment.block.c"
3028
        },
3029
        "4": {
3030
          "patterns": [
3031
            {
3032
              "match": "\\*/",
3033
              "name": "comment.block.c punctuation.definition.comment.end.c"
3034
            },
3035
            {
3036
              "match": "\\*",
3037
              "name": "comment.block.c"
3038
            }
3039
          ]
3040
        },
3041
        "5": {
3042
          "name": "keyword.other.static_assert.c"
3043
        },
3044
        "6": {
3045
          "patterns": [
3046
            {
3047
              "include": "#inline_comment"
3048
            }
3049
          ]
3050
        },
3051
        "7": {
3052
          "name": "comment.block.c punctuation.definition.comment.begin.c"
3053
        },
3054
        "8": {
3055
          "name": "comment.block.c"
3056
        },
3057
        "9": {
3058
          "patterns": [
3059
            {
3060
              "match": "\\*/",
3061
              "name": "comment.block.c punctuation.definition.comment.end.c"
3062
            },
3063
            {
3064
              "match": "\\*",
3065
              "name": "comment.block.c"
3066
            }
3067
          ]
3068
        }
3069
      },
3070
      "end": "(\\))",
3071
      "endCaptures": {
3072
        "1": {
3073
          "name": "punctuation.section.arguments.end.bracket.round.static_assert.c"
3074
        }
3075
      },
3076
      "patterns": [
3077
        {
3078
          "begin": "(,)\\s*(?=(?:L|u8?|U\\s*\")?)",
3079
          "beginCaptures": {
3080
            "1": {
3081
              "name": "punctuation.separator.delimiter.comma.c"
3082
            }
3083
          },
3084
          "end": "(?=\\))",
3085
          "name": "meta.static_assert.message.c",
3086
          "patterns": [
3087
            {
3088
              "include": "#string_context"
3089
            }
3090
          ]
3091
        },
3092
        {
3093
          "include": "#evaluation_context"
3094
        }
3095
      ]
3096
    },
3097
    "storage_types": {
3098
      "patterns": [
3099
        {
3100
          "match": "(?-im:(?<!\\w)(?:unsigned|signed|double|_Bool|short|float|long|void|char|bool|int)(?!\\w))",
3101
          "name": "storage.type.built-in.primitive.c"
3102
        },
3103
        {
3104
          "match": "(?-im:(?<!\\w)(?:atomic_uint_least64_t|atomic_uint_least16_t|atomic_uint_least32_t|pthread_rwlockattr_t|atomic_uint_fast64_t|atomic_uint_fast32_t|atomic_uint_fast16_t|atomic_int_least64_t|atomic_int_least32_t|atomic_int_least16_t|atomic_uint_least8_t|atomic_uint_fast8_t|atomic_int_least8_t|atomic_int_fast16_t|pthread_mutexattr_t|atomic_int_fast32_t|atomic_int_fast64_t|atomic_int_fast8_t|pthread_condattr_t|atomic_ptrdiff_t|pthread_rwlock_t|atomic_uintptr_t|atomic_uintmax_t|atomic_intmax_t|atomic_intptr_t|atomic_char32_t|atomic_char16_t|pthread_mutex_t|pthread_cond_t|atomic_wchar_t|uint_least64_t|uint_least32_t|uint_least16_t|pthread_once_t|pthread_attr_t|int_least32_t|pthread_key_t|int_least16_t|int_least64_t|uint_least8_t|uint_fast16_t|uint_fast32_t|uint_fast64_t|atomic_ushort|atomic_ullong|atomic_size_t|int_fast16_t|int_fast64_t|uint_fast8_t|atomic_short|atomic_uchar|atomic_schar|int_least8_t|memory_order|atomic_llong|atomic_ulong|int_fast32_t|atomic_long|atomic_uint|atomic_char|int_fast8_t|suseconds_t|atomic_bool|atomic_int|_Imaginary|useconds_t|in_port_t|uintmax_t|pthread_t|blksize_t|in_addr_t|uintptr_t|blkcnt_t|uint16_t|uint32_t|uint64_t|u_quad_t|_Complex|intptr_t|intmax_t|segsz_t|u_short|nlink_t|uint8_t|int64_t|int32_t|int16_t|fixpt_t|daddr_t|caddr_t|qaddr_t|ssize_t|clock_t|swblk_t|u_long|mode_t|int8_t|time_t|ushort|u_char|quad_t|size_t|pid_t|gid_t|uid_t|dev_t|div_t|off_t|u_int|key_t|ino_t|uint|id_t)(?!\\w))",
3105
          "name": "storage.type.built-in.c"
3106
        },
3107
        {
3108
          "match": "(?-im:\\b(enum|struct|union)\\b)",
3109
          "name": "storage.type.$1.c"
3110
        },
3111
        {
3112
          "begin": "\\b(__asm__|asm)\\b\\s*((?:volatile)?)",
3113
          "beginCaptures": {
3114
            "1": {
3115
              "name": "storage.type.asm.c"
3116
            },
3117
            "2": {
3118
              "name": "storage.modifier.c"
3119
            }
3120
          },
3121
          "end": "(?!\\G)",
3122
          "name": "meta.asm.c",
3123
          "patterns": [
3124
            {
3125
              "captures": {
3126
                "1": {
3127
                  "patterns": [
3128
                    {
3129
                      "include": "#inline_comment"
3130
                    }
3131
                  ]
3132
                },
3133
                "2": {
3134
                  "name": "comment.block.c punctuation.definition.comment.begin.c"
3135
                },
3136
                "3": {
3137
                  "name": "comment.block.c"
3138
                },
3139
                "4": {
3140
                  "patterns": [
3141
                    {
3142
                      "match": "\\*/",
3143
                      "name": "comment.block.c punctuation.definition.comment.end.c"
3144
                    },
3145
                    {
3146
                      "match": "\\*",
3147
                      "name": "comment.block.c"
3148
                    }
3149
                  ]
3150
                }
3151
              },
3152
              "match": "^((?:(?>\\s+)|(/\\*)((?>(?:[^*]|(?>\\*+)[^/])*)((?>\\*+)/)))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z))(?:\\n|$)"
3153
            },
3154
            {
3155
              "include": "#comments"
3156
            },
3157
            {
3158
              "begin": "(((?:(?>\\s+)|(/\\*)((?>(?:[^*]|(?>\\*+)[^/])*)((?>\\*+)/)))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z))\\()",
3159
              "beginCaptures": {
3160
                "1": {
3161
                  "name": "punctuation.section.parens.begin.bracket.round.assembly.c"
3162
                },
3163
                "2": {
3164
                  "patterns": [
3165
                    {
3166
                      "include": "#inline_comment"
3167
                    }
3168
                  ]
3169
                },
3170
                "3": {
3171
                  "name": "comment.block.c punctuation.definition.comment.begin.c"
3172
                },
3173
                "4": {
3174
                  "name": "comment.block.c"
3175
                },
3176
                "5": {
3177
                  "patterns": [
3178
                    {
3179
                      "match": "\\*/",
3180
                      "name": "comment.block.c punctuation.definition.comment.end.c"
3181
                    },
3182
                    {
3183
                      "match": "\\*",
3184
                      "name": "comment.block.c"
3185
                    }
3186
                  ]
3187
                }
3188
              },
3189
              "end": "(\\))",
3190
              "endCaptures": {
3191
                "1": {
3192
                  "name": "punctuation.section.parens.end.bracket.round.assembly.c"
3193
                }
3194
              },
3195
              "patterns": [
3196
                {
3197
                  "begin": "(R?)(\")",
3198
                  "beginCaptures": {
3199
                    "1": {
3200
                      "name": "meta.encoding.c"
3201
                    },
3202
                    "2": {
3203
                      "name": "punctuation.definition.string.begin.assembly.c"
3204
                    }
3205
                  },
3206
                  "contentName": "meta.embedded.assembly.c",
3207
                  "end": "(\")",
3208
                  "endCaptures": {
3209
                    "1": {
3210
                      "name": "punctuation.definition.string.end.assembly.c"
3211
                    }
3212
                  },
3213
                  "name": "string.quoted.double.c",
3214
                  "patterns": [
3215
                    {
3216
                      "include": "source.asm"
3217
                    },
3218
                    {
3219
                      "include": "source.x86"
3220
                    },
3221
                    {
3222
                      "include": "source.x86_64"
3223
                    },
3224
                    {
3225
                      "include": "source.arm"
3226
                    },
3227
                    {
3228
                      "include": "#backslash_escapes"
3229
                    },
3230
                    {
3231
                      "include": "#string_escaped_char"
3232
                    }
3233
                  ]
3234
                },
3235
                {
3236
                  "begin": "(\\()",
3237
                  "beginCaptures": {
3238
                    "1": {
3239
                      "name": "punctuation.section.parens.begin.bracket.round.assembly.inner.c"
3240
                    }
3241
                  },
3242
                  "end": "(\\))",
3243
                  "endCaptures": {
3244
                    "1": {
3245
                      "name": "punctuation.section.parens.end.bracket.round.assembly.inner.c"
3246
                    }
3247
                  },
3248
                  "patterns": [
3249
                    {
3250
                      "include": "#evaluation_context"
3251
                    }
3252
                  ]
3253
                },
3254
                {
3255
                  "captures": {
3256
                    "1": {
3257
                      "patterns": [
3258
                        {
3259
                          "include": "#inline_comment"
3260
                        }
3261
                      ]
3262
                    },
3263
                    "2": {
3264
                      "name": "comment.block.c punctuation.definition.comment.begin.c"
3265
                    },
3266
                    "3": {
3267
                      "name": "comment.block.c"
3268
                    },
3269
                    "4": {
3270
                      "patterns": [
3271
                        {
3272
                          "match": "\\*/",
3273
                          "name": "comment.block.c punctuation.definition.comment.end.c"
3274
                        },
3275
                        {
3276
                          "match": "\\*",
3277
                          "name": "comment.block.c"
3278
                        }
3279
                      ]
3280
                    },
3281
                    "5": {
3282
                      "name": "variable.other.asm.label.c"
3283
                    },
3284
                    "6": {
3285
                      "patterns": [
3286
                        {
3287
                          "include": "#inline_comment"
3288
                        }
3289
                      ]
3290
                    },
3291
                    "7": {
3292
                      "name": "comment.block.c punctuation.definition.comment.begin.c"
3293
                    },
3294
                    "8": {
3295
                      "name": "comment.block.c"
3296
                    },
3297
                    "9": {
3298
                      "patterns": [
3299
                        {
3300
                          "match": "\\*/",
3301
                          "name": "comment.block.c punctuation.definition.comment.end.c"
3302
                        },
3303
                        {
3304
                          "match": "\\*",
3305
                          "name": "comment.block.c"
3306
                        }
3307
                      ]
3308
                    }
3309
                  },
3310
                  "match": "\\[((?:(?>\\s+)|(/\\*)((?>(?:[^*]|(?>\\*+)[^/])*)((?>\\*+)/)))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z))([A-Z_a-z]\\w*)((?:(?>\\s+)|(/\\*)((?>(?:[^*]|(?>\\*+)[^/])*)((?>\\*+)/)))+?|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z))]"
3311
                },
3312
                {
3313
                  "match": ":",
3314
                  "name": "punctuation.separator.delimiter.colon.assembly.c"
3315
                },
3316
                {
3317
                  "include": "#comments"
3318
                }
3319
              ]
3320
            }
3321
          ]
3322
        }
3323
      ]
3324
    },
3325
    "string_escaped_char": {
3326
      "patterns": [
3327
        {
3328
          "match": "\\\\([\"'?\\\\abefnprtv]|[0-3]\\d{0,2}|[4-7]\\d?|x\\h{0,2}|u\\h{0,4}|U\\h{0,8})",
3329
          "name": "constant.character.escape.c"
3330
        },
3331
        {
3332
          "match": "\\\\.",
3333
          "name": "invalid.illegal.unknown-escape.c"
3334
        }
3335
      ]
3336
    },
3337
    "string_placeholder": {
3338
      "patterns": [
3339
        {
3340
          "match": "%(\\d+\\$)?[- #'+0]*[,:;_]?((-?\\d+)|\\*(-?\\d+\\$)?)?(\\.((-?\\d+)|\\*(-?\\d+\\$)?)?)?(hh?|ll|[Ljlqtz]|vh|vl?|hv|hl)?[%AC-GOSUXac-ginopsux]",
3341
          "name": "constant.other.placeholder.c"
3342
        },
3343
        {
3344
          "captures": {
3345
            "1": {
3346
              "name": "invalid.illegal.placeholder.c"
3347
            }
3348
          },
3349
          "match": "(%)(?!\"\\s*(PRI|SCN))"
3350
        }
3351
      ]
3352
    },
3353
    "strings": {
3354
      "patterns": [
3355
        {
3356
          "begin": "\"",
3357
          "beginCaptures": {
3358
            "0": {
3359
              "name": "punctuation.definition.string.begin.c"
3360
            }
3361
          },
3362
          "end": "\"",
3363
          "endCaptures": {
3364
            "0": {
3365
              "name": "punctuation.definition.string.end.c"
3366
            }
3367
          },
3368
          "name": "string.quoted.double.c",
3369
          "patterns": [
3370
            {
3371
              "include": "#string_escaped_char"
3372
            },
3373
            {
3374
              "include": "#string_placeholder"
3375
            },
3376
            {
3377
              "include": "#line_continuation_character"
3378
            }
3379
          ]
3380
        },
3381
        {
3382
          "begin": "'",
3383
          "beginCaptures": {
3384
            "0": {
3385
              "name": "punctuation.definition.string.begin.c"
3386
            }
3387
          },
3388
          "end": "'",
3389
          "endCaptures": {
3390
            "0": {
3391
              "name": "punctuation.definition.string.end.c"
3392
            }
3393
          },
3394
          "name": "string.quoted.single.c",
3395
          "patterns": [
3396
            {
3397
              "include": "#string_escaped_char"
3398
            },
3399
            {
3400
              "include": "#line_continuation_character"
3401
            }
3402
          ]
3403
        }
3404
      ]
3405
    },
3406
    "switch_conditional_parentheses": {
3407
      "begin": "((?>(?:(?>(?<!\\s)\\s+)|(/\\*)((?>(?:[^*]|(?>\\*+)[^/])*)((?>\\*+)/)))+|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z)))(\\()",
3408
      "beginCaptures": {
3409
        "1": {
3410
          "patterns": [
3411
            {
3412
              "include": "#inline_comment"
3413
            }
3414
          ]
3415
        },
3416
        "2": {
3417
          "name": "comment.block.c punctuation.definition.comment.begin.c"
3418
        },
3419
        "3": {
3420
          "name": "comment.block.c"
3421
        },
3422
        "4": {
3423
          "patterns": [
3424
            {
3425
              "match": "\\*/",
3426
              "name": "comment.block.c punctuation.definition.comment.end.c"
3427
            },
3428
            {
3429
              "match": "\\*",
3430
              "name": "comment.block.c"
3431
            }
3432
          ]
3433
        },
3434
        "5": {
3435
          "name": "punctuation.section.parens.begin.bracket.round.conditional.switch.c"
3436
        }
3437
      },
3438
      "end": "(\\))",
3439
      "endCaptures": {
3440
        "1": {
3441
          "name": "punctuation.section.parens.end.bracket.round.conditional.switch.c"
3442
        }
3443
      },
3444
      "name": "meta.conditional.switch.c",
3445
      "patterns": [
3446
        {
3447
          "include": "#evaluation_context"
3448
        },
3449
        {
3450
          "include": "#c_conditional_context"
3451
        }
3452
      ]
3453
    },
3454
    "switch_statement": {
3455
      "begin": "(((?>(?:(?>(?<!\\s)\\s+)|(/\\*)((?>(?:[^*]|(?>\\*+)[^/])*)((?>\\*+)/)))+|(?:(?:(?:(?:\\b|(?<=\\W))|(?=\\W))|\\A)|\\Z)))((?<!\\w)switch(?!\\w)))",
3456
      "beginCaptures": {
3457
        "1": {
3458
          "name": "meta.head.switch.c"
3459
        },
3460
        "2": {
3461
          "patterns": [
3462
            {
3463
              "include": "#inline_comment"
3464
            }
3465
          ]
3466
        },
3467
        "3": {
3468
          "name": "comment.block.c punctuation.definition.comment.begin.c"
3469
        },
3470
        "4": {
3471
          "name": "comment.block.c"
3472
        },
3473
        "5": {
3474
          "patterns": [
3475
            {
3476
              "match": "\\*/",
3477
              "name": "comment.block.c punctuation.definition.comment.end.c"
3478
            },
3479
            {
3480
              "match": "\\*",
3481
              "name": "comment.block.c"
3482
            }
3483
          ]
3484
        },
3485
        "6": {
3486
          "name": "keyword.control.switch.c"
3487
        }
3488
      },
3489
      "end": "(?<=}|%>|\\?\\?>)|(?=[];=>\\[])",
3490
      "name": "meta.block.switch.c",
3491
      "patterns": [
3492
        {
3493
          "begin": "\\G ?",
3494
          "end": "(\\{|<%|\\?\\?<|(?=;))",
3495
          "endCaptures": {
3496
            "1": {
3497
              "name": "punctuation.section.block.begin.bracket.curly.switch.c"
3498
            }
3499
          },
3500
          "name": "meta.head.switch.c",
3501
          "patterns": [
3502
            {
3503
              "include": "#switch_conditional_parentheses"
3504
            },
3505
            {
3506
              "include": "$self"
3507
            }
3508
          ]
3509
        },
3510
        {
3511
          "begin": "(?<=\\{|<%|\\?\\?<)",
3512
          "end": "(}|%>|\\?\\?>)",
3513
          "endCaptures": {
3514
            "1": {
3515
              "name": "punctuation.section.block.end.bracket.curly.switch.c"
3516
            }
3517
          },
3518
          "name": "meta.body.switch.c",
3519
          "patterns": [
3520
            {
3521
              "include": "#default_statement"
3522
            },
3523
            {
3524
              "include": "#case_statement"
3525
            },
3526
            {
3527
              "include": "$self"
3528
            },
3529
            {
3530
              "include": "#block_innards"
3531
            }
3532
          ]
3533
        },
3534
        {
3535
          "begin": "(?<=}|%>|\\?\\?>)[\\n\\s]*",
3536
          "end": "[\\n\\s]*(?=;)",
3537
          "name": "meta.tail.switch.c",
3538
          "patterns": [
3539
            {
3540
              "include": "$self"
3541
            }
3542
          ]
3543
        }
3544
      ]
3545
    },
3546
    "vararg_ellipses": {
3547
      "match": "(?<!\\.)\\.\\.\\.(?!\\.)",
3548
      "name": "punctuation.vararg-ellipses.c"
3549
    }
3550
  },
3551
  "scopeName": "source.c"
3552
}