github-linguist 5.3.3 → 6.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (460) hide show
  1. checksums.yaml +4 -4
  2. data/bin/git-linguist +5 -2
  3. data/ext/linguist/linguist.c +18 -7
  4. data/grammars/annotation.liquidhaskell.haskell.json +969 -862
  5. data/grammars/config.xcompose.json +22 -25
  6. data/grammars/file.lasso.json +296 -309
  7. data/grammars/hint.haskell.json +867 -766
  8. data/grammars/hint.message.haskell.json +867 -766
  9. data/grammars/hint.type.haskell.json +867 -766
  10. data/grammars/objdump.x86asm.json +20 -24
  11. data/grammars/source.Kotlin.json +220 -225
  12. data/grammars/source.LS.json +36 -55
  13. data/grammars/source.MCPOST.json +24 -38
  14. data/grammars/source.MOD.json +26 -41
  15. data/grammars/source.SASLog.json +9 -16
  16. data/grammars/source.abap.json +48 -56
  17. data/grammars/source.abl.json +8 -14
  18. data/grammars/source.abnf.json +88 -98
  19. data/grammars/source.actionscript.3.json +398 -429
  20. data/grammars/source.acucobol.json +5 -8
  21. data/grammars/source.ada.json +46 -53
  22. data/grammars/source.afm.json +548 -554
  23. data/grammars/source.agc.json +34 -37
  24. data/grammars/source.agda.json +79 -91
  25. data/grammars/source.ahk.json +62 -66
  26. data/grammars/source.alloy.json +16 -20
  27. data/grammars/source.ampl.json +41 -47
  28. data/grammars/source.angelscript.json +71 -80
  29. data/grammars/source.antlr.json +131 -136
  30. data/grammars/source.apache-config.json +93 -99
  31. data/grammars/source.apache-config.mod_perl.json +19 -24
  32. data/grammars/source.apl.json +1038 -1029
  33. data/grammars/source.applescript.json +501 -523
  34. data/grammars/source.apt.json +9 -16
  35. data/grammars/source.asn.json +27 -31
  36. data/grammars/source.asp.json +61 -67
  37. data/grammars/source.aspectj.json +385 -391
  38. data/grammars/source.assembly.json +49 -55
  39. data/grammars/source.ats.json +45 -121
  40. data/grammars/source.autoit.json +64 -69
  41. data/grammars/source.awk.json +172 -176
  42. data/grammars/source.ballerina.json +48 -395
  43. data/grammars/source.batchfile.json +269 -269
  44. data/grammars/source.befunge.json +17 -21
  45. data/grammars/source.bf.json +5 -11
  46. data/grammars/source.bison.json +10 -14
  47. data/grammars/source.blitzmax.json +300 -305
  48. data/grammars/source.boo.json +189 -193
  49. data/grammars/source.brightauthorproject.json +8 -13
  50. data/grammars/source.brightscript.json +37 -47
  51. data/grammars/source.bro.json +134 -140
  52. data/grammars/source.bsl.json +152 -193
  53. data/grammars/source.bsv.json +96 -102
  54. data/grammars/source.c++.json +176 -193
  55. data/grammars/source.c++.qt.json +13 -21
  56. data/grammars/source.c.ec.json +15 -21
  57. data/grammars/source.c.json +237 -251
  58. data/grammars/source.c.platform.json +153 -159
  59. data/grammars/source.c2hs.json +3 -6
  60. data/grammars/source.cabal.json +17 -20
  61. data/grammars/source.cache.cmake.json +18 -23
  62. data/grammars/source.cake.json +4 -7
  63. data/grammars/source.camlp4.ocaml.json +24 -27
  64. data/grammars/source.capnp.json +33 -38
  65. data/grammars/source.ceylon.json +44 -50
  66. data/grammars/source.cfscript.cfc.json +78 -86
  67. data/grammars/source.cfscript.json +513 -520
  68. data/grammars/source.changelogs.rpm-spec.json +8 -16
  69. data/grammars/source.chapel.json +109 -87
  70. data/grammars/source.cirru.json +25 -30
  71. data/grammars/source.clarion.json +41 -54
  72. data/grammars/source.clean.json +90 -95
  73. data/grammars/source.click.json +25 -28
  74. data/grammars/source.clips.json +10 -23
  75. data/grammars/source.clojure.json +151 -168
  76. data/grammars/source.cm.json +14 -19
  77. data/grammars/source.cmake.json +53 -61
  78. data/grammars/source.cobol.json +165 -180
  79. data/grammars/source.coffee.json +454 -462
  80. data/grammars/source.cool.json +36 -43
  81. data/grammars/source.coq.json +17 -21
  82. data/grammars/source.crystal.json +889 -983
  83. data/grammars/source.cs.json +739 -740
  84. data/grammars/source.csound-document.json +69 -73
  85. data/grammars/source.csound-score.json +52 -55
  86. data/grammars/source.csound.json +167 -171
  87. data/grammars/source.css.json +683 -688
  88. data/grammars/source.css.less.json +211 -511
  89. data/grammars/source.css.mss.json +94 -101
  90. data/grammars/source.css.postcss.sugarss.json +260 -0
  91. data/grammars/source.csx.json +4 -7
  92. data/grammars/source.cuda-c++.json +47 -81
  93. data/grammars/source.cwl.json +103 -0
  94. data/grammars/source.cython.json +536 -582
  95. data/grammars/source.d.json +243 -252
  96. data/grammars/source.dart.json +161 -166
  97. data/grammars/source.data-weave.json +901 -905
  98. data/grammars/source.desktop.json +29 -33
  99. data/grammars/source.diff.json +43 -52
  100. data/grammars/source.disasm.json +15 -16
  101. data/grammars/source.ditroff.desc.json +73 -84
  102. data/grammars/source.ditroff.json +60 -61
  103. data/grammars/source.dm.json +202 -213
  104. data/grammars/source.dmf.json +44 -47
  105. data/grammars/source.dockerfile.json +29 -34
  106. data/grammars/source.dot.json +46 -55
  107. data/grammars/source.dylan.json +63 -68
  108. data/grammars/source.ebnf.json +55 -62
  109. data/grammars/source.eiffel.json +57 -62
  110. data/grammars/source.elixir.json +321 -366
  111. data/grammars/source.emacs.lisp.json +458 -249
  112. data/grammars/source.erazor.json +49 -57
  113. data/grammars/source.erlang.json +508 -515
  114. data/grammars/source.essl.json +17 -30
  115. data/grammars/source.factor.json +85 -91
  116. data/grammars/source.fan.json +92 -96
  117. data/grammars/source.fancy.json +93 -118
  118. data/grammars/source.fish.json +74 -98
  119. data/grammars/source.fontforge.json +142 -146
  120. data/grammars/source.forth.json +42 -57
  121. data/grammars/source.fortran.json +193 -231
  122. data/grammars/source.fortran.modern.json +77 -103
  123. data/grammars/source.fsharp.fsi.json +1 -6
  124. data/grammars/source.fsharp.fsl.json +1 -6
  125. data/grammars/source.fsharp.fsx.json +1 -6
  126. data/grammars/source.fsharp.json +148 -153
  127. data/grammars/source.gap.json +60 -70
  128. data/grammars/source.gcode.json +9 -16
  129. data/grammars/source.gdb.json +63 -79
  130. data/grammars/source.gdb.session.json +27 -28
  131. data/grammars/source.gdbregs.json +7 -8
  132. data/grammars/source.gdscript.json +92 -96
  133. data/grammars/source.gerber.json +38 -56
  134. data/grammars/source.gfm.json +447 -462
  135. data/grammars/source.glsl.json +58 -83
  136. data/grammars/source.gn.json +188 -193
  137. data/grammars/source.gnuplot.json +104 -120
  138. data/grammars/source.go.json +169 -181
  139. data/grammars/source.golo.json +82 -87
  140. data/grammars/source.gosu.2.json +58 -68
  141. data/grammars/source.grace.json +266 -270
  142. data/grammars/source.graphql.json +586 -596
  143. data/grammars/source.groovy.gradle.json +18 -22
  144. data/grammars/source.groovy.json +422 -433
  145. data/grammars/source.harbour.json +129 -173
  146. data/grammars/source.haskell.json +871 -772
  147. data/grammars/source.haxe.2.json +402 -413
  148. data/grammars/source.hlsl.json +6 -16
  149. data/grammars/source.hsc2hs.json +1 -4
  150. data/grammars/source.hsig.json +871 -770
  151. data/grammars/source.hss.1.json +122 -144
  152. data/grammars/source.httpspec.json +119 -123
  153. data/grammars/source.hxml.json +8 -15
  154. data/grammars/source.ideal.json +125 -125
  155. data/grammars/source.idl-dlm.json +25 -32
  156. data/grammars/source.idl.json +59 -80
  157. data/grammars/source.idris.json +171 -185
  158. data/grammars/source.inform7.json +117 -121
  159. data/grammars/source.ini.json +37 -43
  160. data/grammars/source.io.json +65 -73
  161. data/grammars/source.ioke.json +72 -78
  162. data/grammars/source.isabelle.root.json +26 -30
  163. data/grammars/source.isabelle.theory.json +46 -50
  164. data/grammars/source.j.json +18 -21
  165. data/grammars/source.jasmin.json +45 -50
  166. data/grammars/source.java-properties.json +31 -41
  167. data/grammars/source.java.json +333 -342
  168. data/grammars/source.jcl.json +15 -18
  169. data/grammars/source.jflex.json +166 -172
  170. data/grammars/source.jison.json +331 -334
  171. data/grammars/source.jisonlex-injection.json +1 -2
  172. data/grammars/source.jisonlex.json +148 -151
  173. data/grammars/source.jolie.json +37 -43
  174. data/grammars/source.jq.json +80 -87
  175. data/grammars/source.js.json +798 -818
  176. data/grammars/source.js.jsx.json +2115 -2225
  177. data/grammars/source.js.objj.json +167 -172
  178. data/grammars/source.js.regexp.json +50 -50
  179. data/grammars/source.js.regexp.replacement.json +7 -7
  180. data/grammars/source.jsdoc.json +94 -94
  181. data/grammars/source.json.json +61 -71
  182. data/grammars/source.julia.console.json +5 -6
  183. data/grammars/source.julia.json +237 -234
  184. data/grammars/source.lean.json +55 -67
  185. data/grammars/source.lid.json +6 -10
  186. data/grammars/source.lilypond.json +181 -195
  187. data/grammars/source.lisp.json +40 -50
  188. data/grammars/source.litcoffee.json +169 -183
  189. data/grammars/source.livescript.json +207 -220
  190. data/grammars/source.llvm.json +28 -38
  191. data/grammars/source.logos.json +7 -14
  192. data/grammars/source.logtalk.json +136 -141
  193. data/grammars/source.loomscript.json +77 -83
  194. data/grammars/source.lsl.json +90 -106
  195. data/grammars/source.lua.json +100 -109
  196. data/grammars/source.makefile.json +181 -188
  197. data/grammars/source.makegen.json +3 -7
  198. data/grammars/source.mask.json +260 -265
  199. data/grammars/source.mata.json +38 -46
  200. data/grammars/source.mathematica.json +155 -167
  201. data/grammars/source.matlab.json +407 -684
  202. data/grammars/source.maxscript.json +293 -281
  203. data/grammars/source.mercury.json +179 -184
  204. data/grammars/source.meson.json +52 -58
  205. data/grammars/source.meta-info.json +64 -74
  206. data/grammars/source.ml.json +107 -113
  207. data/grammars/source.modelica.json +51 -59
  208. data/grammars/source.modula2.json +33 -42
  209. data/grammars/source.monkey.json +234 -241
  210. data/grammars/source.moonscript.json +51 -56
  211. data/grammars/source.mql5.json +74 -101
  212. data/grammars/source.mupad.json +30 -72
  213. data/grammars/source.ncl.json +1 -14
  214. data/grammars/source.ne.json +39 -42
  215. data/grammars/source.nemerle.json +58 -63
  216. data/grammars/source.nesc.json +9 -15
  217. data/grammars/source.netlinx.erb.json +13 -25
  218. data/grammars/source.netlinx.json +231 -292
  219. data/grammars/source.nextflow-groovy.json +1360 -0
  220. data/grammars/source.nextflow.json +74 -0
  221. data/grammars/source.nginx.json +274 -287
  222. data/grammars/source.nim.json +442 -483
  223. data/grammars/source.nim_filter.json +6 -26
  224. data/grammars/source.nimcfg.json +38 -51
  225. data/grammars/source.ninja.json +64 -70
  226. data/grammars/source.nit.json +60 -64
  227. data/grammars/source.nix.json +269 -273
  228. data/grammars/source.nmml.json +31 -37
  229. data/grammars/source.nsis.json +66 -72
  230. data/grammars/source.nu.json +129 -139
  231. data/grammars/source.nut.json +129 -133
  232. data/grammars/source.objc++.json +3 -10
  233. data/grammars/source.objc.json +303 -314
  234. data/grammars/source.objc.platform.json +145 -151
  235. data/grammars/source.ocaml.json +506 -514
  236. data/grammars/source.ocamllex.json +108 -115
  237. data/grammars/source.ocamlyacc.json +116 -123
  238. data/grammars/source.ooc.json +148 -155
  239. data/grammars/source.opa.json +39 -49
  240. data/grammars/source.opal.json +84 -89
  241. data/grammars/source.opalsysdefs.json +9 -13
  242. data/grammars/source.opencobol.json +22 -25
  243. data/grammars/source.opentype.json +148 -152
  244. data/grammars/source.ox.json +36 -44
  245. data/grammars/source.oz.json +31 -38
  246. data/grammars/source.p4.json +49 -59
  247. data/grammars/source.pan.json +273 -278
  248. data/grammars/source.papyrus.skyrim.json +705 -781
  249. data/grammars/source.parrot.pir.json +59 -65
  250. data/grammars/source.pascal.json +54 -61
  251. data/grammars/source.pawn.json +835 -849
  252. data/grammars/source.pcb.board.json +153 -158
  253. data/grammars/source.pcb.schematic.json +134 -138
  254. data/grammars/source.pcb.sexp.json +64 -74
  255. data/grammars/source.pep8.json +28 -32
  256. data/grammars/source.perl.6.json +83 -92
  257. data/grammars/source.perl.json +711 -737
  258. data/grammars/source.perl6fe.json +1204 -1218
  259. data/grammars/source.php.zephir.json +80 -89
  260. data/grammars/source.pic.json +137 -142
  261. data/grammars/source.pig_latin.json +76 -80
  262. data/grammars/source.pike.json +23 -36
  263. data/grammars/source.po.json +74 -84
  264. data/grammars/source.pogoscript.json +23 -29
  265. data/grammars/source.pony.json +98 -108
  266. data/grammars/source.postcss.json +370 -0
  267. data/grammars/source.postscript.json +88 -97
  268. data/grammars/source.pov-ray sdl.json +36 -42
  269. data/grammars/source.powershell.json +175 -197
  270. data/grammars/source.processing.json +236 -249
  271. data/grammars/source.prolog.eclipse.json +33 -38
  272. data/grammars/source.prolog.json +66 -72
  273. data/grammars/source.protobuf.json +88 -94
  274. data/grammars/source.puppet.json +144 -151
  275. data/grammars/source.purescript.json +268 -289
  276. data/grammars/source.pyjade.json +256 -281
  277. data/grammars/source.python.django.json +13 -18
  278. data/grammars/source.python.json +3319 -3367
  279. data/grammars/source.python.salt.json +3 -7
  280. data/grammars/source.qmake.json +83 -90
  281. data/grammars/source.qml.json +57 -78
  282. data/grammars/source.quoting.perl6fe.json +666 -669
  283. data/grammars/source.r.json +75 -84
  284. data/grammars/source.racket.json +17 -38
  285. data/grammars/source.rascal.json +77 -80
  286. data/grammars/source.reason.hover.type.json +1 -1
  287. data/grammars/source.reason.json +1025 -1080
  288. data/grammars/source.rebol.json +167 -177
  289. data/grammars/source.red.json +169 -177
  290. data/grammars/source.regexp.babel.json +74 -77
  291. data/grammars/source.regexp.extended.json +4 -5
  292. data/grammars/source.regexp.json +260 -264
  293. data/grammars/source.regexp.perl6fe.json +108 -111
  294. data/grammars/source.regexp.python.json +210 -215
  295. data/grammars/source.regexp.spin.json +63 -72
  296. data/grammars/source.renpy.json +617 -687
  297. data/grammars/source.rexx.json +25 -32
  298. data/grammars/source.ring.json +84 -114
  299. data/grammars/source.rpm-spec.json +392 -401
  300. data/grammars/source.ruby.gemfile.json +9 -12
  301. data/grammars/source.ruby.json +862 -952
  302. data/grammars/source.ruby.rspec.cucumber.steps.json +90 -103
  303. data/grammars/source.rust.json +223 -281
  304. data/grammars/source.sas.json +88 -105
  305. data/grammars/source.sass.json +100 -108
  306. data/grammars/source.sbt.json +16 -23
  307. data/grammars/source.scad.json +60 -67
  308. data/grammars/source.scala.json +215 -228
  309. data/grammars/source.scaml.json +120 -135
  310. data/grammars/source.scheme.json +119 -136
  311. data/grammars/source.scilab.json +40 -47
  312. data/grammars/source.scss.json +369 -403
  313. data/grammars/source.sdbl.json +14 -25
  314. data/grammars/source.shaderlab.json +24 -27
  315. data/grammars/source.shell.json +409 -440
  316. data/grammars/source.shen.json +75 -94
  317. data/grammars/source.smali.json +232 -293
  318. data/grammars/source.smalltalk.json +60 -75
  319. data/grammars/source.smt.json +67 -82
  320. data/grammars/source.solidity.json +35 -54
  321. data/grammars/source.sp.json +40 -45
  322. data/grammars/source.sparql.json +3 -8
  323. data/grammars/source.spin.json +277 -297
  324. data/grammars/source.sqf.json +34 -44
  325. data/grammars/source.sql.json +142 -156
  326. data/grammars/source.stan.json +201 -160
  327. data/grammars/source.stata.json +57 -68
  328. data/grammars/source.strings.json +26 -30
  329. data/grammars/source.stylus.json +558 -565
  330. data/grammars/source.supercollider.json +33 -40
  331. data/grammars/source.swift.json +999 -1077
  332. data/grammars/source.systemverilog.json +351 -365
  333. data/grammars/source.tcl.json +77 -94
  334. data/grammars/source.tea.json +61 -67
  335. data/grammars/source.terra.json +25 -32
  336. data/grammars/source.terraform.json +68 -88
  337. data/grammars/source.thrift.json +300 -306
  338. data/grammars/source.tl.json +112 -117
  339. data/grammars/source.tla.json +65 -69
  340. data/grammars/source.toc.json +21 -25
  341. data/grammars/source.toml.json +117 -122
  342. data/grammars/source.ts.json +2838 -2774
  343. data/grammars/source.tsx.json +180 -184
  344. data/grammars/source.turing.json +970 -974
  345. data/grammars/source.turtle.json +124 -140
  346. data/grammars/source.txl.json +23 -37
  347. data/grammars/source.ucfconstraints.json +16 -21
  348. data/grammars/source.ur.json +15 -27
  349. data/grammars/source.vala.json +221 -235
  350. data/grammars/source.varnish.vcl.json +117 -129
  351. data/grammars/source.vbnet.json +69 -106
  352. data/grammars/source.verilog.json +101 -107
  353. data/grammars/source.vhdl.json +437 -445
  354. data/grammars/source.viml.json +540 -550
  355. data/grammars/source.wavefront.mtl.json +274 -277
  356. data/grammars/source.wavefront.obj.json +781 -784
  357. data/grammars/source.wdl.json +66 -46
  358. data/grammars/source.webassembly.json +97 -102
  359. data/grammars/source.webidl.json +311 -326
  360. data/grammars/source.x10.json +28 -32
  361. data/grammars/source.x86asm.json +21 -26
  362. data/grammars/source.xc.json +164 -172
  363. data/grammars/source.xq.json +81 -92
  364. data/grammars/source.xtend.json +199 -208
  365. data/grammars/source.yaml-ext.json +118 -124
  366. data/grammars/source.yaml.json +155 -174
  367. data/grammars/source.yaml.salt.json +113 -116
  368. data/grammars/source.yang.json +10 -13
  369. data/grammars/source.yara.json +98 -0
  370. data/grammars/text.bibtex.json +95 -100
  371. data/grammars/text.cfml.basic.json +403 -404
  372. data/grammars/text.elixir.json +18 -23
  373. data/grammars/text.error-list.json +15 -16
  374. data/grammars/text.find-refs.json +487 -488
  375. data/grammars/text.gherkin.feature.json +45 -53
  376. data/grammars/text.haml.json +176 -189
  377. data/grammars/text.hamlc.json +82 -88
  378. data/grammars/text.html.abl.json +16 -21
  379. data/grammars/text.html.asciidoc.json +139 -153
  380. data/grammars/text.html.asdoc.json +145 -155
  381. data/grammars/text.html.asp.json +23 -28
  382. data/grammars/text.html.basic.json +323 -338
  383. data/grammars/text.html.cfm.json +316 -325
  384. data/grammars/text.html.creole.json +177 -189
  385. data/grammars/text.html.django.json +27 -33
  386. data/grammars/text.html.ecr.json +21 -25
  387. data/grammars/text.html.elixir.json +3 -9
  388. data/grammars/text.html.erb.json +81 -85
  389. data/grammars/text.html.erlang.yaws.json +24 -29
  390. data/grammars/text.html.factor.json +5 -11
  391. data/grammars/text.html.ftl.json +16 -25
  392. data/grammars/text.html.handlebars.json +579 -598
  393. data/grammars/text.html.javadoc.json +426 -0
  394. data/grammars/text.html.js.json +11 -17
  395. data/grammars/text.html.jsp.json +377 -384
  396. data/grammars/text.html.liquid.json +8 -18
  397. data/grammars/text.html.mako.json +257 -275
  398. data/grammars/text.html.markdown.source.gfm.apib.json +419 -427
  399. data/grammars/text.html.markdown.source.gfm.mson.json +405 -414
  400. data/grammars/text.html.mediawiki.json +318 -344
  401. data/grammars/text.html.php.blade.json +2134 -2140
  402. data/grammars/text.html.php.json +980 -1013
  403. data/grammars/text.html.slash.json +101 -107
  404. data/grammars/text.html.smarty.json +75 -83
  405. data/grammars/text.html.soy.json +250 -253
  406. data/grammars/text.html.ssp.json +18 -24
  407. data/grammars/text.html.tcl.json +17 -24
  408. data/grammars/text.html.twig.json +712 -718
  409. data/grammars/text.idl-idldoc.json +5 -9
  410. data/grammars/text.jade.json +213 -235
  411. data/grammars/text.junit-test-report.json +25 -28
  412. data/grammars/text.log.latex.json +44 -46
  413. data/grammars/text.marko.json +370 -401
  414. data/grammars/text.python.console.json +3 -7
  415. data/grammars/text.python.traceback.json +2 -5
  416. data/grammars/text.rdoc.json +15 -19
  417. data/grammars/text.restructuredtext.clean.json +8 -11
  418. data/grammars/text.restructuredtext.json +886 -873
  419. data/grammars/text.robot.json +26 -36
  420. data/grammars/text.roff.json +2852 -2915
  421. data/grammars/text.runoff.json +56 -69
  422. data/grammars/text.sfd.json +151 -155
  423. data/grammars/text.shell-session.json +5 -8
  424. data/grammars/text.slim.json +184 -210
  425. data/grammars/text.srt.json +54 -57
  426. data/grammars/text.tex.json +98 -105
  427. data/grammars/text.tex.latex.beamer.json +14 -20
  428. data/grammars/text.tex.latex.haskell.json +883 -782
  429. data/grammars/text.tex.latex.json +281 -291
  430. data/grammars/text.tex.latex.memoir.json +39 -46
  431. data/grammars/text.tex.latex.rd.json +32 -38
  432. data/grammars/text.xml.ant.json +62 -69
  433. data/grammars/text.xml.flex-config.json +1009 -1013
  434. data/grammars/text.xml.genshi.json +10 -16
  435. data/grammars/text.xml.json +117 -130
  436. data/grammars/text.xml.pom.json +235 -240
  437. data/grammars/text.xml.xsl.json +31 -37
  438. data/grammars/text.zone_file.json +24 -29
  439. data/lib/linguist/blob.rb +10 -1
  440. data/lib/linguist/blob_helper.rb +4 -1
  441. data/lib/linguist/file_blob.rb +5 -0
  442. data/lib/linguist/generated.rb +16 -0
  443. data/lib/linguist/heuristics.rb +23 -11
  444. data/lib/linguist/language.rb +3 -6
  445. data/lib/linguist/languages.json +1 -1
  446. data/lib/linguist/languages.yml +74 -12
  447. data/lib/linguist/lazy_blob.rb +15 -1
  448. data/lib/linguist/linguist.bundle +0 -0
  449. data/lib/linguist/samples.json +1666 -3381
  450. data/lib/linguist/shebang.rb +2 -0
  451. data/lib/linguist/strategy/modeline.rb +2 -0
  452. data/lib/linguist/vendor.yml +5 -6
  453. data/lib/linguist/version.rb +1 -1
  454. metadata +12 -11
  455. data/grammars/source.elm.json +0 -381
  456. data/grammars/source.nant-build.json +0 -86
  457. data/grammars/source.octave.json +0 -451
  458. data/grammars/text.html.mediawiki.elm-build-output.json +0 -111
  459. data/grammars/text.html.mediawiki.elm-documentation.json +0 -22
  460. data/grammars/text.html.vue.json +0 -936
@@ -1,94 +1,92 @@
1
1
  {
2
- "fileTypes": [
3
- "pir"
4
- ],
5
- "keyEquivalent": "^~P",
6
2
  "name": "Parrot PIR",
3
+ "scopeName": "source.parrot.pir",
7
4
  "patterns": [
8
5
  {
6
+ "name": "string.quoted.double.pir",
9
7
  "begin": "\"",
8
+ "end": "\"",
9
+ "patterns": [
10
+ {
11
+ "name": "constant.character.escape.pir",
12
+ "match": "\\\\."
13
+ }
14
+ ],
10
15
  "beginCaptures": {
11
16
  "0": {
12
17
  "name": "punctuation.definition.string.begin.pir"
13
18
  }
14
19
  },
15
- "end": "\"",
16
20
  "endCaptures": {
17
21
  "0": {
18
22
  "name": "punctuation.definition.string.end.pir"
19
23
  }
20
- },
21
- "name": "string.quoted.double.pir",
22
- "patterns": [
23
- {
24
- "match": "\\\\.",
25
- "name": "constant.character.escape.pir"
26
- }
27
- ]
24
+ }
28
25
  },
29
26
  {
27
+ "name": "string.quoted.single.pir",
30
28
  "begin": "'",
29
+ "end": "'",
30
+ "patterns": [
31
+ {
32
+ "name": "constant.character.escape.pir",
33
+ "match": "\\\\."
34
+ }
35
+ ],
31
36
  "beginCaptures": {
32
37
  "0": {
33
38
  "name": "punctuation.definition.string.begin.pir"
34
39
  }
35
40
  },
36
- "end": "'",
37
41
  "endCaptures": {
38
42
  "0": {
39
43
  "name": "punctuation.definition.string.end.pir"
40
44
  }
41
- },
42
- "name": "string.quoted.single.pir",
43
- "patterns": [
44
- {
45
- "match": "\\\\.",
46
- "name": "constant.character.escape.pir"
47
- }
48
- ]
45
+ }
49
46
  },
50
47
  {
51
- "match": "\\b(print|save|restore)\\b",
52
- "name": "support.function.pir"
48
+ "name": "support.function.pir",
49
+ "match": "\\b(print|save|restore)\\b"
53
50
  },
54
51
  {
55
- "match": "(if|unless|goto|\\.return|\\.end|\\.emit|\\.eot)",
56
- "name": "keyword.control.pir"
52
+ "name": "keyword.control.pir",
53
+ "match": "(if|unless|goto|\\.return|\\.end|\\.emit|\\.eot)"
57
54
  },
58
55
  {
59
- "match": "(\\.(pcc_begin|pcc_end|pcc_call|nci_call|invocant|meth_call|arg|result|pcc_begin_return|pcc_end_return|pcc_begin_yield|pcc_end_yield|yield))",
60
- "name": "keyword.control.pcc.pir"
56
+ "name": "keyword.control.pcc.pir",
57
+ "match": "(\\.(pcc_begin|pcc_end|pcc_call|nci_call|invocant|meth_call|arg|result|pcc_begin_return|pcc_end_return|pcc_begin_yield|pcc_end_yield|yield))"
61
58
  },
62
59
  {
63
- "match": "([SNIP]\\d+)",
64
- "name": "variable.other.register.pir"
60
+ "name": "variable.other.register.pir",
61
+ "match": "([SNIP]\\d+)"
65
62
  },
66
63
  {
67
- "match": "(\\$[SNIP]\\d+)",
68
- "name": "variable.other.register.symbolic.pir"
64
+ "name": "variable.other.register.symbolic.pir",
65
+ "match": "(\\$[SNIP]\\d+)"
69
66
  },
70
67
  {
71
- "comment": "Label",
72
- "match": "^\\s*(\\S+:)\\s*",
73
- "name": "keyword.other.label.pir"
68
+ "name": "keyword.other.label.pir",
69
+ "match": "^\\s*(\\S+:)\\s*"
74
70
  },
75
71
  {
76
- "match": "(int|float|string|pmc|array|\\.Array|\\.Sub)",
77
- "name": "storage.type.pir"
72
+ "name": "storage.type.pir",
73
+ "match": "(int|float|string|pmc|array|\\.Array|\\.Sub)"
78
74
  },
79
75
  {
80
- "match": "\\.(namespace|endnamespace)",
81
- "name": "storage.type.pir"
76
+ "name": "storage.type.pir",
77
+ "match": "\\.(namespace|endnamespace)"
82
78
  },
83
79
  {
84
- "match": "\\.(local|arg|lex|param|global|const)",
85
- "name": "storage.modifier.pir"
80
+ "name": "storage.modifier.pir",
81
+ "match": "\\.(local|arg|lex|param|global|const)"
86
82
  },
87
83
  {
88
- "match": "!|-|~",
89
- "name": "keyword.operator.unary.pir"
84
+ "name": "keyword.operator.unary.pir",
85
+ "match": "!|-|~"
90
86
  },
91
87
  {
88
+ "name": "meta.function.pir",
89
+ "match": "(?x)\n\t\t\t\t\\s* (\\.sub) \\s+ ([_a-zA-Z](?:[_a-zA-Z0-9]+)?)\n\t\t\t\t(?:\\s+\n\t\t\t\t\t(?: (:(?:load|init|immediate|postcomp|main|anon|lex)) #sub_pragma\n\t\t\t\t\t| (:vtable \\s* (?: \\(\"\\S+\"\\) )? ) #vtable_pragma\n\t\t\t\t\t| (:multi \\s* (?: \\( \\))? ) #multi_pragma\n\t\t\t\t\t| (:outer \\s* (?: \\( \\))? ) #outer_pragma\n\t\t\t\t\t)\\s+\n\t\t\t\t)*",
92
90
  "captures": {
93
91
  "1": {
94
92
  "name": "storage.type.sub.pir"
@@ -108,44 +106,40 @@
108
106
  "6": {
109
107
  "name": "keyword.other.outer_pragma.pir"
110
108
  }
111
- },
112
- "match": "(?x)\n\t\t\t\t\\s* (\\.sub) \\s+ ([_a-zA-Z](?:[_a-zA-Z0-9]+)?)\n\t\t\t\t(?:\\s+\n\t\t\t\t\t(?: (:(?:load|init|immediate|postcomp|main|anon|lex)) #sub_pragma\n\t\t\t\t\t| (:vtable \\s* (?: \\(\"\\S+\"\\) )? ) #vtable_pragma\n\t\t\t\t\t| (:multi \\s* (?: \\( \\))? ) #multi_pragma\n\t\t\t\t\t| (:outer \\s* (?: \\( \\))? ) #outer_pragma\n\t\t\t\t\t)\\s+\n\t\t\t\t)*",
113
- "name": "meta.function.pir"
109
+ }
114
110
  },
115
111
  {
116
- "match": "\\+|-|/|\\*\\*|\\*|%|<<|>>|<>|&&|\\|\\||~~|\\||&|~|\\.",
117
- "name": "keyword.operator.binary.pir"
112
+ "name": "keyword.operator.binary.pir",
113
+ "match": "\\+|-|/|\\*\\*|\\*|%|\u003c\u003c|\u003e\u003e|\u003c\u003e|\u0026\u0026|\\|\\||~~|\\||\u0026|~|\\."
118
114
  },
119
115
  {
120
- "match": "\\+=|-=|\\=|%=|\\*=|\\.=|&=|\\|=|~=|<<=|>>=|<>=",
121
- "name": "keyword.operator.assign.pir"
116
+ "name": "keyword.operator.assign.pir",
117
+ "match": "\\+=|-=|\\=|%=|\\*=|\\.=|\u0026=|\\|=|~=|\u003c\u003c=|\u003e\u003e=|\u003c\u003e="
122
118
  },
123
119
  {
124
120
  "begin": "(^[ \\t]+)?(?=#)",
125
- "beginCaptures": {
126
- "1": {
127
- "name": "punctuation.whitespace.comment.leading.pir"
128
- }
129
- },
130
121
  "end": "(?!\\G)",
131
122
  "patterns": [
132
123
  {
124
+ "name": "comment.line.number-sign.pir",
133
125
  "begin": "#",
126
+ "end": "\\n",
134
127
  "beginCaptures": {
135
128
  "0": {
136
129
  "name": "punctuation.definition.comment.pir"
137
130
  }
138
- },
139
- "end": "\\n",
140
- "name": "comment.line.number-sign.pir"
131
+ }
141
132
  }
142
- ]
133
+ ],
134
+ "beginCaptures": {
135
+ "1": {
136
+ "name": "punctuation.whitespace.comment.leading.pir"
137
+ }
138
+ }
143
139
  },
144
140
  {
145
- "match": "\\b([_a-zA-Z]([_a-zA-Z0-9]+)?)\\b",
146
- "name": "variable.other.identifier.pir"
141
+ "name": "variable.other.identifier.pir",
142
+ "match": "\\b([_a-zA-Z]([_a-zA-Z0-9]+)?)\\b"
147
143
  }
148
- ],
149
- "scopeName": "source.parrot.pir",
150
- "uuid": "74BEF177-5D2E-469A-BF43-441F1167AB95"
151
- }
144
+ ]
145
+ }
@@ -1,16 +1,14 @@
1
1
  {
2
- "fileTypes": [
3
- "pas",
4
- "p"
5
- ],
6
- "keyEquivalent": "^~P",
7
2
  "name": "Pascal",
3
+ "scopeName": "source.pascal",
8
4
  "patterns": [
9
5
  {
10
- "match": "\\b(?i:(absolute|abstract|all|and|and_then|array|as|asm|attribute|begin|bindable|case|class|const|constructor|destructor|div|do|downto|else|end|except|export|exports|external|far|file|finalization|finally|for|forward|generic|goto|helper|if|implementation|import|in|inherited|initialization|interface|interrupt|is|label|library|mod|module|name|near|nil|not|object|of|only|operator|or|or_else|otherwise|packed|pow|private|program|property|protected|public|published|qualified|record|repeat|resident|restricted|segment|set|specialize|shl|shr|then|to|try|type|unit|until|uses|value|var|view|virtual|while|with|xor))\\b",
11
- "name": "keyword.control.pascal"
6
+ "name": "keyword.control.pascal",
7
+ "match": "\\b(?i:(absolute|abstract|all|and|and_then|array|as|asm|attribute|begin|bindable|case|class|const|constructor|destructor|div|do|downto|else|end|except|export|exports|external|far|file|finalization|finally|for|forward|generic|goto|helper|if|implementation|import|in|inherited|initialization|interface|interrupt|is|label|library|mod|module|name|near|nil|not|object|of|only|operator|or|or_else|otherwise|packed|pow|private|program|property|protected|public|published|qualified|record|repeat|resident|restricted|segment|set|specialize|shl|shr|then|to|try|type|unit|until|uses|value|var|view|virtual|while|with|xor))\\b"
12
8
  },
13
9
  {
10
+ "name": "meta.function.prototype.pascal",
11
+ "match": "\\b(?i:(function|procedure))\\b\\s+(\\w+(\\.\\w+)?)(\\(.*?\\))?;\\s*(?=(?i:attribute|forward|external))",
14
12
  "captures": {
15
13
  "1": {
16
14
  "name": "storage.type.prototype.pascal"
@@ -18,11 +16,11 @@
18
16
  "2": {
19
17
  "name": "entity.name.function.prototype.pascal"
20
18
  }
21
- },
22
- "match": "\\b(?i:(function|procedure))\\b\\s+(\\w+(\\.\\w+)?)(\\(.*?\\))?;\\s*(?=(?i:attribute|forward|external))",
23
- "name": "meta.function.prototype.pascal"
19
+ }
24
20
  },
25
21
  {
22
+ "name": "meta.function.pascal",
23
+ "match": "\\b(?i:(function|procedure))\\b\\s+(\\w+(\\.\\w+)?)",
26
24
  "captures": {
27
25
  "1": {
28
26
  "name": "storage.type.function.pascal"
@@ -30,121 +28,116 @@
30
28
  "2": {
31
29
  "name": "entity.name.function.pascal"
32
30
  }
33
- },
34
- "match": "\\b(?i:(function|procedure))\\b\\s+(\\w+(\\.\\w+)?)",
35
- "name": "meta.function.pascal"
31
+ }
36
32
  },
37
33
  {
38
- "match": "\\b((0(x|X)[0-9a-fA-F]*)|(([0-9]+\\.?[0-9]*)|(\\.[0-9]+))((e|E)(\\+|-)?[0-9]+)?)(L|l|UL|ul|u|U|F|f|ll|LL|ull|ULL)?\\b",
39
- "name": "constant.numeric.pascal"
34
+ "name": "constant.numeric.pascal",
35
+ "match": "\\b((0(x|X)[0-9a-fA-F]*)|(([0-9]+\\.?[0-9]*)|(\\.[0-9]+))((e|E)(\\+|-)?[0-9]+)?)(L|l|UL|ul|u|U|F|f|ll|LL|ull|ULL)?\\b"
40
36
  },
41
37
  {
42
38
  "begin": "(^[ \\t]+)?(?=--)",
43
- "beginCaptures": {
44
- "1": {
45
- "name": "punctuation.whitespace.comment.leading.pascal"
46
- }
47
- },
48
39
  "end": "(?!\\G)",
49
40
  "patterns": [
50
41
  {
42
+ "name": "comment.line.double-dash.pascal.one",
51
43
  "begin": "--",
44
+ "end": "\\n",
52
45
  "beginCaptures": {
53
46
  "0": {
54
47
  "name": "punctuation.definition.comment.pascal"
55
48
  }
56
- },
57
- "end": "\\n",
58
- "name": "comment.line.double-dash.pascal.one"
49
+ }
59
50
  }
60
- ]
61
- },
62
- {
63
- "begin": "(^[ \\t]+)?(?=//)",
51
+ ],
64
52
  "beginCaptures": {
65
53
  "1": {
66
54
  "name": "punctuation.whitespace.comment.leading.pascal"
67
55
  }
68
- },
56
+ }
57
+ },
58
+ {
59
+ "begin": "(^[ \\t]+)?(?=//)",
69
60
  "end": "(?!\\G)",
70
61
  "patterns": [
71
62
  {
63
+ "name": "comment.line.double-slash.pascal.two",
72
64
  "begin": "//",
65
+ "end": "\\n",
73
66
  "beginCaptures": {
74
67
  "0": {
75
68
  "name": "punctuation.definition.comment.pascal"
76
69
  }
77
- },
78
- "end": "\\n",
79
- "name": "comment.line.double-slash.pascal.two"
70
+ }
80
71
  }
81
- ]
72
+ ],
73
+ "beginCaptures": {
74
+ "1": {
75
+ "name": "punctuation.whitespace.comment.leading.pascal"
76
+ }
77
+ }
82
78
  },
83
79
  {
80
+ "name": "comment.block.pascal.one",
84
81
  "begin": "\\(\\*",
82
+ "end": "\\*\\)",
85
83
  "captures": {
86
84
  "0": {
87
85
  "name": "punctuation.definition.comment.pascal"
88
86
  }
89
- },
90
- "end": "\\*\\)",
91
- "name": "comment.block.pascal.one"
87
+ }
92
88
  },
93
89
  {
90
+ "name": "comment.block.pascal.two",
94
91
  "begin": "\\{",
92
+ "end": "\\}",
95
93
  "captures": {
96
94
  "0": {
97
95
  "name": "punctuation.definition.comment.pascal"
98
96
  }
99
- },
100
- "end": "\\}",
101
- "name": "comment.block.pascal.two"
97
+ }
102
98
  },
103
99
  {
100
+ "name": "string.quoted.double.pascal",
104
101
  "begin": "\"",
102
+ "end": "\"",
103
+ "patterns": [
104
+ {
105
+ "name": "constant.character.escape.pascal",
106
+ "match": "\\\\."
107
+ }
108
+ ],
105
109
  "beginCaptures": {
106
110
  "0": {
107
111
  "name": "punctuation.definition.string.begin.pascal"
108
112
  }
109
113
  },
110
- "comment": "Double quoted strings are an extension and (generally) support C-style escape sequences.",
111
- "end": "\"",
112
114
  "endCaptures": {
113
115
  "0": {
114
116
  "name": "punctuation.definition.string.end.pascal"
115
117
  }
116
- },
117
- "name": "string.quoted.double.pascal",
118
- "patterns": [
119
- {
120
- "match": "\\\\.",
121
- "name": "constant.character.escape.pascal"
122
- }
123
- ]
118
+ }
124
119
  },
125
120
  {
126
- "applyEndPatternLast": 1,
121
+ "name": "string.quoted.single.pascal",
127
122
  "begin": "'",
123
+ "end": "'",
124
+ "patterns": [
125
+ {
126
+ "name": "constant.character.escape.apostrophe.pascal",
127
+ "match": "''"
128
+ }
129
+ ],
128
130
  "beginCaptures": {
129
131
  "0": {
130
132
  "name": "punctuation.definition.string.begin.pascal"
131
133
  }
132
134
  },
133
- "end": "'",
134
135
  "endCaptures": {
135
136
  "0": {
136
137
  "name": "punctuation.definition.string.end.pascal"
137
138
  }
138
139
  },
139
- "name": "string.quoted.single.pascal",
140
- "patterns": [
141
- {
142
- "match": "''",
143
- "name": "constant.character.escape.apostrophe.pascal"
144
- }
145
- ]
140
+ "applyEndPatternLast": true
146
141
  }
147
- ],
148
- "scopeName": "source.pascal",
149
- "uuid": "F42FA544-6B1C-11D9-9517-000D93589AF6"
150
- }
142
+ ]
143
+ }
@@ -1,40 +1,12 @@
1
1
  {
2
- "comment": "\n\t\t\thttps://github.com/abusalimov/SublimeCImproved\n\n\t\t\tDerived from C.tmLanguage - the original TextMate and Sublime Text\n\t\t\tsyntax definition.\n\n\t\t\tThe MIT License (MIT)\n\n\t\t\tCopyright (c) 2013-2014 Eldar Abusalimov\n\t\t\tModified for the Pawn Language by Sergei Marochkin 2016\n\n\t\t\tPermission is hereby granted, free of charge, to any person obtaining a copy of\n\t\t\tthis software and associated documentation files (the \"Software\"), to deal in\n\t\t\tthe Software without restriction, including without limitation the rights to\n\t\t\tuse, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\n\t\t\tthe Software, and to permit persons to whom the Software is furnished to do so,\n\t\t\tsubject to the following conditions:\n\n\t\t\tThe above copyright notice and this permission notice shall be included in all\n\t\t\tcopies or substantial portions of the Software.\n\n\t\t\tTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n\t\t\tIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\n\t\t\tFOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\n\t\t\tCOPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\n\t\t\tIN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\n\t\t\tCONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n\t",
3
- "fileTypes": [
4
- "p",
5
- "pwn",
6
- "inc"
7
- ],
8
- "firstLineMatch": "-[*]-( Mode:)? C -[*]-",
9
- "foldingStartMarker": "(?x)\n\t\t /\\*\\*(?!\\*)\n\t\t|^(?![^{]*?//|[^{]*?/\\*(?!.*?\\*/.*?\\{)).*?\\{\\s*($|//|/\\*(?!.*?\\*/.*\\S))\n\t",
10
- "foldingStopMarker": "(?<!\\*)\\*\\*/|^\\s*\\}",
11
- "keyEquivalent": "^~C",
12
2
  "name": "Pawn",
3
+ "scopeName": "source.pawn",
13
4
  "patterns": [
14
5
  {
15
6
  "include": "#translation_unit"
16
7
  }
17
8
  ],
18
9
  "repository": {
19
- "translation_unit": {
20
- "patterns": [
21
- {
22
- "include": "#lex"
23
- },
24
- {
25
- "include": "#function"
26
- },
27
- {
28
- "include": "#support"
29
- },
30
- {
31
- "include": "#block"
32
- },
33
- {
34
- "include": "#parens"
35
- }
36
- ]
37
- },
38
10
  "block": {
39
11
  "begin": "(?=\\{)",
40
12
  "end": "\\}",
@@ -45,9 +17,9 @@
45
17
  ]
46
18
  },
47
19
  "block-lookahead-end": {
20
+ "name": "meta.block.c",
48
21
  "begin": "\\{",
49
22
  "end": "(?=\\})",
50
- "name": "meta.block.c",
51
23
  "patterns": [
52
24
  {
53
25
  "include": "#lex"
@@ -66,67 +38,229 @@
66
38
  }
67
39
  ]
68
40
  },
69
- "parens": {
70
- "begin": "(?=\\()",
41
+ "call": {
42
+ "name": "meta.function-call.c",
43
+ "begin": "(?x)\n\t\t\t\t\\s*\n\t\t\t\t(?= # don't consume to recognize support functions\n\t\t\t\t (?: [A-Za-z_]\\w*+ | ::[^:] )++\n\t\t\t\t (?:\\s|/\\*.*?\\*/)*+ \\( )\n\t\t\t",
71
44
  "end": "\\)",
72
45
  "patterns": [
46
+ {
47
+ "include": "#lex"
48
+ },
49
+ {
50
+ "name": "variable.other.dot-access.c support.function.any-method.c",
51
+ "match": "(?:(?\u003c=\\.)|(?\u003c=-\u003e))\\b([A-Za-z_]\\w*+)\\b"
52
+ },
53
+ {
54
+ "name": "support.function.any-method.c",
55
+ "match": "(?:[A-Za-z_]\\w*+|::[^:])++"
56
+ },
73
57
  {
74
58
  "include": "#parens-lookahead-end"
75
59
  }
76
60
  ]
77
61
  },
78
- "parens-lookahead-end": {
79
- "begin": "\\(",
80
- "end": "(?=\\))",
81
- "name": "meta.parens.c",
62
+ "comment-banner-line": {
63
+ "match": "(?:(?\u003c=//)|(?\u003c=/\\*)|^)[\\s/*]*(=+\\s*(.*?)\\s*=+(?:(?=[\\s/*+\\-]*\\*/)|$(\\n?)))",
64
+ "captures": {
65
+ "1": {
66
+ "name": "meta.toc-list.banner.c"
67
+ },
68
+ "3": {
69
+ "name": "punctuation.whitespace.newline.c"
70
+ }
71
+ }
72
+ },
73
+ "comment-innards": {
82
74
  "patterns": [
83
75
  {
84
- "include": "#lex"
76
+ "include": "#comment-banner-line"
85
77
  },
86
78
  {
87
- "include": "#call"
79
+ "include": "#comment-task-tag-line"
88
80
  },
89
81
  {
90
- "include": "#support"
82
+ "include": "#lex-continuation"
91
83
  },
92
84
  {
93
- "include": "$base"
85
+ "include": "#lex-newline"
94
86
  }
95
87
  ]
96
88
  },
97
- "function": {
89
+ "comment-task-tag-line": {
98
90
  "patterns": [
99
91
  {
100
- "include": "#function-fixup-macro"
92
+ "name": "meta.toc-list.task-tag.prio-high.c",
93
+ "begin": "(?ix)\n\t\t\t\t\t (?= (?-i: @[a-zA-Z_]++ | \\b [A-Z_]++) \\b) @? \\b (?:\n\t\t\t\t\t (FIXME) | (XXX) | (WTF)\n\t\t\t\t\t ) \\b\n\t\t\t\t\t",
94
+ "end": "(?=[\\s/*]*\\*/)|(?\u003c=$\\n)",
95
+ "patterns": [
96
+ {
97
+ "include": "#comment-task-tag-line-innards"
98
+ }
99
+ ],
100
+ "beginCaptures": {
101
+ "0": {
102
+ "name": "keyword.other.task-tag.prio-high.c"
103
+ },
104
+ "1": {
105
+ "name": "storage.type.class.fixme.c"
106
+ },
107
+ "2": {
108
+ "name": "storage.type.class.xxx.c"
109
+ },
110
+ "3": {
111
+ "name": "storage.type.class.wtf.c"
112
+ }
113
+ }
101
114
  },
102
115
  {
103
- "include": "#function-declaration"
116
+ "name": "meta.toc-list.task-tag.prio-normal.c",
117
+ "begin": "(?ix)\n\t\t\t\t\t (?= (?-i: @[a-zA-Z_]++ | \\b [A-Z_]++) \\b) @? \\b (?:\n\t\t\t\t\t (TODO)\n\t\t\t\t\t ) \\b\n\t\t\t\t\t",
118
+ "end": "(?=[\\s/*]*\\*/)|(?\u003c=$\\n)",
119
+ "patterns": [
120
+ {
121
+ "include": "#comment-task-tag-line-innards"
122
+ }
123
+ ],
124
+ "beginCaptures": {
125
+ "0": {
126
+ "name": "keyword.other.task-tag.prio-normal.c"
127
+ },
128
+ "1": {
129
+ "name": "storage.type.class.todo.c"
130
+ }
131
+ }
104
132
  },
105
133
  {
106
- "include": "#function-definition"
134
+ "name": "meta.toc-list.task-tag.prio-low.c",
135
+ "begin": "(?ix)\n\t\t\t\t\t (?= (?-i: @[a-zA-Z_]++ | \\b [A-Z_]++) \\b) @? \\b (?:\n\t\t\t\t\t (TBD) | (REVIEW)\n\t\t\t\t\t ) \\b\n\t\t\t\t\t",
136
+ "end": "(?=[\\s/*]*\\*/)|(?\u003c=$\\n)",
137
+ "patterns": [
138
+ {
139
+ "include": "#comment-task-tag-line-innards"
140
+ }
141
+ ],
142
+ "beginCaptures": {
143
+ "0": {
144
+ "name": "keyword.other.task-tag.prio-low.c"
145
+ },
146
+ "1": {
147
+ "name": "storage.type.class.tbd.c"
148
+ },
149
+ "2": {
150
+ "name": "storage.type.class.review.c"
151
+ }
152
+ }
153
+ },
154
+ {
155
+ "name": "meta.toc-list.task-tag.note.c",
156
+ "begin": "(?ix)\n\t\t\t\t\t (?= (?-i: @[a-zA-Z_]++ | \\b [A-Z_]++) \\b) @? \\b (?:\n\t\t\t\t\t (NOTE) | (NB) | (CHANGED) | (IDEA) | (IMPORTANT) | (HACK) | (BUG)\n\t\t\t\t\t ) \\b\n\t\t\t\t\t",
157
+ "end": "(?=[\\s/*]*\\*/)|(?\u003c=$\\n)",
158
+ "patterns": [
159
+ {
160
+ "include": "#comment-task-tag-line-innards"
161
+ }
162
+ ],
163
+ "beginCaptures": {
164
+ "0": {
165
+ "name": "keyword.other.task-tag.note.c"
166
+ },
167
+ "1": {
168
+ "name": "storage.type.class.note.c"
169
+ },
170
+ "2": {
171
+ "name": "storage.type.class.nb.c"
172
+ },
173
+ "3": {
174
+ "name": "storage.type.class.changed.c"
175
+ },
176
+ "4": {
177
+ "name": "storage.type.class.idea.c"
178
+ },
179
+ "5": {
180
+ "name": "storage.type.class.important.c"
181
+ },
182
+ "6": {
183
+ "name": "storage.type.class.hack.c"
184
+ },
185
+ "7": {
186
+ "name": "storage.type.class.bug.c"
187
+ }
188
+ }
107
189
  }
108
190
  ]
109
191
  },
110
- "function-fixup-macro": {
111
- "begin": "(?x)\n\t\t\t\t^ # Begin of line, capital letters: most probably it is a macro\n\t\t\t\t\\s*\\b\n\t\t\t\t([A-Z0-9_]++)\n\t\t\t\t\\b\n\t\t\t\t(?= (?:\\s|/\\*.*?\\*/)*+ \\( )\n\t\t\t",
112
- "end": "\\)",
192
+ "comment-task-tag-line-innards": {
113
193
  "patterns": [
114
194
  {
115
- "include": "#lex"
195
+ "include": "#comment-task-tag-line"
116
196
  },
117
197
  {
118
- "include": "#parens-lookahead-end"
198
+ "include": "#lex-continuation"
199
+ },
200
+ {
201
+ "include": "#lex-newline"
202
+ }
203
+ ]
204
+ },
205
+ "comments": {
206
+ "patterns": [
207
+ {
208
+ "name": "comment.block.c",
209
+ "begin": "\\s*(/\\*)",
210
+ "end": "(\\*/)(\\n?)",
211
+ "patterns": [
212
+ {
213
+ "include": "#comment-innards"
214
+ }
215
+ ],
216
+ "captures": {
217
+ "1": {
218
+ "name": "punctuation.definition.comment.block.c"
219
+ }
220
+ },
221
+ "endCaptures": {
222
+ "2": {
223
+ "name": "punctuation.whitespace.newline.c"
224
+ }
225
+ }
226
+ },
227
+ {
228
+ "name": "invalid.illegal.stray-comment-end.c",
229
+ "match": "\\*/(?![/*])"
230
+ },
231
+ {
232
+ "name": "comment.line.double-slash.c++",
233
+ "begin": "\\s*(//)",
234
+ "end": "(?\u003c=$\\n)(?\u003c!\\\\$\\n)",
235
+ "patterns": [
236
+ {
237
+ "include": "#comment-innards"
238
+ }
239
+ ],
240
+ "beginCaptures": {
241
+ "1": {
242
+ "name": "punctuation.definition.comment.line.double-slash.c++"
243
+ }
244
+ }
245
+ }
246
+ ]
247
+ },
248
+ "function": {
249
+ "patterns": [
250
+ {
251
+ "include": "#function-fixup-macro"
252
+ },
253
+ {
254
+ "include": "#function-declaration"
255
+ },
256
+ {
257
+ "include": "#function-definition"
119
258
  }
120
259
  ]
121
260
  },
122
261
  "function-declaration": {
123
262
  "name": "meta.function.c",
124
- "begin": "(?x)\n\t\t\t\t(?: ^\n\t\t\t\t | (?<! (?<!\\w) new\n\t\t\t\t | (?<!\\w) (?:else|enum) | (?<!\\w) (?:class|union)\n\t\t\t\t | (?<!\\w) (?:struct|return|sizeof|typeof)\n\t\t\t\t | (?<!\\w) __typeof | (?<!\\w) __typeof__ )\n\t\t\t\t (?<= \\w ) \\s\n\n\t\t\t\t | # or type modifier / closing bracket before name\n\t\t\t\t (?<= [^&]& | [*>)}\\]] ) ) \\s*\n\n\t\t\t\t( (?: [A-Za-z_]\\w*+ | ::[^:] )++\n\t\t\t\t (?: (?<= ^ operator | \\W operator ) # C++ operator?\n\t\t\t\t (?: [-*&<>=+!]+ | \\(\\) | \\[\\] ) )? )\n\n\t\t\t\t(?= (?:\\s|/\\*.*?\\*/)*+ (?'parens' \\(\n\t\t\t\t (?> \\g'parens' |\n\t\t\t\t \t\"(\\\\.|[^\"])*\" | '(\\\\.|[^'])*' | /\\*.*?\\*/ |\n\t\t\t\t \t(?! /[/*] | [()] ) . )*\n\t\t\t\t \\) ) \\s* ; )\n\t\t\t",
125
- "beginCaptures": {
126
- "1": {
127
- "name": "entity.name.function.declaration.c"
128
- }
129
- },
263
+ "begin": "(?x)\n\t\t\t\t(?: ^\n\t\t\t\t | (?\u003c! (?\u003c!\\w) new\n\t\t\t\t | (?\u003c!\\w) (?:else|enum) | (?\u003c!\\w) (?:class|union)\n\t\t\t\t | (?\u003c!\\w) (?:struct|return|sizeof|typeof)\n\t\t\t\t | (?\u003c!\\w) __typeof | (?\u003c!\\w) __typeof__ )\n\t\t\t\t (?\u003c= \\w ) \\s\n\n\t\t\t\t | # or type modifier / closing bracket before name\n\t\t\t\t (?\u003c= [^\u0026]\u0026 | [*\u003e)}\\]] ) ) \\s*\n\n\t\t\t\t( (?: [A-Za-z_]\\w*+ | ::[^:] )++\n\t\t\t\t (?: (?\u003c= ^ operator | \\W operator ) # C++ operator?\n\t\t\t\t (?: [-*\u0026\u003c\u003e=+!]+ | \\(\\) | \\[\\] ) )? )\n\n\t\t\t\t(?= (?:\\s|/\\*.*?\\*/)*+ (?'parens' \\(\n\t\t\t\t (?\u003e \\g'parens' |\n\t\t\t\t \t\"(\\\\.|[^\"])*\" | '(\\\\.|[^'])*' | /\\*.*?\\*/ |\n\t\t\t\t \t(?! /[/*] | [()] ) . )*\n\t\t\t\t \\) ) \\s* ; )\n\t\t\t",
130
264
  "end": ";",
131
265
  "patterns": [
132
266
  {
@@ -135,16 +269,16 @@
135
269
  {
136
270
  "include": "#parens"
137
271
  }
138
- ]
139
- },
140
- "function-definition": {
141
- "name": "meta.function.c",
142
- "begin": "(?x)\n\t\t\t\t(?: ^\n\t\t\t\t | (?<! (?<!\\w) new\n\t\t\t\t | (?<!\\w) (?:else|enum) | (?<!\\w) (?:class|union)\n\t\t\t\t | (?<!\\w) (?:struct|return|sizeof|typeof)\n\t\t\t\t | (?<!\\w) __typeof | (?<!\\w) __typeof__ )\n\t\t\t\t (?<= \\w ) \\s\n\n\t\t\t\t | # or type modifier / closing bracket before name\n\t\t\t\t (?<= [^&]& | [*>)}\\]\\:] ) ) \\s*\n\n\t\t\t\t( (?: [A-Za-z_]\\w*+ | ::[^:] )++\n\t\t\t\t (?: (?<= ^ operator | \\W operator ) # C++ operator?\n\t\t\t\t (?: [-*&<>=+!]+ | \\(\\) | \\[\\] ) )? )\n\n\t\t\t\t(?= (?:\\s|/\\*.*?\\*/)*+ \\( )\n\t\t\t",
272
+ ],
143
273
  "beginCaptures": {
144
274
  "1": {
145
- "name": "entity.name.function.definition.c"
275
+ "name": "entity.name.function.declaration.c"
146
276
  }
147
- },
277
+ }
278
+ },
279
+ "function-definition": {
280
+ "name": "meta.function.c",
281
+ "begin": "(?x)\n\t\t\t\t(?: ^\n\t\t\t\t | (?\u003c! (?\u003c!\\w) new\n\t\t\t\t | (?\u003c!\\w) (?:else|enum) | (?\u003c!\\w) (?:class|union)\n\t\t\t\t | (?\u003c!\\w) (?:struct|return|sizeof|typeof)\n\t\t\t\t | (?\u003c!\\w) __typeof | (?\u003c!\\w) __typeof__ )\n\t\t\t\t (?\u003c= \\w ) \\s\n\n\t\t\t\t | # or type modifier / closing bracket before name\n\t\t\t\t (?\u003c= [^\u0026]\u0026 | [*\u003e)}\\]\\:] ) ) \\s*\n\n\t\t\t\t( (?: [A-Za-z_]\\w*+ | ::[^:] )++\n\t\t\t\t (?: (?\u003c= ^ operator | \\W operator ) # C++ operator?\n\t\t\t\t (?: [-*\u0026\u003c\u003e=+!]+ | \\(\\) | \\[\\] ) )? )\n\n\t\t\t\t(?= (?:\\s|/\\*.*?\\*/)*+ \\( )\n\t\t\t",
148
282
  "end": "\\}|;",
149
283
  "patterns": [
150
284
  {
@@ -154,99 +288,116 @@
154
288
  "include": "#parens"
155
289
  },
156
290
  {
157
- "match": "\\s*\\b(const|override)\\b",
158
- "name": "storage.modifier.c"
291
+ "name": "storage.modifier.c",
292
+ "match": "\\s*\\b(const|override)\\b"
159
293
  },
160
294
  {
161
295
  "include": "#block-lookahead-end"
162
296
  }
163
- ]
297
+ ],
298
+ "beginCaptures": {
299
+ "1": {
300
+ "name": "entity.name.function.definition.c"
301
+ }
302
+ }
164
303
  },
165
- "call": {
166
- "name": "meta.function-call.c",
167
- "begin": "(?x)\n\t\t\t\t\\s*\n\t\t\t\t(?= # don't consume to recognize support functions\n\t\t\t\t (?: [A-Za-z_]\\w*+ | ::[^:] )++\n\t\t\t\t (?:\\s|/\\*.*?\\*/)*+ \\( )\n\t\t\t",
304
+ "function-fixup-macro": {
305
+ "begin": "(?x)\n\t\t\t\t^ # Begin of line, capital letters: most probably it is a macro\n\t\t\t\t\\s*\\b\n\t\t\t\t([A-Z0-9_]++)\n\t\t\t\t\\b\n\t\t\t\t(?= (?:\\s|/\\*.*?\\*/)*+ \\( )\n\t\t\t",
168
306
  "end": "\\)",
169
307
  "patterns": [
170
308
  {
171
309
  "include": "#lex"
172
310
  },
173
- {
174
- "match": "(?:(?<=\\.)|(?<=->))\\b([A-Za-z_]\\w*+)\\b",
175
- "name": "variable.other.dot-access.c support.function.any-method.c"
176
- },
177
- {
178
- "match": "(?:[A-Za-z_]\\w*+|::[^:])++",
179
- "name": "support.function.any-method.c"
180
- },
181
311
  {
182
312
  "include": "#parens-lookahead-end"
183
313
  }
184
314
  ]
185
315
  },
186
- "preprocessor": {
187
- "begin": "(?=^\\s*(#))",
188
- "end": "(?!^\\s*(#))",
316
+ "lex": {
189
317
  "patterns": [
190
318
  {
191
- "include": "#ppline-directive-invalid-usage"
319
+ "include": "#lex-in-preprocessor"
192
320
  },
193
321
  {
194
- "include": "#ppline-macro"
195
- },
322
+ "include": "#preprocessor"
323
+ }
324
+ ]
325
+ },
326
+ "lex-constant": {
327
+ "patterns": [
196
328
  {
197
- "include": "#ppline-undef"
198
- },
199
- {
200
- "include": "#ppline-pragma-mark"
201
- },
329
+ "match": "\\s*\\b(true|false|TRUE|FALSE)\\b",
330
+ "captures": {
331
+ "1": {
332
+ "name": "constant.language.c"
333
+ }
334
+ }
335
+ }
336
+ ]
337
+ },
338
+ "lex-continuation": {
339
+ "patterns": [
202
340
  {
203
- "include": "#ppline-include"
341
+ "name": "punctuation.separator.continuation.c",
342
+ "match": "(\\\\)$(\\n?)",
343
+ "captures": {
344
+ "1": {
345
+ "name": "keyword.other.line-continuation.c"
346
+ },
347
+ "2": {
348
+ "name": "punctuation.whitespace.newline.c"
349
+ }
350
+ }
204
351
  },
205
352
  {
206
- "include": "#ppline-error"
207
- },
353
+ "match": "\\\\(\\s+?)(?=\\n)$",
354
+ "captures": {
355
+ "1": {
356
+ "name": "invalid.deprecated.space-after-continuation.c"
357
+ }
358
+ }
359
+ }
360
+ ]
361
+ },
362
+ "lex-core": {
363
+ "patterns": [
208
364
  {
209
- "include": "#ppline-directive"
365
+ "include": "#comments"
210
366
  },
211
367
  {
212
- "include": "#ppline-directive-obsolete"
368
+ "include": "#lex-continuation"
213
369
  },
214
370
  {
215
- "include": "#ppline-directive-emit"
371
+ "include": "#lex-newline"
216
372
  },
217
373
  {
218
- "include": "#ppline-invalid"
374
+ "include": "#lex-number"
219
375
  },
220
376
  {
221
- "include": "#ppline-any"
377
+ "include": "#lex-string"
222
378
  }
223
379
  ]
224
380
  },
225
- "preprocessor-lex": {
381
+ "lex-in-preprocessor": {
226
382
  "patterns": [
227
383
  {
228
- "include": "#comments"
384
+ "include": "#lex-core"
229
385
  },
230
386
  {
231
- "include": "#lex-continuation"
387
+ "include": "#lex-keyword"
232
388
  },
233
389
  {
234
- "include": "#lex-newline"
390
+ "include": "#support-keyword"
391
+ },
392
+ {
393
+ "include": "#lex-constant"
235
394
  }
236
395
  ]
237
396
  },
238
- "ppline-macro": {
239
- "begin": "^\\s*(#)(?=\\s*(define)\\s+[a-zA-Z_]\\w*+)",
240
- "beginCaptures": {
241
- "0": {
242
- "name": "keyword.other.preprocessor.c"
243
- }
244
- },
245
- "end": "(?<=$\\n)(?<!\\\\$\\n)",
246
- "name": "meta.preprocessor.macro.c",
397
+ "lex-keyword": {
247
398
  "patterns": [
248
399
  {
249
- "match": "\\s*(##)",
400
+ "match": "\\s*\\b(defined)\\b",
250
401
  "captures": {
251
402
  "1": {
252
403
  "name": "keyword.other.preprocessor.c"
@@ -254,206 +405,386 @@
254
405
  }
255
406
  },
256
407
  {
257
- "match": "\\s*(#)\\s*([a-zA-Z_]\\w*+)",
408
+ "match": "\\s*\\b(sizeof|tagof)\\b",
258
409
  "captures": {
259
410
  "1": {
260
- "name": "keyword.other.preprocessor.c"
261
- },
262
- "2": {
263
- "name": "string.macro.stringify.c"
411
+ "name": "keyword.operator.c"
264
412
  }
265
413
  }
266
414
  },
267
415
  {
268
- "include": "#ppline-macro-head-function"
416
+ "match": "(Iterator:)(\\t)",
417
+ "captures": {
418
+ "2": {
419
+ "name": "invalid.illegal.invalid-indentation"
420
+ }
421
+ }
269
422
  },
270
423
  {
271
- "include": "#ppline-macro-head-object"
424
+ "begin": "^\\s*(case)\\s+",
425
+ "end": "(:)|(?\u003c=^|[^\\\\])\\s*(\\n)",
426
+ "patterns": [
427
+ {
428
+ "include": "#lex-core"
429
+ }
430
+ ],
431
+ "beginCaptures": {
432
+ "1": {
433
+ "name": "keyword.control.c"
434
+ }
435
+ },
436
+ "endCaptures": {
437
+ "1": {
438
+ "name": "keyword.operator.ternary.c"
439
+ }
440
+ }
272
441
  },
273
442
  {
274
- "include": "#ppline-macro-param"
443
+ "match": "\\s*\\b(assert|break|case|continue|default|do|else|exit|for|goto|if|return|sleep|state|switch|while)\\b",
444
+ "captures": {
445
+ "1": {
446
+ "name": "keyword.control.c"
447
+ }
448
+ }
275
449
  },
276
450
  {
277
- "include": "#lex-in-preprocessor"
451
+ "match": "\\s*\\b(new|enum)\\b",
452
+ "captures": {
453
+ "1": {
454
+ "name": "storage.type.c"
455
+ }
456
+ }
278
457
  },
279
458
  {
280
- "include": "#support"
281
- }
282
- ]
283
- },
284
- "ppline-macro-head-object": {
285
- "match": "(?<!##)(?<=#)(\\s*define)\\s+([a-zA-Z_]\\w*+)(?!\\()[\\s&&[^\\n]]*",
286
- "captures": {
287
- "1": {
288
- "name": "keyword.other.preprocessor.define.c"
289
- },
290
- "2": {
291
- "name": "entity.name.constant.preprocessor.c"
292
- }
293
- }
294
- },
295
- "ppline-macro-head-function": {
296
- "begin": "(?<!##)(?<=#)(\\s*define)\\s+([a-zA-Z_]\\w*+)(\\()",
297
- "beginCaptures": {
298
- "1": {
299
- "name": "keyword.other.preprocessor.define.c"
300
- },
301
- "2": {
302
- "name": "entity.name.function.preprocessor.c"
459
+ "match": "\\s*\\b(public|forward|native|char|const|static|stock|hook|task|ptask)\\b",
460
+ "captures": {
461
+ "1": {
462
+ "name": "storage.modifier.c"
463
+ }
464
+ }
303
465
  },
304
- "3": {
305
- "name": "meta.preprocessor.macro.parameters.c"
306
- }
307
- },
308
- "end": "(?<=\\))|(?<=^|[^\\\\])\\s*(\\n)?",
309
- "endCaptures": {
310
- "1": {
311
- "name": "invalid.illegal.unexpected-end-of-line.c"
312
- }
313
- },
314
- "contentName": "meta.preprocessor.macro.parameters.c",
315
- "patterns": [
316
466
  {
317
- "include": "#ppline-macro-param"
318
- }
319
- ]
320
- },
321
- "ppline-macro-param": {
322
- "match": "(%[0-9]+)",
323
- "captures": {
324
- "1": {
325
- "name": "variable.parameter.c"
326
- }
327
- }
328
- },
329
- "ppline-undef": {
330
- "begin": "(^\\s*(#)\\s*(undef))\\s+([a-zA-Z_]\\w*+)",
331
- "beginCaptures": {
332
- "1": {
333
- "name": "keyword.other.preprocessor.c"
467
+ "name": "storage.modifier.c",
468
+ "match": "([A-Za-z_]\\w*)\\:"
334
469
  },
335
- "4": {
336
- "name": "variable.macro.undef.c"
337
- }
338
- },
339
- "end": "(?<=$\\n)(?<!\\\\$\\n)",
340
- "name": "meta.preprocessor.undef.c",
341
- "patterns": [
342
-
343
- ]
344
- },
345
- "ppline-include": {
346
- "begin": "^\\s*(#)\\s*(include|tryinclude)\\b",
347
- "beginCaptures": {
348
- "0": {
349
- "name": "keyword.other.preprocessor.include.c"
350
- }
351
- },
352
- "end": "(?:(\"[^\"]*?)|(<[^>]*?))(\\n)|(?<=$\\n)(?<!\\\\$\\n)",
353
- "endCaptures": {
354
- "1": {
355
- "name": "string.quoted.double.include.c"
470
+ {
471
+ "name": "keyword.operator.assignment.c",
472
+ "match": "(\\-|\\+|\\*|\\/|%|\u0026|\\||\\^|\u003c\u003c|\u003e\u003e)?="
356
473
  },
357
- "2": {
358
- "name": "string.quoted.other.lt-gt.include.c"
474
+ {
475
+ "name": "keyword.operator.comparison.c",
476
+ "match": "(==|!=|\u003c=|\u003e=|\u003c\u003e|\u003c|\u003e)"
359
477
  },
360
- "3": {
361
- "name": "invalid.illegal.unexpected-end-of-line.c"
362
- }
363
- },
364
- "name": "meta.preprocessor.include.c meta.preprocessor.c.include",
365
- "patterns": [
366
478
  {
367
- "include": "#ppline-include-innards"
368
- }
369
- ]
370
- },
371
- "ppline-include-innards": {
372
- "patterns": [
479
+ "name": "keyword.operator.increment-decrement.c",
480
+ "match": "(\\-\\-|\\+\\+)"
481
+ },
373
482
  {
374
- "include": "#preprocessor-lex"
483
+ "name": "keyword.operator.ternary.c",
484
+ "match": "(\\?|:)"
375
485
  },
376
486
  {
377
- "begin": "\"|(?=.*?\")",
378
- "beginCaptures": {
379
- "0": {
380
- "name": "punctuation.definition.string.begin.c"
381
- }
382
- },
383
- "end": "\"|(?<=^|[^\\\\])(?=\\s*\\n)",
384
- "endCaptures": {
385
- "0": {
386
- "name": "punctuation.definition.string.end.c"
387
- }
388
- },
389
- "name": "string.quoted.double.include.c"
487
+ "name": "keyword.operator.arithmetic.c",
488
+ "match": "(\\-|\\+|\\*|\\/|%)"
390
489
  },
391
490
  {
392
- "begin": "<(?=.*?>)",
393
- "beginCaptures": {
394
- "0": {
395
- "name": "punctuation.definition.string.begin.c"
396
- }
397
- },
398
- "end": ">|(?<=^|[^\\\\])(?=\\s*\\n)",
399
- "endCaptures": {
400
- "0": {
401
- "name": "punctuation.definition.string.end.c"
402
- }
403
- },
404
- "name": "string.quoted.other.lt-gt.include.c"
491
+ "name": "keyword.operator.logical.c",
492
+ "match": "(!|\u0026\u0026|\\|\\|)"
405
493
  },
406
494
  {
407
- "begin": "\\(",
408
- "end": "\\)|(?<=^|[^\\\\])(?=\\s*\\n)",
409
- "name": "meta.parens.c",
410
- "patterns": [
411
- {
412
- "include": "#ppline-include-innards"
413
- }
414
- ]
495
+ "name": "keyword.operator.bitwise.c",
496
+ "match": "(~|\u0026|\\||\\^|\u003c\u003c|\u003e\u003e)"
415
497
  }
416
498
  ]
417
499
  },
418
- "ppline-error": {
419
- "begin": "^\\s*(#)\\s*(error|warning)\\b",
420
- "beginCaptures": {
421
- "0": {
422
- "name": "keyword.other.preprocessor.include.c"
423
- }
424
- },
425
- "end": "(.*)|(?<=$\\n)(?<!\\\\$\\n)",
426
- "endCaptures": {
427
- "1": {
428
- "name": "string.quoted.double.c"
429
- }
430
- },
431
- "name": "meta.preprocessor.include.c meta.preprocessor.c.include"
500
+ "lex-newline": {
501
+ "name": "punctuation.whitespace.newline.c",
502
+ "match": "$\\n"
432
503
  },
433
- "ppline-pragma-mark": {
434
- "begin": "(^\\s*(#)\\s*(pragma\\s+(align|amxlimit|amxram|codepage|compress|ctrlchar|deprecated|dynamic|library|overlay|pack|rational|semicolon|tabsize|unused))\\b)[\\s&&[^\\n]]*",
435
- "beginCaptures": {
436
- "1": {
437
- "name": "keyword.other.preprocessor.pragma.c"
438
- }
439
- },
440
- "end": "(?<=$\\n)(?<!\\\\$\\n)",
441
- "name": "meta.preprocessor.directive.c",
504
+ "lex-number": {
442
505
  "patterns": [
443
506
  {
444
- "include": "#lex-core"
507
+ "match": "([0-9]+)(\\.{2})([0-9]+)",
508
+ "captures": {
509
+ "1": {
510
+ "name": "constant.numeric.integer.decimal.c"
511
+ },
512
+ "2": {
513
+ "name": "keyword.operator.switch-range.c"
514
+ },
515
+ "3": {
516
+ "name": "constant.numeric.integer.decimal.c"
517
+ }
518
+ }
519
+ },
520
+ {
521
+ "name": "constant.numeric.float.hexadecimal.c",
522
+ "match": "(?ix) # hexadecimal float\n\t\t\t\t\t\t(?\u003c!\\.) \\b\n\n\t\t\t\t\t\t(0x)\n\n\t\t\t\t\t\t# significand\n\t\t\t\t\t\t(?: (\\.) (?=p) # invalid\n\t\t\t\t\t\t | [0-9a-f]*+ ([0-9a-z]*?) [0-9a-f]*+\n\t\t\t\t\t\t (?: \\. [0-9a-f]*+ ([0-9a-z.]*?) [0-9a-f]*+ )? )\n\n\t\t\t\t\t\t# exponent (required)\n\t\t\t\t\t\t(?: (p) (?: [+\\-] [0-9]++ ([0-9a-z]*?)\n\t\t\t\t\t\t | (?=[0-9a-z.]) [0-9]*+ ([0-9a-z.]*?) )\n\t\t\t\t\t\t | (p) )\n\n\t\t\t\t\t\t# remaining valid chars and type\n\t\t\t\t\t\t[0-9]*+ ([fl]?)\n\n\t\t\t\t\t\t\\b (?!\\.)\n\t\t\t\t\t",
523
+ "captures": {
524
+ "1": {
525
+ "name": "storage.type.number.prefix.hexadecimal.c"
526
+ },
527
+ "2": {
528
+ "name": "invalid.illegal.number.missing-fragment.significand.c"
529
+ },
530
+ "3": {
531
+ "name": "invalid.illegal.numeric-literal-character.float.whole-number.c"
532
+ },
533
+ "4": {
534
+ "name": "invalid.illegal.numeric-literal-character.float.fraction.c"
535
+ },
536
+ "5": {
537
+ "name": "keyword.other.exponent.hexadecimal.c"
538
+ },
539
+ "6": {
540
+ "name": "invalid.illegal.numeric-literal-character.float.exponent.c"
541
+ },
542
+ "7": {
543
+ "name": "invalid.illegal.numeric-literal-character.float.exponent.c"
544
+ },
545
+ "8": {
546
+ "name": "invalid.illegal.number.missing-fragment.exponent.c"
547
+ },
548
+ "9": {
549
+ "name": "storage.type.number.suffix.float.c"
550
+ }
551
+ }
552
+ },
553
+ {
554
+ "name": "constant.numeric.float.hexadecimal.c",
555
+ "match": "(?ix) # hexadecimal float without required exponent\n\t\t\t\t\t\t(?\u003c!\\.) \\b\n\n\t\t\t\t\t\t(0x)\n\n\t\t\t\t\t\t# significand (at least a period)\n\t\t\t\t\t\t [0-9a-f]*+ ([0-9a-z\u0026\u0026[^p]]*?) [0-9a-f]*+\n\t\t\t\t\t\t(\\.) [0-9a-f]*+ ([0-9a-z.\u0026\u0026[^p]]*?) [0-9a-f]*+\n\n\t\t\t\t\t\t# type\n\t\t\t\t\t\t(l?)\n\n\t\t\t\t\t\t(?:(?\u003c=\\.)|\\b) (?!\\.)\n\t\t\t\t\t",
556
+ "captures": {
557
+ "1": {
558
+ "name": "storage.type.number.prefix.hexadecimal.c"
559
+ },
560
+ "2": {
561
+ "name": "invalid.illegal.numeric-literal-character.float.whole-number.c"
562
+ },
563
+ "3": {
564
+ "name": "invalid.illegal.number.hexadecimal-float-requires-exponent.c"
565
+ },
566
+ "4": {
567
+ "name": "invalid.illegal.numeric-literal-character.float.fraction.c"
568
+ },
569
+ "5": {
570
+ "name": "storage.type.number.suffix.float.c"
571
+ }
572
+ }
573
+ },
574
+ {
575
+ "name": "constant.numeric.float.c",
576
+ "match": "(?ix) # decimal float literal\n\t\t\t\t\t\t(?\u003c!\\.) (?:(?=\\.)|\\b)\n\n\t\t\t\t\t\t(?!0x)\n\t\t\t\t\t\t# significand\n\t\t\t\t\t\t(?: (?: [0-9]++ ([0-9a-z\u0026\u0026[^e]]*?) [0-9]*+ )?\n\t\t\t\t\t\t \\. [0-9]++ ([0-9a-z.\u0026\u0026[^e]]*?) [0-9]*+\n\n\t\t\t\t\t\t | [0-9]++ ([0-9a-z\u0026\u0026[^e]]*?) [0-9]*+ (?: \\. | (?=e)) )\n\n\t\t\t\t\t\t# exponent (optional)\n\t\t\t\t\t\t(?: (e) (?: [+\\-] [0-9]++ ([0-9a-z]*?)\n\t\t\t\t\t\t | [0-9]++ ([0-9a-z.]*?) )\n\t\t\t\t\t\t | ( p [+\\-]? [0-9]++\n\t\t\t\t\t\t | [ep] [0-9a-z.]*?) )?\n\n\t\t\t\t\t\t# any invalid chars and type\n\t\t\t\t\t\t([0-9a-z]*?) [0-9]*+ ([fl]?)\n\n\t\t\t\t\t\t(?:(?\u003c=\\.)|\\b) (?!\\.)\n\t\t\t\t\t",
577
+ "captures": {
578
+ "1": {
579
+ "name": "invalid.illegal.numeric-literal-character.float.whole-number.c"
580
+ },
581
+ "2": {
582
+ "name": "invalid.illegal.numeric-literal-character.float.fraction.c"
583
+ },
584
+ "3": {
585
+ "name": "invalid.illegal.numeric-literal-character.float.whole-number.c"
586
+ },
587
+ "4": {
588
+ "name": "keyword.other.exponent.decimal.c"
589
+ },
590
+ "5": {
591
+ "name": "invalid.illegal.numeric-literal-character.float.exponent.c"
592
+ },
593
+ "6": {
594
+ "name": "invalid.illegal.numeric-literal-character.float.exponent.c"
595
+ },
596
+ "7": {
597
+ "name": "invalid.illegal.numeric-literal-character.float.exponent.c"
598
+ },
599
+ "8": {
600
+ "name": "invalid.illegal.numeric-literal-character.float.exponent.c"
601
+ },
602
+ "9": {
603
+ "name": "storage.type.number.suffix.float.c"
604
+ }
605
+ }
606
+ },
607
+ {
608
+ "name": "constant.numeric.integer.zero.c",
609
+ "match": "(?ix)\n\t\t\t\t\t\t(?\u003c!\\.) \\b\n\t\t\t\t\t\t(0x)? 0++\n\t\t\t\t\t\t(u?l{0,2}|lul?|llu)\n\t\t\t\t\t\t\\b (?!\\.)\n\t\t\t\t\t",
610
+ "captures": {
611
+ "1": {
612
+ "name": "storage.type.number.prefix.hexadecimal.c"
613
+ },
614
+ "2": {
615
+ "name": "storage.type.number.suffix.c"
616
+ }
617
+ }
618
+ },
619
+ {
620
+ "name": "invalid.illegal.invalid-number-literal.c",
621
+ "match": "(?ix)\n\t\t\t\t\t\t(?\u003c!\\.) \\b\n\n\t\t\t\t\t\t(?: (0x) | (0b) )\n\t\t\t\t\t\t(u?l{0,2}|lul?|llu)\n\n\t\t\t\t\t\t\\b (?!\\.)\n\t\t\t\t\t"
622
+ },
623
+ {
624
+ "name": "constant.numeric.integer.hexadecimal.c",
625
+ "match": "(?ix)\n\t\t\t\t\t\t(?\u003c!\\.) \\b\n\n\t\t\t\t\t\t(0x) [0-9a-f]++\n\n\t\t\t\t\t\t# any invalid chars\n\t\t\t\t\t\t([0-9a-z]*?)\n\n\t\t\t\t\t\t# the remainder (after invalid chars, if any) and a type\n\t\t\t\t\t\t[0-9a-f]* (u?l{0,2}|lul?|llu)\n\n\t\t\t\t\t\t\\b (?!\\.)\n\t\t\t\t\t",
626
+ "captures": {
627
+ "1": {
628
+ "name": "storage.type.number.prefix.hexadecimal.c"
629
+ },
630
+ "2": {
631
+ "name": "invalid.illegal.numeric-literal-character.integer.c"
632
+ },
633
+ "3": {
634
+ "name": "storage.type.number.suffix.c"
635
+ }
636
+ }
637
+ },
638
+ {
639
+ "name": "constant.numeric.integer.binary.c",
640
+ "match": "(?ix)\n\t\t\t\t\t\t(?\u003c!\\.) \\b\n\n\t\t\t\t\t\t(0b) [01]++\n\n\t\t\t\t\t\t# any invalid chars\n\t\t\t\t\t\t([0-9a-z]*?)\n\n\t\t\t\t\t\t# the remainder (after invalid chars, if any) and a type\n\t\t\t\t\t\t[01]* (u?l{0,2}|lul?|llu)\n\n\t\t\t\t\t\t\\b (?!\\.)\n\t\t\t\t\t",
641
+ "captures": {
642
+ "1": {
643
+ "name": "storage.type.number.prefix.binary.c"
644
+ },
645
+ "2": {
646
+ "name": "invalid.illegal.numeric-literal-character.integer.c"
647
+ },
648
+ "3": {
649
+ "name": "storage.type.number.suffix.c"
650
+ }
651
+ }
652
+ },
653
+ {
654
+ "name": "constant.numeric.integer.octal.c",
655
+ "match": "(?ix)\n\t\t\t\t\t\t(?\u003c!\\.) \\b\n\n\t\t\t\t\t\t(0) [0-7]++\n\n\t\t\t\t\t\t# any invalid chars\n\t\t\t\t\t\t([0-9a-z]*?)\n\n\t\t\t\t\t\t# the remainder (after invalid chars, if any) and a type\n\t\t\t\t\t\t[0-7]* (u?l{0,2}|lul?|llu)\n\n\t\t\t\t\t\t\\b (?!\\.)\n\t\t\t\t\t",
656
+ "captures": {
657
+ "1": {
658
+ "name": "storage.type.number.prefix.octal.c"
659
+ },
660
+ "2": {
661
+ "name": "invalid.illegal.numeric-literal-character.integer.c"
662
+ },
663
+ "3": {
664
+ "name": "storage.type.number.suffix.c"
665
+ }
666
+ }
667
+ },
668
+ {
669
+ "name": "constant.numeric.integer.decimal.c",
670
+ "match": "(?ix)\n\t\t\t\t\t\t\\b\n\n\t\t\t\t\t\t[0-9][0-9_]*\n\n\t\t\t\t\t\t# any invalid chars\n\t\t\t\t\t\t([0-9a-z]*?)\n\n\t\t\t\t\t\t# the remainder (after invalid chars, if any) and a type\n\t\t\t\t\t\t[0-9]* (u?l{0,2}|lul?|llu)\n\n\t\t\t\t\t\t\\b\n\t\t\t\t\t",
671
+ "captures": {
672
+ "1": {
673
+ "name": "invalid.illegal.numeric-literal-character.integer.c"
674
+ },
675
+ "2": {
676
+ "name": "storage.type.number.suffix.c"
677
+ }
678
+ }
445
679
  }
446
680
  ]
447
681
  },
448
- "ppline-directive": {
449
- "begin": "^\\s*(#)\\s*(if|elseif|else|endif|pragma|line|define|undef|section|assert|file|endinput|endscript)\\b",
682
+ "lex-string": {
683
+ "patterns": [
684
+ {
685
+ "name": "string.quoted.double.c",
686
+ "begin": "\"",
687
+ "end": "(\")|(?\u003c=^|[^\\\\])\\s*(\\n)",
688
+ "patterns": [
689
+ {
690
+ "include": "#lex-continuation"
691
+ },
692
+ {
693
+ "include": "#string_escaped_char"
694
+ },
695
+ {
696
+ "include": "#string_placeholder"
697
+ }
698
+ ],
699
+ "beginCaptures": {
700
+ "0": {
701
+ "name": "punctuation.definition.string.begin.c"
702
+ }
703
+ },
704
+ "endCaptures": {
705
+ "1": {
706
+ "name": "punctuation.definition.string.end.c"
707
+ },
708
+ "2": {
709
+ "name": "invalid.illegal.unexpected-end-of-line.c"
710
+ }
711
+ }
712
+ },
713
+ {
714
+ "name": "string.quoted.single.c",
715
+ "begin": "'",
716
+ "end": "(')|(?\u003c=^|[^\\\\])\\s*(\\n)",
717
+ "patterns": [
718
+ {
719
+ "include": "#lex-continuation"
720
+ },
721
+ {
722
+ "include": "#string_escaped_char"
723
+ }
724
+ ],
725
+ "beginCaptures": {
726
+ "0": {
727
+ "name": "punctuation.definition.string.begin.c"
728
+ }
729
+ },
730
+ "endCaptures": {
731
+ "1": {
732
+ "name": "punctuation.definition.string.end.c"
733
+ },
734
+ "2": {
735
+ "name": "invalid.illegal.unexpected-end-of-line.c"
736
+ }
737
+ }
738
+ }
739
+ ]
740
+ },
741
+ "parens": {
742
+ "begin": "(?=\\()",
743
+ "end": "\\)",
744
+ "patterns": [
745
+ {
746
+ "include": "#parens-lookahead-end"
747
+ }
748
+ ]
749
+ },
750
+ "parens-lookahead-end": {
751
+ "name": "meta.parens.c",
752
+ "begin": "\\(",
753
+ "end": "(?=\\))",
754
+ "patterns": [
755
+ {
756
+ "include": "#lex"
757
+ },
758
+ {
759
+ "include": "#call"
760
+ },
761
+ {
762
+ "include": "#support"
763
+ },
764
+ {
765
+ "include": "$base"
766
+ }
767
+ ]
768
+ },
769
+ "ppline-any": {
770
+ "name": "meta.preprocessor.directive.null-directive.c",
771
+ "begin": "^\\s*(#)",
772
+ "end": "(?\u003c=$\\n)(?\u003c!\\\\$\\n)",
773
+ "patterns": [
774
+ {
775
+ "include": "#lex-core"
776
+ }
777
+ ],
450
778
  "beginCaptures": {
451
779
  "0": {
452
780
  "name": "keyword.other.preprocessor.c"
453
781
  }
454
- },
455
- "end": "(?<=$\\n)(?<!\\\\$\\n)",
782
+ }
783
+ },
784
+ "ppline-directive": {
456
785
  "name": "meta.preprocessor.directive.c",
786
+ "begin": "^\\s*(#)\\s*(if|elseif|else|endif|pragma|line|define|undef|section|assert|file|endinput|endscript)\\b",
787
+ "end": "(?\u003c=$\\n)(?\u003c!\\\\$\\n)",
457
788
  "patterns": [
458
789
  {
459
790
  "include": "#lex-core"
@@ -461,10 +792,25 @@
461
792
  {
462
793
  "include": "#lex-in-preprocessor"
463
794
  }
464
- ]
795
+ ],
796
+ "beginCaptures": {
797
+ "0": {
798
+ "name": "keyword.other.preprocessor.c"
799
+ }
800
+ }
465
801
  },
466
802
  "ppline-directive-emit": {
803
+ "name": "meta.preprocessor.directive.emit.c",
467
804
  "begin": "(?x)\n\t\t\t\t^\\s*(\\#|@)\\s*(emit) #pre-processor directive\n\t\t\t\t(\\s+\n\t\t\t\t\t([A-Z0-9a-z]+)\n\t\t\t\t\t(\n\t\t\t\t\t\t(\\.)([A-Za-z]+)\n\t\t\t\t\t\t((\\.)([A-Za-z]+))?\n\t\t\t\t\t)?\n\t\t\t\t|\\s*)\n\t\t\t",
805
+ "end": "(?\u003c=$\\n)(?\u003c!\\\\$\\n)",
806
+ "patterns": [
807
+ {
808
+ "include": "#lex-core"
809
+ },
810
+ {
811
+ "include": "#lex-in-preprocessor"
812
+ }
813
+ ],
468
814
  "beginCaptures": {
469
815
  "1": {
470
816
  "name": "keyword.other.preprocessor.c"
@@ -481,19 +827,10 @@
481
827
  "7": {
482
828
  "name": "entity.name.function.preprocessor.c"
483
829
  }
484
- },
485
- "end": "(?<=$\\n)(?<!\\\\$\\n)",
486
- "name": "meta.preprocessor.directive.emit.c",
487
- "patterns": [
488
- {
489
- "include": "#lex-core"
490
- },
491
- {
492
- "include": "#lex-in-preprocessor"
493
- }
494
- ]
830
+ }
495
831
  },
496
832
  "ppline-directive-invalid-usage": {
833
+ "name": "meta.preprocessor.directive.c",
497
834
  "match": "(^\\s*(#)\\s*(if|elseif|pragma|define|undef|include|tryinclude)\\b)\\s*?(\\n|$)",
498
835
  "captures": {
499
836
  "1": {
@@ -502,707 +839,356 @@
502
839
  "4": {
503
840
  "name": "invalid.illegal.invalid-usage-of-preprocessor-directive.c"
504
841
  }
505
- },
506
- "name": "meta.preprocessor.directive.c"
507
- },
508
- "ppline-invalid": {
509
- "begin": "^\\s*(#)(?!\\s*(?=/[/*]|(?>\\\\\\s*\\n)|\\n|$))\\s*(\\w*)",
510
- "end": "(?<=$\\n)(?<!\\\\$\\n)",
511
- "beginCaptures": {
512
- "1": {
513
- "name": "keyword.other.preprocessor.c"
514
- },
515
- "2": {
516
- "name": "invalid.illegal.preprocessor.c"
517
- }
518
- },
519
- "name": "meta.preprocessor.directive.illegal.c"
842
+ }
520
843
  },
521
- "ppline-any": {
522
- "begin": "^\\s*(#)",
844
+ "ppline-error": {
845
+ "name": "meta.preprocessor.include.c meta.preprocessor.c.include",
846
+ "begin": "^\\s*(#)\\s*(error|warning)\\b",
847
+ "end": "(.*)|(?\u003c=$\\n)(?\u003c!\\\\$\\n)",
523
848
  "beginCaptures": {
524
849
  "0": {
525
- "name": "keyword.other.preprocessor.c"
850
+ "name": "keyword.other.preprocessor.include.c"
526
851
  }
527
852
  },
528
- "end": "(?<=$\\n)(?<!\\\\$\\n)",
529
- "name": "meta.preprocessor.directive.null-directive.c",
530
- "patterns": [
531
- {
532
- "include": "#lex-core"
533
- }
534
- ]
535
- },
536
- "support": {
537
- "patterns": [
538
- {
539
- "include": "#support-modifier"
540
- },
541
- {
542
- "include": "#support-keyword"
543
- }
544
- ]
545
- },
546
- "support-modifier": {
547
- "patterns": [
548
- {
549
- "match": "\\s*\\b(inline|using)\\b",
550
- "captures": {
551
- "1": {
552
- "name": "storage.modifier.c"
553
- }
554
- }
555
- }
556
- ]
557
- },
558
- "support-keyword": {
559
- "patterns": [
560
- {
561
- "match": "\\s*\\b(foreach)\\b",
562
- "captures": {
563
- "1": {
564
- "name": "keyword.control.c"
565
- }
566
- }
853
+ "endCaptures": {
854
+ "1": {
855
+ "name": "string.quoted.double.c"
567
856
  }
568
- ]
857
+ }
569
858
  },
570
- "comments": {
859
+ "ppline-include": {
860
+ "name": "meta.preprocessor.include.c meta.preprocessor.c.include",
861
+ "begin": "^\\s*(#)\\s*(include|tryinclude)\\b",
862
+ "end": "(?:(\"[^\"]*?)|(\u003c[^\u003e]*?))(\\n)|(?\u003c=$\\n)(?\u003c!\\\\$\\n)",
571
863
  "patterns": [
572
864
  {
573
- "begin": "\\s*(/\\*)",
574
- "captures": {
575
- "1": {
576
- "name": "punctuation.definition.comment.block.c"
577
- }
578
- },
579
- "end": "(\\*/)(\\n?)",
580
- "endCaptures": {
581
- "2": {
582
- "name": "punctuation.whitespace.newline.c"
583
- }
584
- },
585
- "name": "comment.block.c",
586
- "patterns": [
587
- {
588
- "include": "#comment-innards"
589
- }
590
- ]
591
- },
592
- {
593
- "match": "\\*/(?![/*])",
594
- "name": "invalid.illegal.stray-comment-end.c"
595
- },
596
- {
597
- "begin": "\\s*(//)",
598
- "beginCaptures": {
599
- "1": {
600
- "name": "punctuation.definition.comment.line.double-slash.c++"
601
- }
602
- },
603
- "end": "(?<=$\\n)(?<!\\\\$\\n)",
604
- "name": "comment.line.double-slash.c++",
605
- "patterns": [
606
- {
607
- "include": "#comment-innards"
608
- }
609
- ]
865
+ "include": "#ppline-include-innards"
610
866
  }
611
- ]
612
- },
613
- "comment-innards": {
614
- "patterns": [
615
- {
616
- "include": "#comment-banner-line"
617
- },
618
- {
619
- "include": "#comment-task-tag-line"
620
- },
621
- {
622
- "include": "#lex-continuation"
623
- },
624
- {
625
- "include": "#lex-newline"
867
+ ],
868
+ "beginCaptures": {
869
+ "0": {
870
+ "name": "keyword.other.preprocessor.include.c"
626
871
  }
627
- ]
628
- },
629
- "comment-banner-line": {
630
- "match": "(?:(?<=//)|(?<=/\\*)|^)[\\s/*]*(=+\\s*(.*?)\\s*=+(?:(?=[\\s/*+\\-]*\\*/)|$(\\n?)))",
631
- "captures": {
872
+ },
873
+ "endCaptures": {
632
874
  "1": {
633
- "name": "meta.toc-list.banner.c"
875
+ "name": "string.quoted.double.include.c"
876
+ },
877
+ "2": {
878
+ "name": "string.quoted.other.lt-gt.include.c"
634
879
  },
635
880
  "3": {
636
- "name": "punctuation.whitespace.newline.c"
881
+ "name": "invalid.illegal.unexpected-end-of-line.c"
637
882
  }
638
883
  }
639
884
  },
640
- "comment-task-tag-line": {
885
+ "ppline-include-innards": {
641
886
  "patterns": [
642
887
  {
643
- "begin": "(?ix)\n\t\t\t\t\t (?= (?-i: @[a-zA-Z_]++ | \\b [A-Z_]++) \\b) @? \\b (?:\n\t\t\t\t\t (FIXME) | (XXX) | (WTF)\n\t\t\t\t\t ) \\b\n\t\t\t\t\t",
644
- "beginCaptures": {
645
- "0": {
646
- "name": "keyword.other.task-tag.prio-high.c"
647
- },
648
- "1": {
649
- "name": "storage.type.class.fixme.c"
650
- },
651
- "2": {
652
- "name": "storage.type.class.xxx.c"
653
- },
654
- "3": {
655
- "name": "storage.type.class.wtf.c"
656
- }
657
- },
658
- "end": "(?=[\\s/*]*\\*/)|(?<=$\\n)",
659
- "name": "meta.toc-list.task-tag.prio-high.c",
660
- "patterns": [
661
- {
662
- "include": "#comment-task-tag-line-innards"
663
- }
664
- ]
888
+ "include": "#preprocessor-lex"
665
889
  },
666
890
  {
667
- "begin": "(?ix)\n\t\t\t\t\t (?= (?-i: @[a-zA-Z_]++ | \\b [A-Z_]++) \\b) @? \\b (?:\n\t\t\t\t\t (TODO)\n\t\t\t\t\t ) \\b\n\t\t\t\t\t",
891
+ "name": "string.quoted.double.include.c",
892
+ "begin": "\"|(?=.*?\")",
893
+ "end": "\"|(?\u003c=^|[^\\\\])(?=\\s*\\n)",
668
894
  "beginCaptures": {
669
895
  "0": {
670
- "name": "keyword.other.task-tag.prio-normal.c"
671
- },
672
- "1": {
673
- "name": "storage.type.class.todo.c"
896
+ "name": "punctuation.definition.string.begin.c"
674
897
  }
675
898
  },
676
- "end": "(?=[\\s/*]*\\*/)|(?<=$\\n)",
677
- "name": "meta.toc-list.task-tag.prio-normal.c",
678
- "patterns": [
679
- {
680
- "include": "#comment-task-tag-line-innards"
681
- }
682
- ]
683
- },
684
- {
685
- "begin": "(?ix)\n\t\t\t\t\t (?= (?-i: @[a-zA-Z_]++ | \\b [A-Z_]++) \\b) @? \\b (?:\n\t\t\t\t\t (TBD) | (REVIEW)\n\t\t\t\t\t ) \\b\n\t\t\t\t\t",
686
- "beginCaptures": {
899
+ "endCaptures": {
687
900
  "0": {
688
- "name": "keyword.other.task-tag.prio-low.c"
689
- },
690
- "1": {
691
- "name": "storage.type.class.tbd.c"
692
- },
693
- "2": {
694
- "name": "storage.type.class.review.c"
695
- }
696
- },
697
- "end": "(?=[\\s/*]*\\*/)|(?<=$\\n)",
698
- "name": "meta.toc-list.task-tag.prio-low.c",
699
- "patterns": [
700
- {
701
- "include": "#comment-task-tag-line-innards"
901
+ "name": "punctuation.definition.string.end.c"
702
902
  }
703
- ]
903
+ }
704
904
  },
705
905
  {
706
- "begin": "(?ix)\n\t\t\t\t\t (?= (?-i: @[a-zA-Z_]++ | \\b [A-Z_]++) \\b) @? \\b (?:\n\t\t\t\t\t (NOTE) | (NB) | (CHANGED) | (IDEA) | (IMPORTANT) | (HACK) | (BUG)\n\t\t\t\t\t ) \\b\n\t\t\t\t\t",
906
+ "name": "string.quoted.other.lt-gt.include.c",
907
+ "begin": "\u003c(?=.*?\u003e)",
908
+ "end": "\u003e|(?\u003c=^|[^\\\\])(?=\\s*\\n)",
707
909
  "beginCaptures": {
708
910
  "0": {
709
- "name": "keyword.other.task-tag.note.c"
710
- },
711
- "1": {
712
- "name": "storage.type.class.note.c"
713
- },
714
- "2": {
715
- "name": "storage.type.class.nb.c"
716
- },
717
- "3": {
718
- "name": "storage.type.class.changed.c"
719
- },
720
- "4": {
721
- "name": "storage.type.class.idea.c"
722
- },
723
- "5": {
724
- "name": "storage.type.class.important.c"
725
- },
726
- "6": {
727
- "name": "storage.type.class.hack.c"
728
- },
729
- "7": {
730
- "name": "storage.type.class.bug.c"
911
+ "name": "punctuation.definition.string.begin.c"
731
912
  }
732
913
  },
733
- "end": "(?=[\\s/*]*\\*/)|(?<=$\\n)",
734
- "name": "meta.toc-list.task-tag.note.c",
914
+ "endCaptures": {
915
+ "0": {
916
+ "name": "punctuation.definition.string.end.c"
917
+ }
918
+ }
919
+ },
920
+ {
921
+ "name": "meta.parens.c",
922
+ "begin": "\\(",
923
+ "end": "\\)|(?\u003c=^|[^\\\\])(?=\\s*\\n)",
735
924
  "patterns": [
736
925
  {
737
- "include": "#comment-task-tag-line-innards"
926
+ "include": "#ppline-include-innards"
738
927
  }
739
928
  ]
740
929
  }
741
930
  ]
742
931
  },
743
- "comment-task-tag-line-innards": {
744
- "patterns": [
745
- {
746
- "include": "#comment-task-tag-line"
747
- },
748
- {
749
- "include": "#lex-continuation"
932
+ "ppline-invalid": {
933
+ "name": "meta.preprocessor.directive.illegal.c",
934
+ "begin": "^\\s*(#)(?!\\s*(?=/[/*]|(?\u003e\\\\\\s*\\n)|\\n|$))\\s*(\\w*)",
935
+ "end": "(?\u003c=$\\n)(?\u003c!\\\\$\\n)",
936
+ "beginCaptures": {
937
+ "1": {
938
+ "name": "keyword.other.preprocessor.c"
750
939
  },
751
- {
752
- "include": "#lex-newline"
940
+ "2": {
941
+ "name": "invalid.illegal.preprocessor.c"
753
942
  }
754
- ]
943
+ }
755
944
  },
756
- "lex": {
945
+ "ppline-macro": {
946
+ "name": "meta.preprocessor.macro.c",
947
+ "begin": "^\\s*(#)(?=\\s*(define)\\s+[a-zA-Z_]\\w*+)",
948
+ "end": "(?\u003c=$\\n)(?\u003c!\\\\$\\n)",
757
949
  "patterns": [
758
950
  {
759
- "include": "#lex-in-preprocessor"
951
+ "match": "\\s*(##)",
952
+ "captures": {
953
+ "1": {
954
+ "name": "keyword.other.preprocessor.c"
955
+ }
956
+ }
760
957
  },
761
958
  {
762
- "include": "#preprocessor"
763
- }
764
- ]
765
- },
766
- "lex-in-preprocessor": {
767
- "patterns": [
959
+ "match": "\\s*(#)\\s*([a-zA-Z_]\\w*+)",
960
+ "captures": {
961
+ "1": {
962
+ "name": "keyword.other.preprocessor.c"
963
+ },
964
+ "2": {
965
+ "name": "string.macro.stringify.c"
966
+ }
967
+ }
968
+ },
768
969
  {
769
- "include": "#lex-core"
970
+ "include": "#ppline-macro-head-function"
770
971
  },
771
972
  {
772
- "include": "#lex-keyword"
973
+ "include": "#ppline-macro-head-object"
773
974
  },
774
975
  {
775
- "include": "#support-keyword"
976
+ "include": "#ppline-macro-param"
776
977
  },
777
978
  {
778
- "include": "#lex-constant"
979
+ "include": "#lex-in-preprocessor"
980
+ },
981
+ {
982
+ "include": "#support"
779
983
  }
780
- ]
984
+ ],
985
+ "beginCaptures": {
986
+ "0": {
987
+ "name": "keyword.other.preprocessor.c"
988
+ }
989
+ }
781
990
  },
782
- "lex-core": {
991
+ "ppline-macro-head-function": {
992
+ "contentName": "meta.preprocessor.macro.parameters.c",
993
+ "begin": "(?\u003c!##)(?\u003c=#)(\\s*define)\\s+([a-zA-Z_]\\w*+)(\\()",
994
+ "end": "(?\u003c=\\))|(?\u003c=^|[^\\\\])\\s*(\\n)?",
783
995
  "patterns": [
784
996
  {
785
- "include": "#comments"
786
- },
787
- {
788
- "include": "#lex-continuation"
789
- },
790
- {
791
- "include": "#lex-newline"
997
+ "include": "#ppline-macro-param"
998
+ }
999
+ ],
1000
+ "beginCaptures": {
1001
+ "1": {
1002
+ "name": "keyword.other.preprocessor.define.c"
792
1003
  },
793
- {
794
- "include": "#lex-number"
1004
+ "2": {
1005
+ "name": "entity.name.function.preprocessor.c"
795
1006
  },
796
- {
797
- "include": "#lex-string"
1007
+ "3": {
1008
+ "name": "meta.preprocessor.macro.parameters.c"
798
1009
  }
799
- ]
1010
+ },
1011
+ "endCaptures": {
1012
+ "1": {
1013
+ "name": "invalid.illegal.unexpected-end-of-line.c"
1014
+ }
1015
+ }
800
1016
  },
801
- "lex-continuation": {
802
- "patterns": [
803
- {
804
- "match": "(\\\\)$(\\n?)",
805
- "name": "punctuation.separator.continuation.c",
806
- "captures": {
807
- "1": {
808
- "name": "keyword.other.line-continuation.c"
809
- },
810
- "2": {
811
- "name": "punctuation.whitespace.newline.c"
812
- }
813
- }
1017
+ "ppline-macro-head-object": {
1018
+ "match": "(?\u003c!##)(?\u003c=#)(\\s*define)\\s+([a-zA-Z_]\\w*+)(?!\\()[\\s\u0026\u0026[^\\n]]*",
1019
+ "captures": {
1020
+ "1": {
1021
+ "name": "keyword.other.preprocessor.define.c"
814
1022
  },
815
- {
816
- "match": "\\\\(\\s+?)(?=\\n)$",
817
- "captures": {
818
- "1": {
819
- "name": "invalid.deprecated.space-after-continuation.c"
820
- }
821
- }
1023
+ "2": {
1024
+ "name": "entity.name.constant.preprocessor.c"
822
1025
  }
823
- ]
1026
+ }
824
1027
  },
825
- "lex-newline": {
826
- "match": "$\\n",
827
- "name": "punctuation.whitespace.newline.c"
1028
+ "ppline-macro-param": {
1029
+ "match": "(%[0-9]+)",
1030
+ "captures": {
1031
+ "1": {
1032
+ "name": "variable.parameter.c"
1033
+ }
1034
+ }
828
1035
  },
829
- "lex-keyword": {
1036
+ "ppline-pragma-mark": {
1037
+ "name": "meta.preprocessor.directive.c",
1038
+ "begin": "(^\\s*(#)\\s*(pragma\\s+(align|amxlimit|amxram|codepage|compress|ctrlchar|deprecated|dynamic|library|overlay|pack|rational|semicolon|tabsize|unused))\\b)[\\s\u0026\u0026[^\\n]]*",
1039
+ "end": "(?\u003c=$\\n)(?\u003c!\\\\$\\n)",
830
1040
  "patterns": [
831
1041
  {
832
- "match": "\\s*\\b(defined)\\b",
833
- "captures": {
834
- "1": {
835
- "name": "keyword.other.preprocessor.c"
836
- }
837
- }
1042
+ "include": "#lex-core"
1043
+ }
1044
+ ],
1045
+ "beginCaptures": {
1046
+ "1": {
1047
+ "name": "keyword.other.preprocessor.pragma.c"
1048
+ }
1049
+ }
1050
+ },
1051
+ "ppline-undef": {
1052
+ "name": "meta.preprocessor.undef.c",
1053
+ "begin": "(^\\s*(#)\\s*(undef))\\s+([a-zA-Z_]\\w*+)",
1054
+ "end": "(?\u003c=$\\n)(?\u003c!\\\\$\\n)",
1055
+ "beginCaptures": {
1056
+ "1": {
1057
+ "name": "keyword.other.preprocessor.c"
838
1058
  },
1059
+ "4": {
1060
+ "name": "variable.macro.undef.c"
1061
+ }
1062
+ }
1063
+ },
1064
+ "preprocessor": {
1065
+ "begin": "(?=^\\s*(#))",
1066
+ "end": "(?!^\\s*(#))",
1067
+ "patterns": [
839
1068
  {
840
- "match": "\\s*\\b(sizeof|tagof)\\b",
841
- "captures": {
842
- "1": {
843
- "name": "keyword.operator.c"
844
- }
845
- }
1069
+ "include": "#ppline-directive-invalid-usage"
846
1070
  },
847
1071
  {
848
- "match": "(Iterator:)(\\t)",
849
- "captures": {
850
- "2": {
851
- "name": "invalid.illegal.invalid-indentation"
852
- }
853
- }
1072
+ "include": "#ppline-macro"
854
1073
  },
855
1074
  {
856
- "begin": "^\\s*(case)\\s+",
857
- "beginCaptures": {
858
- "1": {
859
- "name": "keyword.control.c"
860
- }
861
- },
862
- "end": "(:)|(?<=^|[^\\\\])\\s*(\\n)",
863
- "endCaptures": {
864
- "1": {
865
- "name": "keyword.operator.ternary.c"
866
- }
867
- },
868
- "patterns": [
869
- {
870
- "include": "#lex-core"
871
- }
872
- ]
1075
+ "include": "#ppline-undef"
873
1076
  },
874
1077
  {
875
- "match": "\\s*\\b(assert|break|case|continue|default|do|else|exit|for|goto|if|return|sleep|state|switch|while)\\b",
876
- "captures": {
877
- "1": {
878
- "name": "keyword.control.c"
879
- }
880
- }
1078
+ "include": "#ppline-pragma-mark"
881
1079
  },
882
1080
  {
883
- "match": "\\s*\\b(new|enum)\\b",
884
- "captures": {
885
- "1": {
886
- "name": "storage.type.c"
887
- }
888
- }
1081
+ "include": "#ppline-include"
889
1082
  },
890
1083
  {
891
- "match": "\\s*\\b(public|forward|native|char|const|static|stock|hook|task|ptask)\\b",
892
- "captures": {
893
- "1": {
894
- "name": "storage.modifier.c"
895
- }
896
- }
1084
+ "include": "#ppline-error"
897
1085
  },
898
1086
  {
899
- "match": "([A-Za-z_]\\w*)\\:",
900
- "name": "storage.modifier.c"
1087
+ "include": "#ppline-directive"
901
1088
  },
902
1089
  {
903
- "match": "(\\-|\\+|\\*|\\/|%|&|\\||\\^|<<|>>)?=",
904
- "name": "keyword.operator.assignment.c"
1090
+ "include": "#ppline-directive-obsolete"
905
1091
  },
906
1092
  {
907
- "match": "(==|!=|<=|>=|<>|<|>)",
908
- "name": "keyword.operator.comparison.c"
1093
+ "include": "#ppline-directive-emit"
909
1094
  },
910
1095
  {
911
- "match": "(\\-\\-|\\+\\+)",
912
- "name": "keyword.operator.increment-decrement.c"
1096
+ "include": "#ppline-invalid"
913
1097
  },
914
1098
  {
915
- "match": "(\\?|:)",
916
- "name": "keyword.operator.ternary.c"
917
- },
1099
+ "include": "#ppline-any"
1100
+ }
1101
+ ]
1102
+ },
1103
+ "preprocessor-lex": {
1104
+ "patterns": [
918
1105
  {
919
- "match": "(\\-|\\+|\\*|\\/|%)",
920
- "name": "keyword.operator.arithmetic.c"
1106
+ "include": "#comments"
921
1107
  },
922
1108
  {
923
- "match": "(!|&&|\\|\\|)",
924
- "name": "keyword.operator.logical.c"
1109
+ "include": "#lex-continuation"
925
1110
  },
926
1111
  {
927
- "match": "(~|&|\\||\\^|<<|>>)",
928
- "name": "keyword.operator.bitwise.c"
1112
+ "include": "#lex-newline"
929
1113
  }
930
1114
  ]
931
1115
  },
932
- "lex-constant": {
1116
+ "string_escaped_char": {
933
1117
  "patterns": [
934
1118
  {
935
- "match": "\\s*\\b(true|false|TRUE|FALSE)\\b",
936
- "captures": {
937
- "1": {
938
- "name": "constant.language.c"
939
- }
940
- }
1119
+ "name": "constant.character.escape.c",
1120
+ "match": "\\\\(\\\\|[abefnprtv'\"?]|[0-3]\\d{0,2}|[4-7]\\d?|x[a-fA-F0-9]{0,2}|u[a-fA-F0-9]{0,4}|U[a-fA-F0-9]{0,8})"
1121
+ },
1122
+ {
1123
+ "name": "invalid.illegal.unknown-escape.c",
1124
+ "match": "\\\\."
941
1125
  }
942
1126
  ]
943
1127
  },
944
- "lex-number": {
1128
+ "string_placeholder": {
945
1129
  "patterns": [
946
1130
  {
947
- "match": "([0-9]+)(\\.{2})([0-9]+)",
948
- "captures": {
949
- "1": {
950
- "name": "constant.numeric.integer.decimal.c"
951
- },
952
- "2": {
953
- "name": "keyword.operator.switch-range.c"
954
- },
955
- "3": {
956
- "name": "constant.numeric.integer.decimal.c"
957
- }
958
- }
959
- },
960
- {
961
- "match": "(?ix) # hexadecimal float\n\t\t\t\t\t\t(?<!\\.) \\b\n\n\t\t\t\t\t\t(0x)\n\n\t\t\t\t\t\t# significand\n\t\t\t\t\t\t(?: (\\.) (?=p) # invalid\n\t\t\t\t\t\t | [0-9a-f]*+ ([0-9a-z]*?) [0-9a-f]*+\n\t\t\t\t\t\t (?: \\. [0-9a-f]*+ ([0-9a-z.]*?) [0-9a-f]*+ )? )\n\n\t\t\t\t\t\t# exponent (required)\n\t\t\t\t\t\t(?: (p) (?: [+\\-] [0-9]++ ([0-9a-z]*?)\n\t\t\t\t\t\t | (?=[0-9a-z.]) [0-9]*+ ([0-9a-z.]*?) )\n\t\t\t\t\t\t | (p) )\n\n\t\t\t\t\t\t# remaining valid chars and type\n\t\t\t\t\t\t[0-9]*+ ([fl]?)\n\n\t\t\t\t\t\t\\b (?!\\.)\n\t\t\t\t\t",
962
- "name": "constant.numeric.float.hexadecimal.c",
963
- "captures": {
964
- "1": {
965
- "name": "storage.type.number.prefix.hexadecimal.c"
966
- },
967
- "2": {
968
- "name": "invalid.illegal.number.missing-fragment.significand.c"
969
- },
970
- "3": {
971
- "name": "invalid.illegal.numeric-literal-character.float.whole-number.c"
972
- },
973
- "4": {
974
- "name": "invalid.illegal.numeric-literal-character.float.fraction.c"
975
- },
976
- "5": {
977
- "name": "keyword.other.exponent.hexadecimal.c"
978
- },
979
- "6": {
980
- "name": "invalid.illegal.numeric-literal-character.float.exponent.c"
981
- },
982
- "7": {
983
- "name": "invalid.illegal.numeric-literal-character.float.exponent.c"
984
- },
985
- "8": {
986
- "name": "invalid.illegal.number.missing-fragment.exponent.c"
987
- },
988
- "9": {
989
- "name": "storage.type.number.suffix.float.c"
990
- }
991
- }
992
- },
993
- {
994
- "match": "(?ix) # hexadecimal float without required exponent\n\t\t\t\t\t\t(?<!\\.) \\b\n\n\t\t\t\t\t\t(0x)\n\n\t\t\t\t\t\t# significand (at least a period)\n\t\t\t\t\t\t [0-9a-f]*+ ([0-9a-z&&[^p]]*?) [0-9a-f]*+\n\t\t\t\t\t\t(\\.) [0-9a-f]*+ ([0-9a-z.&&[^p]]*?) [0-9a-f]*+\n\n\t\t\t\t\t\t# type\n\t\t\t\t\t\t(l?)\n\n\t\t\t\t\t\t(?:(?<=\\.)|\\b) (?!\\.)\n\t\t\t\t\t",
995
- "name": "constant.numeric.float.hexadecimal.c",
996
- "captures": {
997
- "1": {
998
- "name": "storage.type.number.prefix.hexadecimal.c"
999
- },
1000
- "2": {
1001
- "name": "invalid.illegal.numeric-literal-character.float.whole-number.c"
1002
- },
1003
- "3": {
1004
- "name": "invalid.illegal.number.hexadecimal-float-requires-exponent.c"
1005
- },
1006
- "4": {
1007
- "name": "invalid.illegal.numeric-literal-character.float.fraction.c"
1008
- },
1009
- "5": {
1010
- "name": "storage.type.number.suffix.float.c"
1011
- }
1012
- }
1013
- },
1014
- {
1015
- "match": "(?ix) # decimal float literal\n\t\t\t\t\t\t(?<!\\.) (?:(?=\\.)|\\b)\n\n\t\t\t\t\t\t(?!0x)\n\t\t\t\t\t\t# significand\n\t\t\t\t\t\t(?: (?: [0-9]++ ([0-9a-z&&[^e]]*?) [0-9]*+ )?\n\t\t\t\t\t\t \\. [0-9]++ ([0-9a-z.&&[^e]]*?) [0-9]*+\n\n\t\t\t\t\t\t | [0-9]++ ([0-9a-z&&[^e]]*?) [0-9]*+ (?: \\. | (?=e)) )\n\n\t\t\t\t\t\t# exponent (optional)\n\t\t\t\t\t\t(?: (e) (?: [+\\-] [0-9]++ ([0-9a-z]*?)\n\t\t\t\t\t\t | [0-9]++ ([0-9a-z.]*?) )\n\t\t\t\t\t\t | ( p [+\\-]? [0-9]++\n\t\t\t\t\t\t | [ep] [0-9a-z.]*?) )?\n\n\t\t\t\t\t\t# any invalid chars and type\n\t\t\t\t\t\t([0-9a-z]*?) [0-9]*+ ([fl]?)\n\n\t\t\t\t\t\t(?:(?<=\\.)|\\b) (?!\\.)\n\t\t\t\t\t",
1016
- "name": "constant.numeric.float.c",
1017
- "captures": {
1018
- "1": {
1019
- "name": "invalid.illegal.numeric-literal-character.float.whole-number.c"
1020
- },
1021
- "2": {
1022
- "name": "invalid.illegal.numeric-literal-character.float.fraction.c"
1023
- },
1024
- "3": {
1025
- "name": "invalid.illegal.numeric-literal-character.float.whole-number.c"
1026
- },
1027
- "4": {
1028
- "name": "keyword.other.exponent.decimal.c"
1029
- },
1030
- "5": {
1031
- "name": "invalid.illegal.numeric-literal-character.float.exponent.c"
1032
- },
1033
- "6": {
1034
- "name": "invalid.illegal.numeric-literal-character.float.exponent.c"
1035
- },
1036
- "7": {
1037
- "name": "invalid.illegal.numeric-literal-character.float.exponent.c"
1038
- },
1039
- "8": {
1040
- "name": "invalid.illegal.numeric-literal-character.float.exponent.c"
1041
- },
1042
- "9": {
1043
- "name": "storage.type.number.suffix.float.c"
1044
- }
1045
- }
1046
- },
1047
- {
1048
- "match": "(?ix)\n\t\t\t\t\t\t(?<!\\.) \\b\n\t\t\t\t\t\t(0x)? 0++\n\t\t\t\t\t\t(u?l{0,2}|lul?|llu)\n\t\t\t\t\t\t\\b (?!\\.)\n\t\t\t\t\t",
1049
- "name": "constant.numeric.integer.zero.c",
1050
- "captures": {
1051
- "1": {
1052
- "name": "storage.type.number.prefix.hexadecimal.c"
1053
- },
1054
- "2": {
1055
- "name": "storage.type.number.suffix.c"
1056
- }
1057
- }
1058
- },
1059
- {
1060
- "match": "(?ix)\n\t\t\t\t\t\t(?<!\\.) \\b\n\n\t\t\t\t\t\t(?: (0x) | (0b) )\n\t\t\t\t\t\t(u?l{0,2}|lul?|llu)\n\n\t\t\t\t\t\t\\b (?!\\.)\n\t\t\t\t\t",
1061
- "name": "invalid.illegal.invalid-number-literal.c"
1131
+ "name": "constant.other.placeholder.c",
1132
+ "match": "(?x)%\n\t\t\t\t\t\t(\\d+\\$)? # field (argument #)\n\t\t\t\t\t\t[#0\\- +']* # flags\n\t\t\t\t\t\t[,;:_]? # separator character (AltiVec)\n\t\t\t\t\t\t((-?\\d+)|\\*(-?\\d+\\$)?)? # minimum field width\n\t\t\t\t\t\t(\\.((-?\\d+)|\\*(-?\\d+\\$)?)?)? # precision\n\t\t\t\t\t\t[diouxXDOUeEfFgGaACcSspnq%] # conversion type\n\t\t\t\t\t"
1062
1133
  },
1063
1134
  {
1064
- "match": "(?ix)\n\t\t\t\t\t\t(?<!\\.) \\b\n\n\t\t\t\t\t\t(0x) [0-9a-f]++\n\n\t\t\t\t\t\t# any invalid chars\n\t\t\t\t\t\t([0-9a-z]*?)\n\n\t\t\t\t\t\t# the remainder (after invalid chars, if any) and a type\n\t\t\t\t\t\t[0-9a-f]* (u?l{0,2}|lul?|llu)\n\n\t\t\t\t\t\t\\b (?!\\.)\n\t\t\t\t\t",
1065
- "name": "constant.numeric.integer.hexadecimal.c",
1066
- "captures": {
1067
- "1": {
1068
- "name": "storage.type.number.prefix.hexadecimal.c"
1069
- },
1070
- "2": {
1071
- "name": "invalid.illegal.numeric-literal-character.integer.c"
1072
- },
1073
- "3": {
1074
- "name": "storage.type.number.suffix.c"
1075
- }
1076
- }
1077
- },
1135
+ "name": "invalid.illegal.placeholder.c",
1136
+ "match": "%"
1137
+ }
1138
+ ]
1139
+ },
1140
+ "support": {
1141
+ "patterns": [
1078
1142
  {
1079
- "match": "(?ix)\n\t\t\t\t\t\t(?<!\\.) \\b\n\n\t\t\t\t\t\t(0b) [01]++\n\n\t\t\t\t\t\t# any invalid chars\n\t\t\t\t\t\t([0-9a-z]*?)\n\n\t\t\t\t\t\t# the remainder (after invalid chars, if any) and a type\n\t\t\t\t\t\t[01]* (u?l{0,2}|lul?|llu)\n\n\t\t\t\t\t\t\\b (?!\\.)\n\t\t\t\t\t",
1080
- "name": "constant.numeric.integer.binary.c",
1081
- "captures": {
1082
- "1": {
1083
- "name": "storage.type.number.prefix.binary.c"
1084
- },
1085
- "2": {
1086
- "name": "invalid.illegal.numeric-literal-character.integer.c"
1087
- },
1088
- "3": {
1089
- "name": "storage.type.number.suffix.c"
1090
- }
1091
- }
1143
+ "include": "#support-modifier"
1092
1144
  },
1093
1145
  {
1094
- "match": "(?ix)\n\t\t\t\t\t\t(?<!\\.) \\b\n\n\t\t\t\t\t\t(0) [0-7]++\n\n\t\t\t\t\t\t# any invalid chars\n\t\t\t\t\t\t([0-9a-z]*?)\n\n\t\t\t\t\t\t# the remainder (after invalid chars, if any) and a type\n\t\t\t\t\t\t[0-7]* (u?l{0,2}|lul?|llu)\n\n\t\t\t\t\t\t\\b (?!\\.)\n\t\t\t\t\t",
1095
- "name": "constant.numeric.integer.octal.c",
1096
- "captures": {
1097
- "1": {
1098
- "name": "storage.type.number.prefix.octal.c"
1099
- },
1100
- "2": {
1101
- "name": "invalid.illegal.numeric-literal-character.integer.c"
1102
- },
1103
- "3": {
1104
- "name": "storage.type.number.suffix.c"
1105
- }
1106
- }
1107
- },
1146
+ "include": "#support-keyword"
1147
+ }
1148
+ ]
1149
+ },
1150
+ "support-keyword": {
1151
+ "patterns": [
1108
1152
  {
1109
- "match": "(?ix)\n\t\t\t\t\t\t\\b\n\n\t\t\t\t\t\t[0-9][0-9_]*\n\n\t\t\t\t\t\t# any invalid chars\n\t\t\t\t\t\t([0-9a-z]*?)\n\n\t\t\t\t\t\t# the remainder (after invalid chars, if any) and a type\n\t\t\t\t\t\t[0-9]* (u?l{0,2}|lul?|llu)\n\n\t\t\t\t\t\t\\b\n\t\t\t\t\t",
1110
- "name": "constant.numeric.integer.decimal.c",
1153
+ "match": "\\s*\\b(foreach)\\b",
1111
1154
  "captures": {
1112
1155
  "1": {
1113
- "name": "invalid.illegal.numeric-literal-character.integer.c"
1114
- },
1115
- "2": {
1116
- "name": "storage.type.number.suffix.c"
1156
+ "name": "keyword.control.c"
1117
1157
  }
1118
1158
  }
1119
1159
  }
1120
1160
  ]
1121
1161
  },
1122
- "lex-string": {
1162
+ "support-modifier": {
1123
1163
  "patterns": [
1124
1164
  {
1125
- "begin": "\"",
1126
- "beginCaptures": {
1127
- "0": {
1128
- "name": "punctuation.definition.string.begin.c"
1129
- }
1130
- },
1131
- "end": "(\")|(?<=^|[^\\\\])\\s*(\\n)",
1132
- "endCaptures": {
1133
- "1": {
1134
- "name": "punctuation.definition.string.end.c"
1135
- },
1136
- "2": {
1137
- "name": "invalid.illegal.unexpected-end-of-line.c"
1138
- }
1139
- },
1140
- "name": "string.quoted.double.c",
1141
- "patterns": [
1142
- {
1143
- "include": "#lex-continuation"
1144
- },
1145
- {
1146
- "include": "#string_escaped_char"
1147
- },
1148
- {
1149
- "include": "#string_placeholder"
1150
- }
1151
- ]
1152
- },
1153
- {
1154
- "begin": "'",
1155
- "beginCaptures": {
1156
- "0": {
1157
- "name": "punctuation.definition.string.begin.c"
1158
- }
1159
- },
1160
- "end": "(')|(?<=^|[^\\\\])\\s*(\\n)",
1161
- "endCaptures": {
1165
+ "match": "\\s*\\b(inline|using)\\b",
1166
+ "captures": {
1162
1167
  "1": {
1163
- "name": "punctuation.definition.string.end.c"
1164
- },
1165
- "2": {
1166
- "name": "invalid.illegal.unexpected-end-of-line.c"
1167
- }
1168
- },
1169
- "name": "string.quoted.single.c",
1170
- "patterns": [
1171
- {
1172
- "include": "#lex-continuation"
1173
- },
1174
- {
1175
- "include": "#string_escaped_char"
1168
+ "name": "storage.modifier.c"
1176
1169
  }
1177
- ]
1170
+ }
1178
1171
  }
1179
1172
  ]
1180
1173
  },
1181
- "string_escaped_char": {
1174
+ "translation_unit": {
1182
1175
  "patterns": [
1183
1176
  {
1184
- "match": "\\\\(\\\\|[abefnprtv'\"?]|[0-3]\\d{0,2}|[4-7]\\d?|x[a-fA-F0-9]{0,2}|u[a-fA-F0-9]{0,4}|U[a-fA-F0-9]{0,8})",
1185
- "name": "constant.character.escape.c"
1177
+ "include": "#lex"
1186
1178
  },
1187
1179
  {
1188
- "match": "\\\\.",
1189
- "name": "invalid.illegal.unknown-escape.c"
1190
- }
1191
- ]
1192
- },
1193
- "string_placeholder": {
1194
- "patterns": [
1180
+ "include": "#function"
1181
+ },
1182
+ {
1183
+ "include": "#support"
1184
+ },
1195
1185
  {
1196
- "match": "(?x)%\n\t\t\t\t\t\t(\\d+\\$)? # field (argument #)\n\t\t\t\t\t\t[#0\\- +']* # flags\n\t\t\t\t\t\t[,;:_]? # separator character (AltiVec)\n\t\t\t\t\t\t((-?\\d+)|\\*(-?\\d+\\$)?)? # minimum field width\n\t\t\t\t\t\t(\\.((-?\\d+)|\\*(-?\\d+\\$)?)?)? # precision\n\t\t\t\t\t\t[diouxXDOUeEfFgGaACcSspnq%] # conversion type\n\t\t\t\t\t",
1197
- "name": "constant.other.placeholder.c"
1186
+ "include": "#block"
1198
1187
  },
1199
1188
  {
1200
- "match": "%",
1201
- "name": "invalid.illegal.placeholder.c"
1189
+ "include": "#parens"
1202
1190
  }
1203
1191
  ]
1204
1192
  }
1205
- },
1206
- "scopeName": "source.pawn",
1207
- "uuid": "25066DC2-6B1D-11D9-9D5B-000D93589AF6"
1208
- }
1193
+ }
1194
+ }