PluginProbe
Code Block Pro – Beautiful Syntax Highlighting / 1.13.0
Code Block Pro – Beautiful Syntax Highlighting v1.13.0
1.27.1 1.27.2 1.27.3 1.27.4 1.27.5 1.27.6 1.27.7 1.28.0 1.3.0 1.4.0 1.5.0 1.5.1 1.5.2 1.6.0 1.7.0 1.8.0 1.9.0 1.9.1 1.9.2 1.9.3 trunk 1.1.0 1.10.0 1.11.0 1.11.1 All 63 releases
code-block-pro / build / shiki / languages / c.tmLanguage.json

c.tmLanguage.json in Code Block Pro – Beautiful Syntax Highlighting 1.13.0, at build/shiki/languages/c.tmLanguage.json

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