c.cson 52 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799
  1. 'scopeName': 'source.c'
  2. 'fileTypes': [
  3. 'c'
  4. 'h.in'
  5. 'xpm'
  6. ]
  7. 'firstLineMatch': '(?i)-\\*-[^*]*(Mode:\\s*)?C(\\s*;.*?)?\\s*-\\*-'
  8. 'name': 'C'
  9. 'patterns': [
  10. {
  11. 'include': '#preprocessor-rule-enabled'
  12. }
  13. {
  14. 'include': '#preprocessor-rule-disabled'
  15. }
  16. {
  17. 'include': '#preprocessor-rule-conditional'
  18. }
  19. {
  20. 'include': '#comments'
  21. }
  22. {
  23. 'match': '\\b(break|case|continue|default|do|else|for|goto|if|_Pragma|return|switch|while)\\b'
  24. 'name': 'keyword.control.c'
  25. }
  26. {
  27. 'include': '#storage_types'
  28. }
  29. {
  30. 'match': '\\b(const|extern|register|restrict|static|volatile|inline)\\b'
  31. 'name': 'storage.modifier.c'
  32. }
  33. {
  34. # Common naming idiom for C constants: "kConstantVariable"
  35. 'match': '\\bk[A-Z]\\w*\\b'
  36. 'name': 'constant.other.variable.mac-classic.c'
  37. }
  38. {
  39. 'match': '\\bg[A-Z]\\w*\\b'
  40. 'name': 'variable.other.readwrite.global.mac-classic.c'
  41. }
  42. {
  43. 'match': '\\bs[A-Z]\\w*\\b'
  44. 'name': 'variable.other.readwrite.static.mac-classic.c'
  45. }
  46. {
  47. 'match': '\\b(NULL|true|false|TRUE|FALSE)\\b'
  48. 'name': 'constant.language.c'
  49. }
  50. {
  51. 'include': '#operators'
  52. }
  53. {
  54. 'include': '#numbers'
  55. }
  56. {
  57. 'include': '#strings'
  58. }
  59. {
  60. 'begin': '''(?x)
  61. ^\\s* ((\\#)\\s*define) \\s+ # define
  62. ((?<id>[a-zA-Z_$][\\w$]*)) # macro name
  63. (?:
  64. (\\()
  65. (
  66. \\s* \\g<id> \\s* # first argument
  67. ((,) \\s* \\g<id> \\s*)* # additional arguments
  68. (?:\\.\\.\\.)? # varargs ellipsis?
  69. )
  70. (\\))
  71. )?
  72. '''
  73. 'beginCaptures':
  74. '1':
  75. 'name': 'keyword.control.directive.define.c'
  76. '2':
  77. 'name': 'punctuation.definition.directive.c'
  78. '3':
  79. 'name': 'entity.name.function.preprocessor.c'
  80. '5':
  81. 'name': 'punctuation.definition.parameters.begin.c'
  82. '6':
  83. 'name': 'variable.parameter.preprocessor.c'
  84. '8':
  85. 'name': 'punctuation.separator.parameters.c'
  86. '9':
  87. 'name': 'punctuation.definition.parameters.end.c'
  88. 'end': '(?=(?://|/\\*))|(?<!\\\\)(?=\\n)'
  89. 'name': 'meta.preprocessor.macro.c'
  90. 'patterns': [
  91. {
  92. 'include': '#preprocessor-rule-define-line-contents'
  93. }
  94. ]
  95. }
  96. {
  97. 'begin': '^\\s*((#)\\s*(error|warning))\\b'
  98. 'captures':
  99. '1':
  100. 'name': 'keyword.control.directive.diagnostic.$3.c'
  101. '2':
  102. 'name': 'punctuation.definition.directive.c'
  103. 'end': '(?<!\\\\)(?=\\n)|(?=//)|(?=/\\*(?!.*\\\\\\s*\\n))'
  104. 'name': 'meta.preprocessor.diagnostic.c'
  105. 'patterns': [
  106. {
  107. 'include': '#comments'
  108. }
  109. {
  110. 'include': '#strings'
  111. }
  112. {
  113. 'include': '#line_continuation_character'
  114. }
  115. ]
  116. }
  117. {
  118. 'begin': '^\\s*((#)\\s*(include(?:_next)?|import))\\b\\s*'
  119. 'beginCaptures':
  120. '1':
  121. 'name': 'keyword.control.directive.$3.c'
  122. '2':
  123. 'name': 'punctuation.definition.directive.c'
  124. 'end': '(?=(?://|/\\*))|(?<!\\\\)(?=\\n)'
  125. 'name': 'meta.preprocessor.include.c'
  126. 'patterns': [
  127. {
  128. 'include': '#line_continuation_character'
  129. }
  130. {
  131. 'begin': '"'
  132. 'beginCaptures':
  133. '0':
  134. 'name': 'punctuation.definition.string.begin.c'
  135. 'end': '"'
  136. 'endCaptures':
  137. '0':
  138. 'name': 'punctuation.definition.string.end.c'
  139. 'name': 'string.quoted.double.include.c'
  140. }
  141. {
  142. 'begin': '<'
  143. 'beginCaptures':
  144. '0':
  145. 'name': 'punctuation.definition.string.begin.c'
  146. 'end': '>'
  147. 'endCaptures':
  148. '0':
  149. 'name': 'punctuation.definition.string.end.c'
  150. 'name': 'string.quoted.other.lt-gt.include.c'
  151. }
  152. ]
  153. }
  154. {
  155. 'include': '#pragma-mark'
  156. }
  157. {
  158. 'begin': '^\\s*((#)\\s*line)\\b'
  159. 'beginCaptures':
  160. '1':
  161. 'name': 'keyword.control.directive.line.c'
  162. '2':
  163. 'name': 'punctuation.definition.directive.c'
  164. 'end': '(?=(?://|/\\*))|(?<!\\\\)(?=\\n)'
  165. 'name': 'meta.preprocessor.c'
  166. 'patterns': [
  167. {
  168. 'include': '#strings'
  169. }
  170. {
  171. 'include': '#numbers'
  172. }
  173. {
  174. 'include': '#line_continuation_character'
  175. }
  176. ]
  177. }
  178. {
  179. 'begin': '^\\s*(?:((#)\\s*undef))\\b'
  180. 'beginCaptures':
  181. '1':
  182. 'name': 'keyword.control.directive.undef.c'
  183. '2':
  184. 'name': 'punctuation.definition.directive.c'
  185. 'end': '(?=(?://|/\\*))|(?<!\\\\)(?=\\n)'
  186. 'name': 'meta.preprocessor.c'
  187. 'patterns': [
  188. {
  189. 'match': '[a-zA-Z_$][\\w$]*'
  190. 'name': 'entity.name.function.preprocessor.c'
  191. }
  192. {
  193. 'include': '#line_continuation_character'
  194. }
  195. ]
  196. }
  197. {
  198. 'begin': '^\\s*(?:((#)\\s*pragma))\\b'
  199. 'beginCaptures':
  200. '1':
  201. 'name': 'keyword.control.directive.pragma.c'
  202. '2':
  203. 'name': 'punctuation.definition.directive.c'
  204. 'end': '(?=(?://|/\\*))|(?<!\\\\)(?=\\n)'
  205. 'name': 'meta.preprocessor.pragma.c'
  206. 'patterns': [
  207. {
  208. 'include': '#strings'
  209. }
  210. {
  211. 'match': '[a-zA-Z_$][\\w\\-$]*'
  212. 'name': 'entity.other.attribute-name.pragma.preprocessor.c'
  213. }
  214. {
  215. 'include': '#numbers'
  216. }
  217. {
  218. 'include': '#line_continuation_character'
  219. }
  220. ]
  221. }
  222. {
  223. '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'
  224. 'name': 'support.type.sys-types.c'
  225. }
  226. {
  227. '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'
  228. 'name': 'support.type.pthread.c'
  229. }
  230. {
  231. 'match': '''(?x) \\b
  232. (int8_t|int16_t|int32_t|int64_t|uint8_t|uint16_t|uint32_t|uint64_t|int_least8_t
  233. |int_least16_t|int_least32_t|int_least64_t|uint_least8_t|uint_least16_t|uint_least32_t
  234. |uint_least64_t|int_fast8_t|int_fast16_t|int_fast32_t|int_fast64_t|uint_fast8_t
  235. |uint_fast16_t|uint_fast32_t|uint_fast64_t|intptr_t|uintptr_t|intmax_t|intmax_t
  236. |uintmax_t|uintmax_t)
  237. \\b'''
  238. 'name': 'support.type.stdint.c'
  239. }
  240. {
  241. 'match': '\\b(noErr|kNilOptions|kInvalidID|kVariableLengthArray)\\b'
  242. 'name': 'support.constant.mac-classic.c'
  243. }
  244. {
  245. 'match': '''(?x) \\b
  246. (AbsoluteTime|Boolean|Byte|ByteCount|ByteOffset|BytePtr|CompTimeValue|ConstLogicalAddress|ConstStrFileNameParam
  247. |ConstStringPtr|Duration|Fixed|FixedPtr|Float32|Float32Point|Float64|Float80|Float96|FourCharCode|Fract|FractPtr
  248. |Handle|ItemCount|LogicalAddress|OptionBits|OSErr|OSStatus|OSType|OSTypePtr|PhysicalAddress|ProcessSerialNumber
  249. |ProcessSerialNumberPtr|ProcHandle|Ptr|ResType|ResTypePtr|ShortFixed|ShortFixedPtr|SignedByte|SInt16|SInt32|SInt64
  250. |SInt8|Size|StrFileName|StringHandle|StringPtr|TimeBase|TimeRecord|TimeScale|TimeValue|TimeValue64|UInt16|UInt32
  251. |UInt64|UInt8|UniChar|UniCharCount|UniCharCountPtr|UniCharPtr|UnicodeScalarValue|UniversalProcHandle|UniversalProcPtr
  252. |UnsignedFixed|UnsignedFixedPtr|UnsignedWide|UTF16Char|UTF32Char|UTF8Char)
  253. \\b'''
  254. 'name': 'support.type.mac-classic.c'
  255. }
  256. {
  257. # Reserved POSIX types
  258. 'match': '\\b([A-Za-z0-9_]+_t)\\b'
  259. 'name': 'support.type.posix-reserved.c'
  260. }
  261. {
  262. 'include': '#block'
  263. }
  264. {
  265. 'include': '#parens'
  266. }
  267. {
  268. # FIRST CAPTURE meta.function.c scope (provides an injectable scope, balanced parentheses and prevents unnecessary scope nesting)
  269. 'begin': '''(?x)
  270. (?!(?:while|for|do|if|else|switch|catch|enumerate|return|typeid|alignof|alignas|sizeof|[cr]?iterate|asm|__asm__|auto|bool|_Bool|char|_Complex|double|enum|float|_Imaginary|int|long|short|signed|struct|typedef|union|unsigned|void)\\s*\\()
  271. (?=
  272. (?:[A-Za-z_][A-Za-z0-9_]*+|::)++\\s*\\( # actual name
  273. |
  274. (?:(?<=operator)(?:[-*&<>=+!]+|\\(\\)|\\[\\]))\\s*\\(
  275. )
  276. '''
  277. 'end': '(?<=\\))(?!\\w)'
  278. 'name': 'meta.function.c'
  279. 'patterns': [
  280. {
  281. 'include': '#function-innards'
  282. }
  283. ]
  284. }
  285. {
  286. 'include': '#line_continuation_character'
  287. }
  288. {
  289. 'match': '(\\[)|(\\])'
  290. 'captures':
  291. '1':
  292. 'name': 'punctuation.definition.begin.bracket.square.c'
  293. '2':
  294. 'name': 'punctuation.definition.end.bracket.square.c'
  295. }
  296. {
  297. 'match': ';'
  298. 'name': 'punctuation.terminator.statement.c'
  299. }
  300. {
  301. 'match': ','
  302. 'name': 'punctuation.separator.delimiter.c'
  303. }
  304. ]
  305. 'repository':
  306. 'access':
  307. 'captures':
  308. '2':
  309. 'name': 'punctuation.separator.dot-access.c'
  310. '3':
  311. 'name': 'punctuation.separator.pointer-access.c'
  312. '4':
  313. 'name': 'variable.other.member.c'
  314. 'match': '((\\.)|(->))\\s*(([a-zA-Z_][a-zA-Z_0-9]*)\\b(?!\\s*\\())?'
  315. 'block':
  316. 'patterns': [
  317. {
  318. 'begin': '{'
  319. 'beginCaptures':
  320. '0':
  321. 'name': 'punctuation.section.block.begin.bracket.curly.c'
  322. 'end': '}|(?=\\s*#\\s*(?:elif|else|endif)\\b)'
  323. 'endCaptures':
  324. '0':
  325. 'name': 'punctuation.section.block.end.bracket.curly.c'
  326. 'name': 'meta.block.c'
  327. 'patterns': [
  328. {
  329. 'include': '#block_innards'
  330. }
  331. ]
  332. }
  333. ]
  334. 'block_innards':
  335. 'patterns': [
  336. {
  337. 'include': '#preprocessor-rule-enabled-block'
  338. }
  339. {
  340. 'include': '#preprocessor-rule-disabled-block'
  341. }
  342. {
  343. 'include': '#preprocessor-rule-conditional-block'
  344. }
  345. {
  346. 'include': '#access'
  347. }
  348. {
  349. 'include': '#libc'
  350. }
  351. {
  352. 'include': '#c_function_call'
  353. }
  354. {
  355. 'captures':
  356. '1':
  357. 'name': 'variable.other.c'
  358. '2':
  359. 'name': 'punctuation.definition.parameters.c'
  360. 'match': '''(?x)
  361. (?:
  362. (?:
  363. (?=\\s)(?<!else|new|return)
  364. (?<=\\w) \\s+ # or word + space before name
  365. )
  366. )
  367. (
  368. (?:[A-Za-z_][A-Za-z0-9_]*+ | :: )++ # actual name
  369. |
  370. (?:(?<=operator) (?:[-*&<>=+!]+ | \\(\\) | \\[\\]))
  371. )
  372. \\s*(\\() # opening bracket
  373. '''
  374. 'name': 'meta.initialization.c'
  375. }
  376. {
  377. # Prevent unnecessary nesting of meta.block.c scope
  378. 'begin': '{'
  379. 'beginCaptures':
  380. '0':
  381. 'name': 'punctuation.section.block.begin.bracket.curly.c'
  382. 'end': '}|(?=\\s*#\\s*(?:elif|else|endif)\\b)'
  383. 'endCaptures':
  384. '0':
  385. 'name': 'punctuation.section.block.end.bracket.curly.c'
  386. 'patterns': [
  387. {
  388. 'include': '#block_innards'
  389. }
  390. ]
  391. }
  392. {
  393. 'include': '#parens-block'
  394. }
  395. {
  396. 'include': '$base'
  397. }
  398. ]
  399. 'c_function_call':
  400. # FIRST CAPTURE meta.function-call.c scope (provides an injectable scope, balanced parentheses and prevents unnecessary scope nesting)
  401. 'begin': '''(?x)
  402. (?!(?:while|for|do|if|else|switch|catch|enumerate|return|typeid|alignof|alignas|sizeof|[cr]?iterate)\\s*\\()
  403. (?=
  404. (?:[A-Za-z_][A-Za-z0-9_]*+|::)++\\s*\\( # actual name
  405. |
  406. (?:(?<=operator)(?:[-*&<>=+!]+|\\(\\)|\\[\\]))\\s*\\(
  407. )
  408. '''
  409. 'end': '(?<=\\))(?!\\w)'
  410. 'name': 'meta.function-call.c'
  411. 'patterns': [
  412. {
  413. 'include': '#function-call-innards'
  414. }
  415. ]
  416. 'comments':
  417. 'patterns': [
  418. {
  419. 'captures':
  420. '1':
  421. 'name': 'meta.toc-list.banner.block.c'
  422. 'match': '^/\\* =(\\s*.*?)\\s*= \\*/$\\n?'
  423. 'name': 'comment.block.c'
  424. }
  425. {
  426. 'begin': '/\\*'
  427. 'beginCaptures':
  428. '0':
  429. 'name': 'punctuation.definition.comment.begin.c'
  430. 'end': '\\*/'
  431. 'endCaptures':
  432. '0':
  433. 'name': 'punctuation.definition.comment.end.c'
  434. 'name': 'comment.block.c'
  435. }
  436. {
  437. 'match': '\\*/.*\\n'
  438. 'name': 'invalid.illegal.stray-comment-end.c'
  439. }
  440. {
  441. 'captures':
  442. '1':
  443. 'name': 'meta.toc-list.banner.line.c'
  444. 'match': '^// =(\\s*.*?)\\s*=\\s*$\\n?'
  445. 'name': 'comment.line.banner.cpp'
  446. }
  447. {
  448. 'begin': '(^[ \\t]+)?(?=//)'
  449. 'beginCaptures':
  450. '1':
  451. 'name': 'punctuation.whitespace.comment.leading.cpp'
  452. 'end': '(?!\\G)'
  453. 'patterns': [
  454. {
  455. 'begin': '//'
  456. 'beginCaptures':
  457. '0':
  458. 'name': 'punctuation.definition.comment.cpp'
  459. 'end': '(?=\\n)'
  460. 'name': 'comment.line.double-slash.cpp'
  461. 'patterns': [
  462. {
  463. 'include': '#line_continuation_character'
  464. }
  465. ]
  466. }
  467. ]
  468. }
  469. ]
  470. 'disabled':
  471. # Consume nested preprocessor if(def)s
  472. 'begin': '^\\s*#\\s*if(n?def)?\\b.*$'
  473. 'end': '^\\s*#\\s*endif\\b'
  474. 'patterns': [
  475. {
  476. 'include': '#disabled'
  477. }
  478. {
  479. 'include': '#pragma-mark'
  480. }
  481. ]
  482. 'libc':
  483. 'captures':
  484. '1':
  485. 'name': 'punctuation.whitespace.support.function.leading.c'
  486. '2':
  487. 'name': 'support.function.C99.c'
  488. 'match': '''(?x) (\\s*) \\b
  489. (_Exit|(?:nearbyint|nextafter|nexttoward|netoward|nan)[fl]?|a(?:cos|sin)h?[fl]?|abort|abs|asctime|assert
  490. |atan(?:[h2]?[fl]?)?|atexit|ato[ifl]|atoll|bsearch|btowc|cabs[fl]?|cacos|cacos[fl]|cacosh[fl]?
  491. |calloc|carg[fl]?|casinh?[fl]?|catanh?[fl]?|cbrt[fl]?|ccosh?[fl]?|ceil[fl]?|cexp[fl]?|cimag[fl]?
  492. |clearerr|clock|clog[fl]?|conj[fl]?|copysign[fl]?|cosh?[fl]?|cpow[fl]?|cproj[fl]?|creal[fl]?
  493. |csinh?[fl]?|csqrt[fl]?|ctanh?[fl]?|ctime|difftime|div|erfc?[fl]?|exit|fabs[fl]?
  494. |exp(?:2[fl]?|[fl]|m1[fl]?)?|fclose|fdim[fl]?|fe[gs]et(?:env|exceptflag|round)|feclearexcept
  495. |feholdexcept|feof|feraiseexcept|ferror|fetestexcept|feupdateenv|fflush|fgetpos|fgetw?[sc]
  496. |floor[fl]?|fmax?[fl]?|fmin[fl]?|fmod[fl]?|fopen|fpclassify|fprintf|fputw?[sc]|fread|free|freopen
  497. |frexp[fl]?|fscanf|fseek|fsetpos|ftell|fwide|fwprintf|fwrite|fwscanf|genv|get[sc]|getchar|gmtime
  498. |gwc|gwchar|hypot[fl]?|ilogb[fl]?|imaxabs|imaxdiv|isalnum|isalpha|isblank|iscntrl|isdigit|isfinite
  499. |isgraph|isgreater|isgreaterequal|isinf|isless(?:equal|greater)?|isw?lower|isnan|isnormal|isw?print
  500. |isw?punct|isw?space|isunordered|isw?upper|iswalnum|iswalpha|iswblank|iswcntrl|iswctype|iswdigit|iswgraph
  501. |isw?xdigit|labs|ldexp[fl]?|ldiv|lgamma[fl]?|llabs|lldiv|llrint[fl]?|llround[fl]?|localeconv|localtime
  502. |log[2b]?[fl]?|log1[p0][fl]?|longjmp|lrint[fl]?|lround[fl]?|malloc|mbr?len|mbr?towc|mbsinit|mbsrtowcs
  503. |mbstowcs|memchr|memcmp|memcpy|memmove|memset|mktime|modf[fl]?|perror|pow[fl]?|printf|puts|putw?c(?:har)?
  504. |qsort|raise|rand|remainder[fl]?|realloc|remove|remquo[fl]?|rename|rewind|rint[fl]?|round[fl]?|scalbl?n[fl]?
  505. |scanf|setbuf|setjmp|setlocale|setvbuf|signal|signbit|sinh?[fl]?|snprintf|sprintf|sqrt[fl]?|srand|sscanf
  506. |strcat|strchr|strcmp|strcoll|strcpy|strcspn|strerror|strftime|strlen|strncat|strncmp|strncpy|strpbrk
  507. |strrchr|strspn|strstr|strto[kdf]|strtoimax|strtol[dl]?|strtoull?|strtoumax|strxfrm|swprintf|swscanf
  508. |system|tan|tan[fl]|tanh[fl]?|tgamma[fl]?|time|tmpfile|tmpnam|tolower|toupper|trunc[fl]?|ungetw?c|va_arg
  509. |va_copy|va_end|va_start|vfw?printf|vfw?scanf|vprintf|vscanf|vsnprintf|vsprintf|vsscanf|vswprintf|vswscanf
  510. |vwprintf|vwscanf|wcrtomb|wcscat|wcschr|wcscmp|wcscoll|wcscpy|wcscspn|wcsftime|wcslen|wcsncat|wcsncmp|wcsncpy
  511. |wcspbrk|wcsrchr|wcsrtombs|wcsspn|wcsstr|wcsto[dkf]|wcstoimax|wcstol[dl]?|wcstombs|wcstoull?|wcstoumax|wcsxfrm
  512. |wctom?b|wmem(?:set|chr|cpy|cmp|move)|wprintf|wscanf)\\b
  513. '''
  514. 'line_continuation_character':
  515. 'patterns': [
  516. {
  517. 'match': '(\\\\)\\n'
  518. 'captures':
  519. '1':
  520. 'name': 'constant.character.escape.line-continuation.c'
  521. }
  522. ]
  523. 'numbers':
  524. 'patterns': [
  525. {
  526. 'match': '\\b((0(x|X)[0-9a-fA-F]([0-9a-fA-F\']*[0-9a-fA-F])?)|(0(b|B)[01]([01\']*[01])?)|(([0-9]([0-9\']*[0-9])?\\.?[0-9]*([0-9\']*[0-9])?)|(\\.[0-9]([0-9\']*[0-9])?))((e|E)(\\+|-)?[0-9]([0-9\']*[0-9])?)?)(L|l|UL|ul|u|U|F|f|ll|LL|ull|ULL)?\\b'
  527. 'name': 'constant.numeric.c'
  528. }
  529. ]
  530. 'parens':
  531. 'begin': '\\('
  532. 'beginCaptures':
  533. '0':
  534. 'name': 'punctuation.section.parens.begin.bracket.round.c'
  535. 'end': '\\)'
  536. 'endCaptures':
  537. '0':
  538. 'name': 'punctuation.section.parens.end.bracket.round.c'
  539. 'patterns': [
  540. {
  541. 'include': '$base'
  542. }
  543. ]
  544. 'parens-block':
  545. 'begin': '\\('
  546. 'beginCaptures':
  547. '0':
  548. 'name': 'punctuation.section.parens.begin.bracket.round.c'
  549. 'end': '\\)'
  550. 'endCaptures':
  551. '0':
  552. 'name': 'punctuation.section.parens.end.bracket.round.c'
  553. 'patterns': [
  554. {
  555. 'include': '#block_innards'
  556. }
  557. ]
  558. 'pragma-mark':
  559. 'captures':
  560. '1':
  561. 'name': 'meta.preprocessor.pragma.c'
  562. '2':
  563. 'name': 'keyword.control.directive.pragma.pragma-mark.c'
  564. '3':
  565. 'name': 'punctuation.definition.directive.c'
  566. '4':
  567. 'name': 'entity.name.tag.pragma-mark.c'
  568. 'match': '^\\s*(((#)\\s*pragma\\s+mark)\\s+(.*))'
  569. 'name': 'meta.section'
  570. 'operators':
  571. 'patterns': [
  572. {
  573. 'match': '(?<![\\w$])(sizeof)(?![\\w$])'
  574. 'name': 'keyword.operator.sizeof.c'
  575. }
  576. {
  577. 'match': '--'
  578. 'name': 'keyword.operator.decrement.c'
  579. }
  580. {
  581. 'match': '\\+\\+'
  582. 'name': 'keyword.operator.increment.c'
  583. }
  584. {
  585. 'match': '%=|\\+=|-=|\\*=|(?<!\\()/='
  586. 'name': 'keyword.operator.assignment.compound.c'
  587. }
  588. {
  589. 'match': '&=|\\^=|<<=|>>=|\\|='
  590. 'name': 'keyword.operator.assignment.compound.bitwise.c'
  591. }
  592. {
  593. 'match': '<<|>>'
  594. 'name': 'keyword.operator.bitwise.shift.c'
  595. }
  596. {
  597. 'match': '!=|<=|>=|==|<|>'
  598. 'name': 'keyword.operator.comparison.c'
  599. }
  600. {
  601. 'match': '&&|!|\\|\\|'
  602. 'name': 'keyword.operator.logical.c'
  603. }
  604. {
  605. 'match': '&|\\||\\^|~'
  606. 'name': 'keyword.operator.c'
  607. }
  608. {
  609. 'match': '='
  610. 'name': 'keyword.operator.assignment.c'
  611. }
  612. {
  613. 'match': '%|\\*|/|-|\\+'
  614. 'name': 'keyword.operator.c'
  615. }
  616. {
  617. 'begin': '\\?'
  618. 'beginCaptures':
  619. '0':
  620. 'name': 'keyword.operator.ternary.c'
  621. 'end': ':'
  622. 'applyEndPatternLast': true # To prevent matching C++ namespace access ::
  623. 'endCaptures':
  624. '0':
  625. 'name': 'keyword.operator.ternary.c'
  626. 'patterns': [
  627. {
  628. 'include': '#access'
  629. }
  630. {
  631. 'include': '#libc'
  632. }
  633. {
  634. 'include': '#c_function_call'
  635. }
  636. {
  637. 'include': '$base'
  638. }
  639. ]
  640. }
  641. ]
  642. 'strings':
  643. 'patterns': [
  644. {
  645. 'begin': '"'
  646. 'beginCaptures':
  647. '0':
  648. 'name': 'punctuation.definition.string.begin.c'
  649. 'end': '"'
  650. 'endCaptures':
  651. '0':
  652. 'name': 'punctuation.definition.string.end.c'
  653. 'name': 'string.quoted.double.c'
  654. 'patterns': [
  655. {
  656. 'include': '#string_escaped_char'
  657. }
  658. {
  659. 'include': '#string_placeholder'
  660. }
  661. {
  662. 'include': '#line_continuation_character'
  663. }
  664. ]
  665. }
  666. {
  667. 'begin': '\''
  668. 'beginCaptures':
  669. '0':
  670. 'name': 'punctuation.definition.string.begin.c'
  671. 'end': '\''
  672. 'endCaptures':
  673. '0':
  674. 'name': 'punctuation.definition.string.end.c'
  675. 'name': 'string.quoted.single.c'
  676. 'patterns': [
  677. {
  678. 'include': '#string_escaped_char'
  679. }
  680. {
  681. 'include': '#line_continuation_character'
  682. }
  683. ]
  684. }
  685. ]
  686. 'string_escaped_char':
  687. 'patterns': [
  688. {
  689. 'match': '''(?x)\\\\ (
  690. \\\\ |
  691. [abefnprtv'"?] |
  692. [0-3]\\d{,2} |
  693. [4-7]\\d? |
  694. x[a-fA-F0-9]{,2} |
  695. u[a-fA-F0-9]{,4} |
  696. U[a-fA-F0-9]{,8} )
  697. '''
  698. 'name': 'constant.character.escape.c'
  699. }
  700. {
  701. 'match': '\\\\.'
  702. 'name': 'invalid.illegal.unknown-escape.c'
  703. }
  704. ]
  705. 'string_placeholder':
  706. 'patterns': [
  707. {
  708. 'match': '''(?x) %
  709. (\\d+\\$)? # field (argument #)
  710. [#0\\- +']* # flags
  711. [,;:_]? # separator character (AltiVec)
  712. ((-?\\d+)|\\*(-?\\d+\\$)?)? # minimum field width
  713. (\\.((-?\\d+)|\\*(-?\\d+\\$)?)?)? # precision
  714. (hh|h|ll|l|j|t|z|q|L|vh|vl|v|hv|hl)? # length modifier
  715. [diouxXDOUeEfFgGaACcSspn%] # conversion type
  716. '''
  717. 'name': 'constant.other.placeholder.c'
  718. }
  719. {
  720. 'match': '(%)(?!"\\s*(PRI|SCN))'
  721. 'captures':
  722. '1':
  723. 'name': 'invalid.illegal.placeholder.c'
  724. }
  725. ]
  726. 'storage_types':
  727. 'patterns': [
  728. {
  729. 'match': '\\b(asm|__asm__|auto|bool|_Bool|char|_Complex|double|enum|float|_Imaginary|int|long|short|signed|struct|typedef|union|unsigned|void)\\b'
  730. 'name': 'storage.type.c'
  731. }
  732. ]
  733. 'vararg_ellipses':
  734. 'match': '(?<!\\.)\\.\\.\\.(?!\\.)'
  735. 'name': 'punctuation.vararg-ellipses.c'
  736. 'preprocessor-rule-conditional':
  737. 'patterns': [
  738. {
  739. 'begin': '^\\s*((#)\\s*if(?:n?def)?\\b)'
  740. 'beginCaptures':
  741. '0':
  742. 'name': 'meta.preprocessor.c'
  743. '1':
  744. 'name': 'keyword.control.directive.conditional.c'
  745. '2':
  746. 'name': 'punctuation.definition.directive.c'
  747. 'end': '^\\s*((#)\\s*endif\\b)'
  748. 'endCaptures':
  749. '0':
  750. 'name': 'meta.preprocessor.c'
  751. '1':
  752. 'name': 'keyword.control.directive.conditional.c'
  753. '2':
  754. 'name': 'punctuation.definition.directive.c'
  755. 'patterns': [
  756. {
  757. 'begin': '\\G(?=.)(?!//|/\\*(?!.*\\\\\\s*\\n))'
  758. 'end': '(?=//)|(?=/\\*(?!.*\\\\\\s*\\n))|(?<!\\\\)(?=\\n)'
  759. 'name': 'meta.preprocessor.c'
  760. 'patterns': [
  761. {
  762. 'include': '#preprocessor-rule-conditional-line'
  763. }
  764. ]
  765. }
  766. #NEVER CHANGE THE ORDER OF THE FOLLOWING INCLUDES!!!
  767. #Their order provides commenting logic
  768. {
  769. 'include': '#preprocessor-rule-enabled-elif'
  770. }
  771. {
  772. 'include': '#preprocessor-rule-enabled-else'
  773. }
  774. {
  775. 'include': '#preprocessor-rule-disabled-elif'
  776. }
  777. {
  778. 'begin': '^\\s*((#)\\s*elif\\b)'
  779. 'beginCaptures':
  780. '1':
  781. 'name': 'keyword.control.directive.conditional.c'
  782. '2':
  783. 'name': 'punctuation.definition.directive.c'
  784. 'end': '(?=//)|(?=/\\*(?!.*\\\\\\s*\\n))|(?<!\\\\)(?=\\n)'
  785. 'name': 'meta.preprocessor.c'
  786. 'patterns': [
  787. {
  788. 'include': '#preprocessor-rule-conditional-line'
  789. }
  790. ]
  791. }
  792. {
  793. 'include': '$base'
  794. }
  795. ]
  796. }
  797. {
  798. 'match': '^\\s*#\\s*(else|elif|endif)\\b'
  799. 'captures':
  800. '0':
  801. 'name': 'invalid.illegal.stray-$1.c'
  802. }
  803. ]
  804. 'preprocessor-rule-conditional-block':
  805. 'patterns': [
  806. {
  807. 'begin': '^\\s*((#)\\s*if(?:n?def)?\\b)'
  808. 'beginCaptures':
  809. '0':
  810. 'name': 'meta.preprocessor.c'
  811. '1':
  812. 'name': 'keyword.control.directive.conditional.c'
  813. '2':
  814. 'name': 'punctuation.definition.directive.c'
  815. 'end': '^\\s*((#)\\s*endif\\b)'
  816. 'endCaptures':
  817. '0':
  818. 'name': 'meta.preprocessor.c'
  819. '1':
  820. 'name': 'keyword.control.directive.conditional.c'
  821. '2':
  822. 'name': 'punctuation.definition.directive.c'
  823. 'patterns': [
  824. {
  825. 'begin': '\\G(?=.)(?!//|/\\*(?!.*\\\\\\s*\\n))'
  826. 'end': '(?=//)|(?=/\\*(?!.*\\\\\\s*\\n))|(?<!\\\\)(?=\\n)'
  827. 'name': 'meta.preprocessor.c'
  828. 'patterns': [
  829. {
  830. 'include': '#preprocessor-rule-conditional-line'
  831. }
  832. ]
  833. }
  834. {
  835. 'include': '#preprocessor-rule-enabled-elif-block'
  836. }
  837. {
  838. 'include': '#preprocessor-rule-enabled-else-block'
  839. }
  840. {
  841. 'include': '#preprocessor-rule-disabled-elif'
  842. }
  843. {
  844. 'begin': '^\\s*((#)\\s*elif\\b)'
  845. 'beginCaptures':
  846. '1':
  847. 'name': 'keyword.control.directive.conditional.c'
  848. '2':
  849. 'name': 'punctuation.definition.directive.c'
  850. 'end': '(?=//)|(?=/\\*(?!.*\\\\\\s*\\n))|(?<!\\\\)(?=\\n)'
  851. 'name': 'meta.preprocessor.c'
  852. 'patterns': [
  853. {
  854. 'include': '#preprocessor-rule-conditional-line'
  855. }
  856. ]
  857. }
  858. {
  859. 'include': '#block_innards'
  860. }
  861. ]
  862. }
  863. {
  864. 'match': '^\\s*#\\s*(else|elif|endif)\\b'
  865. 'captures':
  866. '0':
  867. 'name': 'invalid.illegal.stray-$1.c'
  868. }
  869. ]
  870. 'preprocessor-rule-conditional-line':
  871. 'patterns': [
  872. {
  873. #the valid "defined" keyword usage
  874. 'match': '(?:\\bdefined\\b\\s*$)|(?:\\bdefined\\b(?=\\s*\\(*\\s*(?:(?!defined\\b)[a-zA-Z_$][\\w$]*\\b)\\s*\\)*\\s*(?:\\n|//|/\\*|\\?|\\:|&&|\\|\\||\\\\\\s*\\n)))'
  875. 'name': 'keyword.control.directive.conditional.c'
  876. }
  877. {
  878. #consume prohibited macro names
  879. 'match': '\\bdefined\\b'
  880. 'name': 'invalid.illegal.macro-name.c'
  881. }
  882. {
  883. 'include': '#comments'
  884. }
  885. {
  886. 'include': '#strings'
  887. }
  888. {
  889. 'include': '#numbers'
  890. }
  891. {
  892. #Catch ternary operators here and implement a custom one
  893. 'begin': '\\?'
  894. 'beginCaptures':
  895. '0':
  896. 'name': 'keyword.operator.ternary.c'
  897. 'end': ':'
  898. 'endCaptures':
  899. '0':
  900. 'name': 'keyword.operator.ternary.c'
  901. 'patterns': [
  902. {
  903. 'include': '#preprocessor-rule-conditional-line'
  904. }
  905. ]
  906. }
  907. {
  908. 'include': '#operators'
  909. }
  910. {
  911. 'match': '\\b(NULL|true|false|TRUE|FALSE)\\b'
  912. 'name': 'constant.language.c'
  913. }
  914. {
  915. 'match': '[a-zA-Z_$][\\w$]*'
  916. 'name': 'entity.name.function.preprocessor.c'
  917. }
  918. {
  919. 'include': '#line_continuation_character'
  920. }
  921. {
  922. 'begin': '\\('
  923. 'beginCaptures':
  924. '0':
  925. 'name': 'punctuation.section.parens.begin.bracket.round.c'
  926. 'end': '\\)|(?=//)|(?=/\\*(?!.*\\\\\\s*\\n))|(?<!\\\\)(?=\\n)'
  927. 'endCaptures':
  928. '0':
  929. 'name': 'punctuation.section.parens.end.bracket.round.c'
  930. 'patterns': [
  931. {
  932. 'include': '#preprocessor-rule-conditional-line'
  933. }
  934. ]
  935. }
  936. ]
  937. 'preprocessor-rule-disabled':
  938. 'patterns': [
  939. {
  940. 'begin': '^\\s*((#)\\s*if\\b)(?=\\s*\\(*\\b0+\\b\\)*\\s*(?:$|//|/\\*))'
  941. 'beginCaptures':
  942. '0':
  943. 'name': 'meta.preprocessor.c'
  944. '1':
  945. 'name': 'keyword.control.directive.conditional.c'
  946. '2':
  947. 'name': 'punctuation.definition.directive.c'
  948. 'end': '^\\s*((#)\\s*endif\\b)'
  949. 'endCaptures':
  950. '0':
  951. 'name': 'meta.preprocessor.c'
  952. '1':
  953. 'name': 'keyword.control.directive.conditional.c'
  954. '2':
  955. 'name': 'punctuation.definition.directive.c'
  956. 'patterns': [
  957. {
  958. 'begin': '\\G(?=.)(?!//|/\\*(?!.*\\\\\\s*\\n))'
  959. 'end': '(?=//)|(?=/\\*(?!.*\\\\\\s*\\n))|(?=\\n)'
  960. 'name': 'meta.preprocessor.c'
  961. 'patterns': [
  962. {
  963. 'include': '#preprocessor-rule-conditional-line'
  964. }
  965. ]
  966. }
  967. {
  968. 'include': '#comments'
  969. }
  970. {
  971. 'include': '#preprocessor-rule-enabled-elif'
  972. }
  973. {
  974. 'include': '#preprocessor-rule-enabled-else'
  975. }
  976. {
  977. 'include': '#preprocessor-rule-disabled-elif'
  978. }
  979. {
  980. 'begin': '^\\s*((#)\\s*elif\\b)'
  981. 'beginCaptures':
  982. '0':
  983. 'name': 'meta.preprocessor.c'
  984. '1':
  985. 'name': 'keyword.control.directive.conditional.c'
  986. '2':
  987. 'name': 'punctuation.definition.directive.c'
  988. 'end': '(?=^\\s*((#)\\s*(?:elif|else|endif)\\b))'
  989. 'patterns': [
  990. {
  991. 'begin': '\\G(?=.)(?!//|/\\*(?!.*\\\\\\s*\\n))'
  992. 'end': '(?=//)|(?=/\\*(?!.*\\\\\\s*\\n))|(?<!\\\\)(?=\\n)'
  993. 'name': 'meta.preprocessor.c'
  994. 'patterns': [
  995. {
  996. 'include': '#preprocessor-rule-conditional-line'
  997. }
  998. ]
  999. }
  1000. {
  1001. 'include': '$base'
  1002. }
  1003. ]
  1004. }
  1005. {
  1006. 'begin': '\\n'
  1007. 'end': '(?=^\\s*((#)\\s*(?:else|elif|endif)\\b))'
  1008. 'contentName': 'comment.block.preprocessor.if-branch.c'
  1009. 'patterns': [
  1010. {
  1011. 'include': '#disabled'
  1012. }
  1013. {
  1014. 'include': '#pragma-mark'
  1015. }
  1016. ]
  1017. }
  1018. ]
  1019. }
  1020. ]
  1021. 'preprocessor-rule-disabled-block':
  1022. 'patterns': [
  1023. {
  1024. 'begin': '^\\s*((#)\\s*if\\b)(?=\\s*\\(*\\b0+\\b\\)*\\s*(?:$|//|/\\*))'
  1025. 'beginCaptures':
  1026. '0':
  1027. 'name': 'meta.preprocessor.c'
  1028. '1':
  1029. 'name': 'keyword.control.directive.conditional.c'
  1030. '2':
  1031. 'name': 'punctuation.definition.directive.c'
  1032. 'end': '^\\s*((#)\\s*endif\\b)'
  1033. 'endCaptures':
  1034. '0':
  1035. 'name': 'meta.preprocessor.c'
  1036. '1':
  1037. 'name': 'keyword.control.directive.conditional.c'
  1038. '2':
  1039. 'name': 'punctuation.definition.directive.c'
  1040. 'patterns': [
  1041. {
  1042. 'begin': '\\G(?=.)(?!//|/\\*(?!.*\\\\\\s*\\n))'
  1043. 'end': '(?=//)|(?=/\\*(?!.*\\\\\\s*\\n))|(?=\\n)'
  1044. 'name': 'meta.preprocessor.c'
  1045. 'patterns': [
  1046. {
  1047. 'include': '#preprocessor-rule-conditional-line'
  1048. }
  1049. ]
  1050. }
  1051. {
  1052. 'include': '#comments'
  1053. }
  1054. {
  1055. 'include': '#preprocessor-rule-enabled-elif-block'
  1056. }
  1057. {
  1058. 'include': '#preprocessor-rule-enabled-else-block'
  1059. }
  1060. {
  1061. 'include': '#preprocessor-rule-disabled-elif'
  1062. }
  1063. {
  1064. 'begin': '^\\s*((#)\\s*elif\\b)'
  1065. 'beginCaptures':
  1066. '0':
  1067. 'name': 'meta.preprocessor.c'
  1068. '1':
  1069. 'name': 'keyword.control.directive.conditional.c'
  1070. '2':
  1071. 'name': 'punctuation.definition.directive.c'
  1072. 'end': '(?=^\\s*((#)\\s*(?:elif|else|endif)\\b))'
  1073. 'patterns': [
  1074. {
  1075. 'begin': '\\G(?=.)(?!//|/\\*(?!.*\\\\\\s*\\n))'
  1076. 'end': '(?=//)|(?=/\\*(?!.*\\\\\\s*\\n))|(?<!\\\\)(?=\\n)'
  1077. 'name': 'meta.preprocessor.c'
  1078. 'patterns': [
  1079. {
  1080. 'include': '#preprocessor-rule-conditional-line'
  1081. }
  1082. ]
  1083. }
  1084. {
  1085. 'include': '#block_innards'
  1086. }
  1087. ]
  1088. }
  1089. {
  1090. 'begin': '\\n'
  1091. 'end': '(?=^\\s*((#)\\s*(?:else|elif|endif)\\b))'
  1092. 'contentName': 'comment.block.preprocessor.if-branch.in-block.c'
  1093. 'patterns': [
  1094. {
  1095. 'include': '#disabled'
  1096. }
  1097. {
  1098. 'include': '#pragma-mark'
  1099. }
  1100. ]
  1101. }
  1102. ]
  1103. }
  1104. ]
  1105. 'preprocessor-rule-disabled-elif':
  1106. 'begin': '^\\s*((#)\\s*elif\\b)(?=\\s*\\(*\\b0+\\b\\)*\\s*(?:$|//|/\\*))'
  1107. 'beginCaptures':
  1108. '0':
  1109. 'name': 'meta.preprocessor.c'
  1110. '1':
  1111. 'name': 'keyword.control.directive.conditional.c'
  1112. '2':
  1113. 'name': 'punctuation.definition.directive.c'
  1114. 'end': '(?=^\\s*((#)\\s*(?:elif|else|endif)\\b))'
  1115. 'patterns': [
  1116. {
  1117. 'begin': '\\G(?=.)(?!//|/\\*(?!.*\\\\\\s*\\n))'
  1118. 'end': '(?=//)|(?=/\\*(?!.*\\\\\\s*\\n))|(?<!\\\\)(?=\\n)'
  1119. 'name': 'meta.preprocessor.c'
  1120. 'patterns': [
  1121. {
  1122. 'include': '#preprocessor-rule-conditional-line'
  1123. }
  1124. ]
  1125. }
  1126. {
  1127. 'include': '#comments'
  1128. }
  1129. {
  1130. 'begin': '\\n'
  1131. 'end': '(?=^\\s*((#)\\s*(?:else|elif|endif)\\b))'
  1132. 'contentName': 'comment.block.preprocessor.elif-branch.c'
  1133. 'patterns': [
  1134. {
  1135. 'include': '#disabled'
  1136. }
  1137. {
  1138. 'include': '#pragma-mark'
  1139. }
  1140. ]
  1141. }
  1142. ]
  1143. 'preprocessor-rule-enabled':
  1144. 'patterns': [
  1145. {
  1146. 'begin': '^\\s*((#)\\s*if\\b)(?=\\s*\\(*\\b0*1\\b\\)*\\s*(?:$|//|/\\*))'
  1147. 'beginCaptures':
  1148. '0':
  1149. 'name': 'meta.preprocessor.c'
  1150. '1':
  1151. 'name': 'keyword.control.directive.conditional.c'
  1152. '2':
  1153. 'name': 'punctuation.definition.directive.c'
  1154. '3':
  1155. 'name': 'constant.numeric.preprocessor.c'
  1156. 'end': '^\\s*((#)\\s*endif\\b)'
  1157. 'endCaptures':
  1158. '0':
  1159. 'name': 'meta.preprocessor.c'
  1160. '1':
  1161. 'name': 'keyword.control.directive.conditional.c'
  1162. '2':
  1163. 'name': 'punctuation.definition.directive.c'
  1164. 'patterns': [
  1165. {
  1166. 'begin': '\\G(?=.)(?!//|/\\*(?!.*\\\\\\s*\\n))'
  1167. 'end': '(?=//)|(?=/\\*(?!.*\\\\\\s*\\n))|(?=\\n)'
  1168. 'name': 'meta.preprocessor.c'
  1169. 'patterns': [
  1170. {
  1171. 'include': '#preprocessor-rule-conditional-line'
  1172. }
  1173. ]
  1174. }
  1175. {
  1176. 'include': '#comments'
  1177. }
  1178. {
  1179. 'begin': '^\\s*((#)\\s*else\\b)'
  1180. 'beginCaptures':
  1181. '0':
  1182. 'name': 'meta.preprocessor.c'
  1183. '1':
  1184. 'name': 'keyword.control.directive.conditional.c'
  1185. '2':
  1186. 'name': 'punctuation.definition.directive.c'
  1187. 'end': '(?=^\\s*((#)\\s*endif\\b))'
  1188. 'contentName': 'comment.block.preprocessor.else-branch.c'
  1189. 'patterns': [
  1190. {
  1191. 'include': '#disabled'
  1192. }
  1193. {
  1194. 'include': '#pragma-mark'
  1195. }
  1196. ]
  1197. }
  1198. {
  1199. 'begin': '^\\s*((#)\\s*elif\\b)'
  1200. 'beginCaptures':
  1201. '0':
  1202. 'name': 'meta.preprocessor.c'
  1203. '1':
  1204. 'name': 'keyword.control.directive.conditional.c'
  1205. '2':
  1206. 'name': 'punctuation.definition.directive.c'
  1207. 'end': '(?=^\\s*((#)\\s*(?:else|elif|endif)\\b))'
  1208. 'contentName': 'comment.block.preprocessor.if-branch.c'
  1209. 'patterns': [
  1210. {
  1211. 'include': '#disabled'
  1212. }
  1213. {
  1214. 'include': '#pragma-mark'
  1215. }
  1216. ]
  1217. }
  1218. {
  1219. 'begin': '\\n'
  1220. 'end': '(?=^\\s*((#)\\s*(?:else|elif|endif)\\b))'
  1221. 'patterns': [
  1222. {
  1223. 'include': '$base'
  1224. }
  1225. ]
  1226. }
  1227. ]
  1228. }
  1229. ]
  1230. 'preprocessor-rule-enabled-block':
  1231. 'patterns': [
  1232. {
  1233. 'begin': '^\\s*((#)\\s*if\\b)(?=\\s*\\(*\\b0*1\\b\\)*\\s*(?:$|//|/\\*))'
  1234. 'beginCaptures':
  1235. '0':
  1236. 'name': 'meta.preprocessor.c'
  1237. '1':
  1238. 'name': 'keyword.control.directive.conditional.c'
  1239. '2':
  1240. 'name': 'punctuation.definition.directive.c'
  1241. 'end': '^\\s*((#)\\s*endif\\b)'
  1242. 'endCaptures':
  1243. '0':
  1244. 'name': 'meta.preprocessor.c'
  1245. '1':
  1246. 'name': 'keyword.control.directive.conditional.c'
  1247. '2':
  1248. 'name': 'punctuation.definition.directive.c'
  1249. 'patterns': [
  1250. {
  1251. 'begin': '\\G(?=.)(?!//|/\\*(?!.*\\\\\\s*\\n))'
  1252. 'end': '(?=//)|(?=/\\*(?!.*\\\\\\s*\\n))|(?=\\n)'
  1253. 'name': 'meta.preprocessor.c'
  1254. 'patterns': [
  1255. {
  1256. 'include': '#preprocessor-rule-conditional-line'
  1257. }
  1258. ]
  1259. }
  1260. {
  1261. 'include': '#comments'
  1262. }
  1263. {
  1264. 'begin': '^\\s*((#)\\s*else\\b)'
  1265. 'beginCaptures':
  1266. '0':
  1267. 'name': 'meta.preprocessor.c'
  1268. '1':
  1269. 'name': 'keyword.control.directive.conditional.c'
  1270. '2':
  1271. 'name': 'punctuation.definition.directive.c'
  1272. 'end': '(?=^\\s*((#)\\s*endif\\b))'
  1273. 'contentName': 'comment.block.preprocessor.else-branch.in-block.c'
  1274. 'patterns': [
  1275. {
  1276. 'include': '#disabled'
  1277. }
  1278. {
  1279. 'include': '#pragma-mark'
  1280. }
  1281. ]
  1282. }
  1283. {
  1284. 'begin': '^\\s*((#)\\s*elif\\b)'
  1285. 'beginCaptures':
  1286. '0':
  1287. 'name': 'meta.preprocessor.c'
  1288. '1':
  1289. 'name': 'keyword.control.directive.conditional.c'
  1290. '2':
  1291. 'name': 'punctuation.definition.directive.c'
  1292. 'end': '(?=^\\s*((#)\\s*(?:else|elif|endif)\\b))'
  1293. 'contentName': 'comment.block.preprocessor.if-branch.in-block.c'
  1294. 'patterns': [
  1295. {
  1296. 'include': '#disabled'
  1297. }
  1298. {
  1299. 'include': '#pragma-mark'
  1300. }
  1301. ]
  1302. }
  1303. {
  1304. 'begin': '\\n'
  1305. 'end': '(?=^\\s*((#)\\s*(?:else|elif|endif)\\b))'
  1306. 'patterns': [
  1307. {
  1308. 'include': '#block_innards'
  1309. }
  1310. ]
  1311. }
  1312. ]
  1313. }
  1314. ]
  1315. 'preprocessor-rule-enabled-elif':
  1316. 'begin': '^\\s*((#)\\s*elif\\b)(?=\\s*\\(*\\b0*1\\b\\)*\\s*(?:$|//|/\\*))'
  1317. 'beginCaptures':
  1318. '0':
  1319. 'name': 'meta.preprocessor.c'
  1320. '1':
  1321. 'name': 'keyword.control.directive.conditional.c'
  1322. '2':
  1323. 'name': 'punctuation.definition.directive.c'
  1324. 'end': '(?=^\\s*((#)\\s*endif\\b))'
  1325. 'patterns': [
  1326. {
  1327. 'begin': '\\G(?=.)(?!//|/\\*(?!.*\\\\\\s*\\n))'
  1328. 'end': '(?=//)|(?=/\\*(?!.*\\\\\\s*\\n))|(?<!\\\\)(?=\\n)'
  1329. 'name': 'meta.preprocessor.c'
  1330. 'patterns': [
  1331. {
  1332. 'include': '#preprocessor-rule-conditional-line'
  1333. }
  1334. ]
  1335. }
  1336. {
  1337. 'include': '#comments'
  1338. }
  1339. {
  1340. 'begin': '\\n'
  1341. 'end': '(?=^\\s*((#)\\s*(?:endif)\\b))'
  1342. 'patterns': [
  1343. {
  1344. 'begin': '^\\s*((#)\\s*(else)\\b)'
  1345. 'beginCaptures':
  1346. '0':
  1347. 'name': 'meta.preprocessor.c'
  1348. '1':
  1349. 'name': 'keyword.control.directive.conditional.c'
  1350. '2':
  1351. 'name': 'punctuation.definition.directive.c'
  1352. 'end': '(?=^\\s*((#)\\s*endif\\b))'
  1353. 'contentName': 'comment.block.preprocessor.elif-branch.c'
  1354. 'patterns': [
  1355. {
  1356. 'include': '#disabled'
  1357. }
  1358. {
  1359. 'include': '#pragma-mark'
  1360. }
  1361. ]
  1362. }
  1363. {
  1364. 'begin': '^\\s*((#)\\s*(elif)\\b)'
  1365. 'beginCaptures':
  1366. '0':
  1367. 'name': 'meta.preprocessor.c'
  1368. '1':
  1369. 'name': 'keyword.control.directive.conditional.c'
  1370. '2':
  1371. 'name': 'punctuation.definition.directive.c'
  1372. 'end': '(?=^\\s*((#)\\s*(?:else|elif|endif)\\b))'
  1373. 'contentName': 'comment.block.preprocessor.elif-branch.c'
  1374. 'patterns': [
  1375. {
  1376. 'include': '#disabled'
  1377. }
  1378. {
  1379. 'include': '#pragma-mark'
  1380. }
  1381. ]
  1382. }
  1383. {
  1384. 'include': '$base'
  1385. }
  1386. ]
  1387. }
  1388. ]
  1389. 'preprocessor-rule-enabled-elif-block':
  1390. 'begin': '^\\s*((#)\\s*elif\\b)(?=\\s*\\(*\\b0*1\\b\\)*\\s*(?:$|//|/\\*))'
  1391. 'beginCaptures':
  1392. '0':
  1393. 'name': 'meta.preprocessor.c'
  1394. '1':
  1395. 'name': 'keyword.control.directive.conditional.c'
  1396. '2':
  1397. 'name': 'punctuation.definition.directive.c'
  1398. 'end': '(?=^\\s*((#)\\s*endif\\b))'
  1399. 'patterns': [
  1400. {
  1401. 'begin': '\\G(?=.)(?!//|/\\*(?!.*\\\\\\s*\\n))'
  1402. 'end': '(?=//)|(?=/\\*(?!.*\\\\\\s*\\n))|(?<!\\\\)(?=\\n)'
  1403. 'name': 'meta.preprocessor.c'
  1404. 'patterns': [
  1405. {
  1406. 'include': '#preprocessor-rule-conditional-line'
  1407. }
  1408. ]
  1409. }
  1410. {
  1411. 'include': '#comments'
  1412. }
  1413. {
  1414. 'begin': '\\n'
  1415. 'end': '(?=^\\s*((#)\\s*(?:endif)\\b))'
  1416. 'patterns': [
  1417. {
  1418. 'begin': '^\\s*((#)\\s*(else)\\b)'
  1419. 'beginCaptures':
  1420. '0':
  1421. 'name': 'meta.preprocessor.c'
  1422. '1':
  1423. 'name': 'keyword.control.directive.conditional.c'
  1424. '2':
  1425. 'name': 'punctuation.definition.directive.c'
  1426. 'end': '(?=^\\s*((#)\\s*endif\\b))'
  1427. 'contentName': 'comment.block.preprocessor.elif-branch.in-block.c'
  1428. 'patterns': [
  1429. {
  1430. 'include': '#disabled'
  1431. }
  1432. {
  1433. 'include': '#pragma-mark'
  1434. }
  1435. ]
  1436. }
  1437. {
  1438. 'begin': '^\\s*((#)\\s*(elif)\\b)'
  1439. 'beginCaptures':
  1440. '0':
  1441. 'name': 'meta.preprocessor.c'
  1442. '1':
  1443. 'name': 'keyword.control.directive.conditional.c'
  1444. '2':
  1445. 'name': 'punctuation.definition.directive.c'
  1446. 'end': '(?=^\\s*((#)\\s*(?:else|elif|endif)\\b))'
  1447. 'contentName': 'comment.block.preprocessor.elif-branch.c'
  1448. 'patterns': [
  1449. {
  1450. 'include': '#disabled'
  1451. }
  1452. {
  1453. 'include': '#pragma-mark'
  1454. }
  1455. ]
  1456. }
  1457. {
  1458. 'include': '#block_innards'
  1459. }
  1460. ]
  1461. }
  1462. ]
  1463. 'preprocessor-rule-enabled-else':
  1464. 'begin': '^\\s*((#)\\s*else\\b)'
  1465. 'beginCaptures':
  1466. '0':
  1467. 'name': 'meta.preprocessor.c'
  1468. '1':
  1469. 'name': 'keyword.control.directive.conditional.c'
  1470. '2':
  1471. 'name': 'punctuation.definition.directive.c'
  1472. 'end': '(?=^\\s*((#)\\s*endif\\b))'
  1473. 'patterns': [
  1474. {
  1475. 'include': '$base'
  1476. }
  1477. ]
  1478. 'preprocessor-rule-enabled-else-block':
  1479. 'begin': '^\\s*((#)\\s*else\\b)'
  1480. 'beginCaptures':
  1481. '0':
  1482. 'name': 'meta.preprocessor.c'
  1483. '1':
  1484. 'name': 'keyword.control.directive.conditional.c'
  1485. '2':
  1486. 'name': 'punctuation.definition.directive.c'
  1487. 'end': '(?=^\\s*((#)\\s*endif\\b))'
  1488. 'patterns': [
  1489. {
  1490. 'include': '#block_innards'
  1491. }
  1492. ]
  1493. 'preprocessor-rule-define-line-contents':
  1494. 'patterns': [
  1495. {
  1496. 'include': '#vararg_ellipses'
  1497. }
  1498. {
  1499. # block pattern for #define lines (terminates at newline w/o line_continuation_character)
  1500. 'begin': '{'
  1501. 'beginCaptures':
  1502. '0':
  1503. 'name': 'punctuation.section.block.begin.bracket.curly.c'
  1504. 'end': '}|(?=\\s*#\\s*(?:elif|else|endif)\\b)|(?<!\\\\)(?=\\s*\\n)'
  1505. 'endCaptures':
  1506. '0':
  1507. 'name': 'punctuation.section.block.end.bracket.curly.c'
  1508. 'name': 'meta.block.c'
  1509. 'patterns': [
  1510. {
  1511. 'include': '#preprocessor-rule-define-line-blocks'
  1512. }
  1513. ]
  1514. }
  1515. {
  1516. 'match': '\\('
  1517. 'name': 'punctuation.section.parens.begin.bracket.round.c'
  1518. }
  1519. {
  1520. 'match': '\\)'
  1521. 'name': 'punctuation.section.parens.end.bracket.round.c'
  1522. }
  1523. {
  1524. # Function scope patterns for #define lines (terminates at newline w/o line_continuation_character)
  1525. # FIRST CAPTURE meta.function.c scope (provides an injectable scope, balanced parentheses and prevents unnecessary scope nesting)
  1526. 'begin': '''(?x)
  1527. (?!(?:while|for|do|if|else|switch|catch|enumerate|return|typeid|alignof|alignas|sizeof|[cr]?iterate|asm|__asm__|auto|bool|_Bool|char|_Complex|double|enum|float|_Imaginary|int|long|short|signed|struct|typedef|union|unsigned|void)\\s*\\()
  1528. (?=
  1529. (?:[A-Za-z_][A-Za-z0-9_]*+|::)++\\s*\\( # actual name
  1530. |
  1531. (?:(?<=operator)(?:[-*&<>=+!]+|\\(\\)|\\[\\]))\\s*\\(
  1532. )
  1533. '''
  1534. 'end': '(?<=\\))(?!\\w)|(?<!\\\\)(?=\\s*\\n)'
  1535. 'name': 'meta.function.c'
  1536. 'patterns': [
  1537. {
  1538. 'include': '#preprocessor-rule-define-line-functions'
  1539. }
  1540. ]
  1541. }
  1542. {
  1543. # double quoted string patterns for #define lines (terminates at newline w/o line_continuation_character)
  1544. 'begin': '"'
  1545. 'beginCaptures':
  1546. '0':
  1547. 'name': 'punctuation.definition.string.begin.c'
  1548. 'end': '"|(?<!\\\\)(?=\\s*\\n)'
  1549. 'endCaptures':
  1550. '0':
  1551. 'name': 'punctuation.definition.string.end.c'
  1552. 'name': 'string.quoted.double.c'
  1553. 'patterns': [
  1554. {
  1555. 'include': '#string_escaped_char'
  1556. }
  1557. {
  1558. 'include': '#string_placeholder'
  1559. }
  1560. {
  1561. 'include': '#line_continuation_character'
  1562. }
  1563. ]
  1564. }
  1565. {
  1566. # single quoted string patterns for #define lines (terminates at newline w/o line_continuation_character)
  1567. 'begin': '\''
  1568. 'beginCaptures':
  1569. '0':
  1570. 'name': 'punctuation.definition.string.begin.c'
  1571. 'end': '\'|(?<!\\\\)(?=\\s*\\n)'
  1572. 'endCaptures':
  1573. '0':
  1574. 'name': 'punctuation.definition.string.end.c'
  1575. 'name': 'string.quoted.single.c'
  1576. 'patterns': [
  1577. {
  1578. 'include': '#string_escaped_char'
  1579. }
  1580. {
  1581. 'include': '#line_continuation_character'
  1582. }
  1583. ]
  1584. }
  1585. {
  1586. 'include': '#access'
  1587. }
  1588. {
  1589. 'include': '#libc'
  1590. }
  1591. {
  1592. 'include': '$base'
  1593. }
  1594. ]
  1595. 'preprocessor-rule-define-line-blocks':
  1596. 'patterns': [
  1597. {
  1598. # Prevent unnecessary nesting of meta.block.c scope
  1599. 'begin': '{'
  1600. 'beginCaptures':
  1601. '0':
  1602. 'name': 'punctuation.section.block.begin.bracket.curly.c'
  1603. 'end': '}|(?=\\s*#\\s*(?:elif|else|endif)\\b)|(?<!\\\\)(?=\\s*\\n)'
  1604. 'endCaptures':
  1605. '0':
  1606. 'name': 'punctuation.section.block.end.bracket.curly.c'
  1607. 'patterns': [
  1608. {
  1609. 'include': '#preprocessor-rule-define-line-blocks'
  1610. }
  1611. {
  1612. 'include': '#preprocessor-rule-define-line-contents'
  1613. }
  1614. ]
  1615. }
  1616. {
  1617. 'include': '#preprocessor-rule-define-line-contents'
  1618. }
  1619. ]
  1620. 'preprocessor-rule-define-line-functions':
  1621. 'patterns': [
  1622. {
  1623. 'include': '#comments'
  1624. }
  1625. {
  1626. 'include': '#storage_types'
  1627. }
  1628. {
  1629. 'include': '#vararg_ellipses'
  1630. }
  1631. {
  1632. 'include': '#access'
  1633. }
  1634. {
  1635. 'include': '#operators'
  1636. }
  1637. {
  1638. # Function patterns in #define lines (terminates at newline w/o line_continuation_character)
  1639. 'begin': '''(?x)
  1640. (?!(?:while|for|do|if|else|switch|catch|enumerate|return|typeid|alignof|alignas|sizeof|[cr]?iterate)\\s*\\()
  1641. (
  1642. (?:[A-Za-z_][A-Za-z0-9_]*+|::)++ # actual name
  1643. |
  1644. (?:(?<=operator)(?:[-*&<>=+!]+|\\(\\)|\\[\\]))
  1645. )
  1646. \\s*(\\()
  1647. '''
  1648. 'beginCaptures':
  1649. '1':
  1650. 'name': 'entity.name.function.c'
  1651. '2':
  1652. 'name': 'punctuation.section.arguments.begin.bracket.round.c'
  1653. 'end': '(\\))|(?<!\\\\)(?=\\s*\\n)'
  1654. 'endCaptures':
  1655. '1':
  1656. 'name': 'punctuation.section.arguments.end.bracket.round.c'
  1657. 'patterns': [
  1658. {
  1659. 'include': '#preprocessor-rule-define-line-functions'
  1660. }
  1661. ]
  1662. }
  1663. {
  1664. # Capture parentheses (terminates at newline w/o line_continuation_character)
  1665. 'begin': '\\('
  1666. 'beginCaptures':
  1667. '0':
  1668. 'name': 'punctuation.section.parens.begin.bracket.round.c'
  1669. 'end': '(\\))|(?<!\\\\)(?=\\s*\\n)'
  1670. 'endCaptures':
  1671. '1':
  1672. 'name': 'punctuation.section.parens.end.bracket.round.c'
  1673. 'patterns': [
  1674. {
  1675. # Provides right matching of inner parentheses
  1676. 'include': '#preprocessor-rule-define-line-functions'
  1677. }
  1678. ]
  1679. }
  1680. {
  1681. 'include': '#preprocessor-rule-define-line-contents'
  1682. }
  1683. ]
  1684. 'function-innards':
  1685. 'patterns': [
  1686. {
  1687. 'include': '#comments'
  1688. }
  1689. {
  1690. 'include': '#storage_types'
  1691. }
  1692. {
  1693. 'include': '#operators'
  1694. }
  1695. {
  1696. 'include': '#vararg_ellipses'
  1697. }
  1698. {
  1699. 'begin': '''(?x)
  1700. (?!(?:while|for|do|if|else|switch|catch|enumerate|return|typeid|alignof|alignas|sizeof|[cr]?iterate)\\s*\\()
  1701. (
  1702. (?:[A-Za-z_][A-Za-z0-9_]*+|::)++ # actual name
  1703. |
  1704. (?:(?<=operator)(?:[-*&<>=+!]+|\\(\\)|\\[\\]))
  1705. )
  1706. \\s*(\\()
  1707. '''
  1708. 'beginCaptures':
  1709. '1':
  1710. 'name': 'entity.name.function.c'
  1711. '2':
  1712. 'name': 'punctuation.section.parameters.begin.bracket.round.c'
  1713. 'end': '\\)'
  1714. 'endCaptures':
  1715. '0':
  1716. 'name': 'punctuation.section.parameters.end.bracket.round.c'
  1717. 'patterns': [
  1718. {
  1719. 'include': '#function-innards'
  1720. }
  1721. ]
  1722. }
  1723. {
  1724. 'begin': '\\('
  1725. 'beginCaptures':
  1726. '0':
  1727. 'name': 'punctuation.section.parens.begin.bracket.round.c'
  1728. 'end': '\\)'
  1729. 'endCaptures':
  1730. '0':
  1731. 'name': 'punctuation.section.parens.end.bracket.round.c'
  1732. 'patterns': [
  1733. {
  1734. 'include': '#function-innards'
  1735. }
  1736. ]
  1737. }
  1738. {
  1739. 'include': '$base'
  1740. }
  1741. ]
  1742. 'function-call-innards':
  1743. 'patterns': [
  1744. {
  1745. 'include': '#comments'
  1746. }
  1747. {
  1748. 'include': '#storage_types'
  1749. }
  1750. {
  1751. 'include': '#access'
  1752. }
  1753. {
  1754. 'include': '#operators'
  1755. }
  1756. {
  1757. 'begin': '''(?x)
  1758. (?!(?:while|for|do|if|else|switch|catch|enumerate|return|typeid|alignof|alignas|sizeof|[cr]?iterate)\\s*\\()
  1759. (
  1760. (?:[A-Za-z_][A-Za-z0-9_]*+|::)++ # actual name
  1761. |
  1762. (?:(?<=operator)(?:[-*&<>=+!]+|\\(\\)|\\[\\]))
  1763. )
  1764. \\s*(\\()
  1765. '''
  1766. 'beginCaptures':
  1767. '1':
  1768. 'name': 'entity.name.function.c'
  1769. '2':
  1770. 'name': 'punctuation.section.arguments.begin.bracket.round.c'
  1771. 'end': '\\)'
  1772. 'endCaptures':
  1773. '0':
  1774. 'name': 'punctuation.section.arguments.end.bracket.round.c'
  1775. 'patterns': [
  1776. {
  1777. 'include': '#function-call-innards'
  1778. }
  1779. ]
  1780. }
  1781. {
  1782. 'begin': '\\('
  1783. 'beginCaptures':
  1784. '0':
  1785. 'name': 'punctuation.section.parens.begin.bracket.round.c'
  1786. 'end': '\\)'
  1787. 'endCaptures':
  1788. '0':
  1789. 'name': 'punctuation.section.parens.end.bracket.round.c'
  1790. 'patterns': [
  1791. {
  1792. 'include': '#function-call-innards'
  1793. }
  1794. ]
  1795. }
  1796. {
  1797. 'include': '#block_innards'
  1798. }
  1799. ]