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,18 +1,15 @@
1
1
  {
2
- "comment": "This adds support for the COOL programming language used in CS 143 (Compilers) at Stanford",
3
- "fileTypes": [
4
- "cl"
5
- ],
6
2
  "name": "COOL",
3
+ "scopeName": "source.cool",
7
4
  "patterns": [
8
5
  {
9
- "match": "--(.*)\\n",
10
- "name": "comment.line.double-dash"
6
+ "name": "comment.line.double-dash",
7
+ "match": "--(.*)\\n"
11
8
  },
12
9
  {
10
+ "name": "comment.block.documentation",
13
11
  "begin": "\\(\\*",
14
12
  "end": "\\*\\)",
15
- "name": "comment.block.documentation",
16
13
  "patterns": [
17
14
  {
18
15
  "include": "#comment.block.documentation"
@@ -20,66 +17,64 @@
20
17
  ]
21
18
  },
22
19
  {
23
- "match": "(Int|String|Bool|Object|IO)",
24
- "name": "support.class"
20
+ "name": "support.class",
21
+ "match": "(Int|String|Bool|Object|IO)"
25
22
  },
26
23
  {
27
- "match": "(abort\\(\\)|type_name\\(\\)|copy\\(\\))",
28
- "name": "support.function"
24
+ "name": "support.function",
25
+ "match": "(abort\\(\\)|type_name\\(\\)|copy\\(\\))"
29
26
  },
30
27
  {
31
- "match": "\\b(if|fi|else|then|loop|pool|while|case|esac)\\b",
32
- "name": "keyword.control"
28
+ "name": "keyword.control",
29
+ "match": "\\b(if|fi|else|then|loop|pool|while|case|esac)\\b"
33
30
  },
34
31
  {
35
- "match": "\\b(in|inherits|isvoid|let|new|of|new|not)\\b",
36
- "name": "keyword.operator"
32
+ "name": "keyword.operator",
33
+ "match": "\\b(in|inherits|isvoid|let|new|of|new|not)\\b"
37
34
  },
38
35
  {
39
- "match": "\\b(true|false)\\b",
40
- "name": "constant.language"
36
+ "name": "constant.language",
37
+ "match": "\\b(true|false)\\b"
41
38
  },
42
39
  {
43
- "match": "(?x)\\b((?i:( [0-9]+ ( ' [0-9]+ )* )))",
44
- "name": "constant.numeric"
40
+ "name": "constant.numeric",
41
+ "match": "(?x)\\b((?i:( [0-9]+ ( ' [0-9]+ )* )))"
45
42
  },
46
43
  {
47
- "match": "\\b([A-Z]([A-Z]|[a-z]|[0-9]|_)*|SELF_TYPE)\\b",
48
- "name": "entity.name.type"
44
+ "name": "entity.name.type",
45
+ "match": "\\b([A-Z]([A-Z]|[a-z]|[0-9]|_)*|SELF_TYPE)\\b"
49
46
  },
50
47
  {
51
- "match": "\\b(class)\\b",
52
- "name": "storage.modifier"
48
+ "name": "storage.modifier",
49
+ "match": "\\b(class)\\b"
53
50
  },
54
51
  {
55
- "match": "\\b(self)\\b",
56
- "name": "variable.language"
52
+ "name": "variable.language",
53
+ "match": "\\b(self)\\b"
57
54
  },
58
55
  {
59
- "match": "\\b[a-z]([A-z]|[a-z]|[0-9]|_)*\\b",
60
- "name": "variable.parameter"
56
+ "name": "variable.parameter",
57
+ "match": "\\b[a-z]([A-z]|[a-z]|[0-9]|_)*\\b"
61
58
  },
62
59
  {
63
- "match": "\\b[a-z]*\\(.*\\)\\b",
64
- "name": "entity.name.function"
60
+ "name": "entity.name.function",
61
+ "match": "\\b[a-z]*\\(.*\\)\\b"
65
62
  },
66
63
  {
64
+ "name": "string.quoted.double",
67
65
  "begin": "\"",
68
- "beginCaptures": {
69
- "0": {
70
- }
71
- },
72
66
  "end": "\"",
73
- "endCaptures": {
74
- "0": {
75
- }
76
- },
77
- "name": "string.quoted.double",
78
67
  "patterns": [
79
68
  {
80
69
  "include": "#string_placeholder"
81
70
  }
82
- ]
71
+ ],
72
+ "beginCaptures": {
73
+ "0": {}
74
+ },
75
+ "endCaptures": {
76
+ "0": {}
77
+ }
83
78
  }
84
79
  ],
85
80
  "repository": {
@@ -97,7 +92,5 @@
97
92
  }
98
93
  ]
99
94
  }
100
- },
101
- "scopeName": "source.cool",
102
- "uuid": "BAAC41A1-4CB7-4CB2-A0C1-E1B1585D451E"
103
- }
95
+ }
96
+ }
@@ -1,62 +1,58 @@
1
1
  {
2
- "fileTypes": [
3
- "v"
4
- ],
5
2
  "name": "Coq",
3
+ "scopeName": "source.coq",
6
4
  "patterns": [
7
5
  {
8
6
  "include": "#multilinecomment"
9
7
  },
10
8
  {
9
+ "name": "proof.coq",
10
+ "begin": "\\b(Proof)\\.",
11
+ "end": "\\b(Qed|Defined|Abort|Admitted|Abort All)\\.",
11
12
  "beginCaptures": {
12
13
  "1": {
13
14
  "name": "keyword.coq"
14
15
  }
15
16
  },
16
- "begin": "\\b(Proof)\\.",
17
17
  "endCaptures": {
18
18
  "1": {
19
19
  "name": "keyword.coq"
20
20
  }
21
- },
22
- "end": "\\b(Qed|Defined|Abort|Admitted|Abort All)\\.",
23
- "name": "proof.coq"
21
+ }
24
22
  },
25
23
  {
24
+ "match": "\\b(Axiom|Conjecture|Parameter|Parameters|Variable|Variables|Hypothesis|Hypotheses|Definition|Let|Fixpoint|CoFixpoint|Inductive|CoInductive|Remark|Fact|Corollary|Proposition|Example|Module|Theorem|Lemma)\\b",
26
25
  "captures": {
27
26
  "1": {
28
27
  "name": "variable.coq"
29
28
  }
30
- },
31
- "match": "\\b(Axiom|Conjecture|Parameter|Parameters|Variable|Variables|Hypothesis|Hypotheses|Definition|Let|Fixpoint|CoFixpoint|Inductive|CoInductive|Remark|Fact|Corollary|Proposition|Example|Module|Theorem|Lemma)\\b"
29
+ }
32
30
  },
33
31
  {
32
+ "match": "\\b(Require|Proof|Qed|Type|Admitted|match|with|end|Eval|in|Check|End|Notation|forall|as|Defined|Set|fun|at|cofix|else|exists|exists2|fix|for|if|IF|let|mod|Prop|return|then|using|where|Abort)\\b",
34
33
  "captures": {
35
34
  "1": {
36
35
  "name": "keyword.coq"
37
36
  }
38
- },
39
- "match": "\\b(Require|Proof|Qed|Type|Admitted|match|with|end|Eval|in|Check|End|Notation|forall|as|Defined|Set|fun|at|cofix|else|exists|exists2|fix|for|if|IF|let|mod|Prop|return|then|using|where|Abort)\\b"
37
+ }
40
38
  },
41
39
  {
42
- "match": ":.*?[,.]",
43
- "name": "type.coq"
40
+ "name": "type.coq",
41
+ "match": ":.*?[,.]"
44
42
  }
45
43
  ],
46
44
  "repository": {
47
45
  "multilinecomment": {
48
- "begin": "\\(\\*",
49
46
  "name": "comment.coq",
50
- "end": "\\*\\)",
51
47
  "contentName": "comment.coq",
48
+ "begin": "\\(\\*",
49
+ "end": "\\*\\)",
52
50
  "patterns": [
53
51
  {
54
- "include": "#multilinecomment",
55
- "name": "comment.coq"
52
+ "name": "comment.coq",
53
+ "include": "#multilinecomment"
56
54
  }
57
55
  ]
58
56
  }
59
- },
60
- "scopeName": "source.coq",
61
- "uuid": "f3924813-f5ba-4ccf-b76f-f9bff62c5180"
62
- }
57
+ }
58
+ }
@@ -1,13 +1,10 @@
1
1
  {
2
2
  "name": "Crystal",
3
3
  "scopeName": "source.crystal",
4
- "fileTypes": [
5
- "cr",
6
- "Projectfile"
7
- ],
8
- "firstLineMatch": "^#!\\s*/.*\\bcrystal",
9
4
  "patterns": [
10
5
  {
6
+ "name": "meta.class.crystal",
7
+ "match": "^\\s*(?:(abstract)\\s+)?(class|struct|def)\\s+([.\\w\\d_:]+)(?:(\\()([.\\w\\d_:]+)(\\)))?(?:\\s+(\u003c)\\s+([.\\w\\d_:]+))?",
11
8
  "captures": {
12
9
  "1": {
13
10
  "name": "keyword.control.abstract.crystal"
@@ -33,11 +30,11 @@
33
30
  "8": {
34
31
  "name": "entity.other.inherited-class.crystal"
35
32
  }
36
- },
37
- "match": "^\\s*(?:(abstract)\\s+)?(class|struct|def)\\s+([.\\w\\d_:]+)(?:(\\()([.\\w\\d_:]+)(\\)))?(?:\\s+(<)\\s+([.\\w\\d_:]+))?",
38
- "name": "meta.class.crystal"
33
+ }
39
34
  },
40
35
  {
36
+ "name": "meta.class.crystal",
37
+ "match": "^\\s*(struct)\\s+(?:([.\\w\\d_:]+)(?:\\s+(\u003c)\\s+([.\\w\\d_:]+))?)",
41
38
  "captures": {
42
39
  "1": {
43
40
  "name": "keyword.control.struct.crystal"
@@ -51,11 +48,11 @@
51
48
  "4": {
52
49
  "name": "entity.other.inherited-struct.crystal"
53
50
  }
54
- },
55
- "match": "^\\s*(struct)\\s+(?:([.\\w\\d_:]+)(?:\\s+(<)\\s+([.\\w\\d_:]+))?)",
56
- "name": "meta.class.crystal"
51
+ }
57
52
  },
58
53
  {
54
+ "name": "meta.module.crystal",
55
+ "match": "^\\s*(module)\\s+([.\\w\\d_:]+)",
59
56
  "captures": {
60
57
  "1": {
61
58
  "name": "keyword.control.module.crystal"
@@ -63,11 +60,11 @@
63
60
  "2": {
64
61
  "name": "entity.name.type.module.crystal"
65
62
  }
66
- },
67
- "match": "^\\s*(module)\\s+([.\\w\\d_:]+)",
68
- "name": "meta.module.crystal"
63
+ }
69
64
  },
70
65
  {
66
+ "name": "meta.enum.crystal",
67
+ "match": "^\\s*(enum)\\s+([.\\w\\d_:]+)",
71
68
  "captures": {
72
69
  "1": {
73
70
  "name": "keyword.control.enum.crystal"
@@ -75,11 +72,11 @@
75
72
  "2": {
76
73
  "name": "entity.name.type.enum.crystal"
77
74
  }
78
- },
79
- "match": "^\\s*(enum)\\s+([.\\w\\d_:]+)",
80
- "name": "meta.enum.crystal"
75
+ }
81
76
  },
82
77
  {
78
+ "name": "meta.module.crystal",
79
+ "match": "^\\s*(lib)\\s+([.\\w\\d_]+)",
83
80
  "captures": {
84
81
  "1": {
85
82
  "name": "keyword.control.lib.crystal"
@@ -87,159 +84,174 @@
87
84
  "2": {
88
85
  "name": "entity.name.type.lib.crystal"
89
86
  }
90
- },
91
- "match": "^\\s*(lib)\\s+([.\\w\\d_]+)",
92
- "name": "meta.module.crystal"
87
+ }
93
88
  },
94
89
  {
90
+ "name": "constant.other.symbol.hashkey.crystal",
91
+ "match": "(?\u003e[a-zA-Z_]\\w*(?\u003e[?!])?)(:)(?!:)",
95
92
  "captures": {
96
93
  "1": {
97
94
  "name": "punctuation.definition.constant.hashkey.crystal"
98
95
  }
99
- },
100
- "comment": "symbols as hash key (1.9 syntax)",
101
- "match": "(?>[a-zA-Z_]\\w*(?>[?!])?)(:)(?!:)",
102
- "name": "constant.other.symbol.hashkey.crystal"
96
+ }
103
97
  },
104
98
  {
99
+ "name": "constant.other.symbol.hashkey.crystal",
100
+ "match": "(?\u003c!:)(:)(?\u003e[a-zA-Z_]\\w*(?\u003e[?!])?)(?=\\s*=\u003e)",
105
101
  "captures": {
106
102
  "1": {
107
103
  "name": "punctuation.definition.constant.crystal"
108
104
  }
109
- },
110
- "comment": "symbols as hash key (1.8 syntax)",
111
- "match": "(?<!:)(:)(?>[a-zA-Z_]\\w*(?>[?!])?)(?=\\s*=>)",
112
- "name": "constant.other.symbol.hashkey.crystal"
105
+ }
113
106
  },
114
107
  {
115
- "comment": "everything being a reserved word, not a value and needing a 'end' is a..",
116
- "match": "(?<!\\.)\\b(BEGIN|begin|case|class|else|elsif|END|end|ensure|forall|for|if|ifdef|in|module|rescue|struct|then|unless|until|when|while)\\b(?![?!])",
117
- "name": "keyword.control.crystal"
108
+ "name": "keyword.control.crystal",
109
+ "match": "(?\u003c!\\.)\\b(BEGIN|begin|case|class|else|elsif|END|end|ensure|forall|for|if|ifdef|in|module|rescue|struct|then|unless|until|when|while)\\b(?![?!])"
118
110
  },
119
111
  {
120
- "comment": "contextual smart pair support for block parameters",
121
- "match": "(?<!\\.)\\bdo\\b\\S*",
122
- "name": "keyword.control.start-block.crystal"
112
+ "name": "keyword.control.start-block.crystal",
113
+ "match": "(?\u003c!\\.)\\bdo\\b\\S*"
123
114
  },
124
115
  {
125
- "comment": "contextual smart pair support",
126
- "match": "(?<=\\{)(\\s+)",
127
- "name": "meta.syntax.crystal.start-block"
116
+ "name": "meta.syntax.crystal.start-block",
117
+ "match": "(?\u003c=\\{)(\\s+)"
128
118
  },
129
119
  {
130
- "comment": " as above, just doesn't need a 'end' and does a logic operation",
131
- "match": "(?<!\\.)\\b(and|not|or)\\b",
132
- "name": "keyword.operator.logical.crystal"
120
+ "name": "keyword.operator.logical.crystal",
121
+ "match": "(?\u003c!\\.)\\b(and|not|or)\\b"
133
122
  },
134
123
  {
135
- "comment": " just as above but being not a logical operation",
136
- "match": "(?<!\\.)\\b(alias|alias_method|break|next|redo|retry|return|super|type|undef|yield|out|pointerof|typeof)\\b(?![?!])|\\bdefined\\?|\\bblock_given\\?",
137
- "name": "keyword.control.pseudo-method.crystal"
124
+ "name": "keyword.control.pseudo-method.crystal",
125
+ "match": "(?\u003c!\\.)\\b(alias|alias_method|break|next|redo|retry|return|super|type|undef|yield|out|pointerof|typeof)\\b(?![?!])|\\bdefined\\?|\\bblock_given\\?"
138
126
  },
139
127
  {
140
- "match": "\\bnil\\b(?![?!])",
141
- "name": "constant.language.nil.crystal"
128
+ "name": "constant.language.nil.crystal",
129
+ "match": "\\bnil\\b(?![?!])"
142
130
  },
143
131
  {
144
- "match": "\\b(true|false)\\b(?![?!])",
145
- "name": "constant.language.boolean.crystal"
132
+ "name": "constant.language.boolean.crystal",
133
+ "match": "\\b(true|false)\\b(?![?!])"
146
134
  },
147
135
  {
148
- "match": "\\b(__(FILE|LINE)__)\\b(?![?!])",
149
- "name": "variable.language.crystal"
136
+ "name": "variable.language.crystal",
137
+ "match": "\\b(__(FILE|LINE)__)\\b(?![?!])"
150
138
  },
151
139
  {
152
- "match": "\\bself\\b(?![?!])",
153
- "name": "variable.language.self.crystal"
140
+ "name": "variable.language.self.crystal",
141
+ "match": "\\bself\\b(?![?!])"
154
142
  },
155
143
  {
156
- "match": "((?<=\\s)|(?<=^))\\b(initialize|new|loop|include|extend|prepend|raise|fail|getter(?:[?])?|setter(?:[?])?|property(?:[?])?|catch|throw)\\b\\w?((?=\\s)|(?=$))",
157
- "name": "keyword.other.special-method.crystal"
144
+ "name": "keyword.other.special-method.crystal",
145
+ "match": "((?\u003c=\\s)|(?\u003c=^))\\b(initialize|new|loop|include|extend|prepend|raise|fail|getter(?:[?])?|setter(?:[?])?|property(?:[?])?|catch|throw)\\b\\w?((?=\\s)|(?=$))"
158
146
  },
159
147
  {
160
- "begin": "\\b(?<!\\.|::)(require)\\b",
161
- "captures": {
162
- "1": {
163
- "name": "keyword.other.special-method.crystal"
164
- }
165
- },
166
- "end": "$|(?=#|\\})",
167
148
  "name": "meta.require.crystal",
149
+ "begin": "\\b(?\u003c!\\.|::)(require)\\b",
150
+ "end": "$|(?=#|\\})",
168
151
  "patterns": [
169
152
  {
170
153
  "include": "$self"
171
154
  }
172
- ]
155
+ ],
156
+ "captures": {
157
+ "1": {
158
+ "name": "keyword.other.special-method.crystal"
159
+ }
160
+ }
173
161
  },
174
162
  {
163
+ "name": "variable.other.readwrite.instance.crystal",
164
+ "match": "(@)[a-zA-Z_]\\w*",
175
165
  "captures": {
176
166
  "1": {
177
167
  "name": "punctuation.definition.variable.crystal"
178
168
  }
179
- },
180
- "match": "(@)[a-zA-Z_]\\w*",
181
- "name": "variable.other.readwrite.instance.crystal"
169
+ }
182
170
  },
183
171
  {
172
+ "name": "variable.other.readwrite.class.crystal",
173
+ "match": "(@@)[a-zA-Z_]\\w*",
184
174
  "captures": {
185
175
  "1": {
186
176
  "name": "punctuation.definition.variable.crystal"
187
177
  }
188
- },
189
- "match": "(@@)[a-zA-Z_]\\w*",
190
- "name": "variable.other.readwrite.class.crystal"
178
+ }
191
179
  },
192
180
  {
181
+ "name": "variable.other.readwrite.global.crystal",
182
+ "match": "(\\$)[a-zA-Z_]\\w*",
193
183
  "captures": {
194
184
  "1": {
195
185
  "name": "punctuation.definition.variable.crystal"
196
186
  }
197
- },
198
- "match": "(\\$)[a-zA-Z_]\\w*",
199
- "name": "variable.other.readwrite.global.crystal"
187
+ }
200
188
  },
201
189
  {
190
+ "name": "variable.other.readwrite.global.pre-defined.crystal",
191
+ "match": "(\\$)(!|@|\u0026|`|'|\\+|\\d+|~|=|/|\\\\|,|;|\\.|\u003c|\u003e|_|\\*|\\$|\\?|:|\"|-[0adFiIlpv])",
202
192
  "captures": {
203
193
  "1": {
204
194
  "name": "punctuation.definition.variable.crystal"
205
195
  }
206
- },
207
- "match": "(\\$)(!|@|&|`|'|\\+|\\d+|~|=|/|\\\\|,|;|\\.|<|>|_|\\*|\\$|\\?|:|\"|-[0adFiIlpv])",
208
- "name": "variable.other.readwrite.global.pre-defined.crystal"
196
+ }
209
197
  },
210
198
  {
199
+ "name": "meta.environment-variable.crystal",
211
200
  "begin": "\\b(ENV)\\[",
212
- "beginCaptures": {
213
- "1": {
214
- "name": "variable.other.constant.crystal"
215
- }
216
- },
217
201
  "end": "\\]",
218
- "name": "meta.environment-variable.crystal",
219
202
  "patterns": [
220
203
  {
221
204
  "include": "$self"
222
205
  }
223
- ]
206
+ ],
207
+ "beginCaptures": {
208
+ "1": {
209
+ "name": "variable.other.constant.crystal"
210
+ }
211
+ }
224
212
  },
225
213
  {
226
- "match": "\\b[A-Z]\\w*(?=((\\.|::)[A-Za-z]|\\[))",
227
- "name": "support.class.crystal"
214
+ "name": "support.class.crystal",
215
+ "match": "\\b[A-Z]\\w*(?=((\\.|::)[A-Za-z]|\\[))"
228
216
  },
229
217
  {
230
- "match": "\\b(Nil|Int|Int8|Int16|Int32|Int64|UInt8|UInt16|UInt32|UInt64|Float32|Float64|Set|Slice|Float|Number|StaticArray|Symbol|BigFloat|BigInt|BigRational|BitArray|Bool|Char|Atomic|Complex|Time|String|Tuple|NamedTuple|Proc|Union|Pointer|Range)\\b\\w?",
231
- "name": "support.struct.crystal"
218
+ "name": "support.struct.crystal",
219
+ "match": "\\b(Nil|Int|Int8|Int16|Int32|Int64|UInt8|UInt16|UInt32|UInt64|Float32|Float64|Set|Slice|Float|Number|StaticArray|Symbol|BigFloat|BigInt|BigRational|BitArray|Bool|Char|Atomic|Complex|Time|String|Tuple|NamedTuple|Proc|Union|Pointer|Range)\\b\\w?"
232
220
  },
233
221
  {
234
- "match": "((?<=\\s)|(?<=^))\\b(abort|at_exit|autoload\\??|binding|callcc|caller|caller_locations|chomp|chop|eval|exec|exit|exit!|fork|format|gets|global_variables|gsub|iterator\\?|lambda|load|local_variables|open|p|print|printf|proc|putc|puts|rand|readline|readlines|select|set_trace_func|sleep|spawn|sprintf|srand|sub|syscall|system|test|trace_var|trap|untrace_var|warn)\\b\\w?((?=\\s)|(?=$))",
235
- "name": "support.function.kernel.crystal"
222
+ "name": "support.function.kernel.crystal",
223
+ "match": "((?\u003c=\\s)|(?\u003c=^))\\b(abort|at_exit|autoload\\??|binding|callcc|caller|caller_locations|chomp|chop|eval|exec|exit|exit!|fork|format|gets|global_variables|gsub|iterator\\?|lambda|load|local_variables|open|p|print|printf|proc|putc|puts|rand|readline|readlines|select|set_trace_func|sleep|spawn|sprintf|srand|sub|syscall|system|test|trace_var|trap|untrace_var|warn)\\b\\w?((?=\\s)|(?=$))"
236
224
  },
237
225
  {
238
- "match": "\\b[A-Z]\\w*\\b",
239
- "name": "variable.other.constant.crystal"
226
+ "name": "variable.other.constant.crystal",
227
+ "match": "\\b[A-Z]\\w*\\b"
240
228
  },
241
229
  {
230
+ "name": "meta.function.method.with-arguments.crystal",
242
231
  "begin": "\\b(?:(private|protected)\\s+)?(def|macro)\\s+(\\S+)\\s*(\\()",
232
+ "end": "\\)",
233
+ "patterns": [
234
+ {
235
+ "begin": "(?![\\s,)])",
236
+ "end": "(?=[,)])",
237
+ "patterns": [
238
+ {
239
+ "match": "\\G([\u0026*]?)([_a-zA-Z][_a-zA-Z0-9]*)",
240
+ "captures": {
241
+ "1": {
242
+ "name": "storage.type.variable.crystal"
243
+ },
244
+ "2": {
245
+ "name": "variable.parameter.function.crystal"
246
+ }
247
+ }
248
+ },
249
+ {
250
+ "include": "$self"
251
+ }
252
+ ]
253
+ }
254
+ ],
243
255
  "beginCaptures": {
244
256
  "1": {
245
257
  "name": "keyword.control.visibility.crystal"
@@ -254,20 +266,23 @@
254
266
  "name": "punctuation.definition.parameters.crystal"
255
267
  }
256
268
  },
257
- "comment": "The method pattern comes from the symbol pattern. See there for an explanation.",
258
- "end": "\\)",
259
269
  "endCaptures": {
260
270
  "0": {
261
271
  "name": "punctuation.definition.parameters.crystal"
262
272
  }
263
- },
273
+ }
274
+ },
275
+ {
264
276
  "name": "meta.function.method.with-arguments.crystal",
277
+ "begin": "\\b(fun)\\s+(\\S+)(?:\\s+(=)\\s+(\\S+))?\\s*(\\()",
278
+ "end": "\\)",
265
279
  "patterns": [
266
280
  {
267
281
  "begin": "(?![\\s,)])",
268
282
  "end": "(?=[,)])",
269
283
  "patterns": [
270
284
  {
285
+ "match": "\\G([\u0026*]?)([_a-zA-Z][_a-zA-Z0-9]*)",
271
286
  "captures": {
272
287
  "1": {
273
288
  "name": "storage.type.variable.crystal"
@@ -275,18 +290,14 @@
275
290
  "2": {
276
291
  "name": "variable.parameter.function.crystal"
277
292
  }
278
- },
279
- "match": "\\G([&*]?)([_a-zA-Z][_a-zA-Z0-9]*)"
293
+ }
280
294
  },
281
295
  {
282
296
  "include": "$self"
283
297
  }
284
298
  ]
285
299
  }
286
- ]
287
- },
288
- {
289
- "begin": "\\b(fun)\\s+(\\S+)(?:\\s+(=)\\s+(\\S+))?\\s*(\\()",
300
+ ],
290
301
  "beginCaptures": {
291
302
  "1": {
292
303
  "name": "keyword.control.function.crystal"
@@ -301,39 +312,36 @@
301
312
  "name": "punctuation.definition.parameters.crystal"
302
313
  }
303
314
  },
304
- "comment": "The method pattern comes from the symbol pattern. See there for an explanation.",
305
- "end": "\\)",
306
315
  "endCaptures": {
307
316
  "0": {
308
317
  "name": "punctuation.definition.parameters.crystal"
309
318
  }
310
- },
319
+ }
320
+ },
321
+ {
311
322
  "name": "meta.function.method.with-arguments.crystal",
323
+ "begin": "\\b(?:(private|protected)\\s+)?(def|macro)\\s+(\\S+)",
324
+ "end": "$",
312
325
  "patterns": [
313
326
  {
314
- "begin": "(?![\\s,)])",
315
- "end": "(?=[,)])",
327
+ "begin": "(?![\\s,])",
328
+ "end": "(?=,|$)",
316
329
  "patterns": [
317
330
  {
331
+ "name": "variable.parameter.function.crystal",
332
+ "match": "\\G([\u0026*]?)[_a-zA-Z][_a-zA-Z0-9]*",
318
333
  "captures": {
319
334
  "1": {
320
- "name": "storage.type.variable.crystal"
321
- },
322
- "2": {
323
- "name": "variable.parameter.function.crystal"
335
+ "name": "punctuation.definition.variable.crystal"
324
336
  }
325
- },
326
- "match": "\\G([&*]?)([_a-zA-Z][_a-zA-Z0-9]*)"
337
+ }
327
338
  },
328
339
  {
329
340
  "include": "$self"
330
341
  }
331
342
  ]
332
343
  }
333
- ]
334
- },
335
- {
336
- "begin": "\\b(?:(private|protected)\\s+)?(def|macro)\\s+(\\S+)",
344
+ ],
337
345
  "beginCaptures": {
338
346
  "1": {
339
347
  "name": "keyword.control.visibility.crystal"
@@ -344,32 +352,11 @@
344
352
  "3": {
345
353
  "name": "entity.name.function.crystal"
346
354
  }
347
- },
348
- "comment": "same as the previous rule, but without parentheses around the arguments",
349
- "end": "$",
350
- "name": "meta.function.method.with-arguments.crystal",
351
- "patterns": [
352
- {
353
- "begin": "(?![\\s,])",
354
- "end": "(?=,|$)",
355
- "patterns": [
356
- {
357
- "captures": {
358
- "1": {
359
- "name": "punctuation.definition.variable.crystal"
360
- }
361
- },
362
- "match": "\\G([&*]?)[_a-zA-Z][_a-zA-Z0-9]*",
363
- "name": "variable.parameter.function.crystal"
364
- },
365
- {
366
- "include": "$self"
367
- }
368
- ]
369
- }
370
- ]
355
+ }
371
356
  },
372
357
  {
358
+ "name": "meta.function.method.without-arguments.crystal",
359
+ "match": "\\b(?:(private|protected)\\s+)?(def|macro)\\s+(\\S+)",
373
360
  "captures": {
374
361
  "1": {
375
362
  "name": "keyword.control.visibility.crystal"
@@ -380,80 +367,61 @@
380
367
  "3": {
381
368
  "name": "entity.name.function.crystal"
382
369
  }
383
- },
384
- "comment": " the optional name is just to catch the def also without a method-name",
385
- "match": "\\b(?:(private|protected)\\s+)?(def|macro)\\s+(\\S+)",
386
- "name": "meta.function.method.without-arguments.crystal"
370
+ }
387
371
  },
388
372
  {
389
- "match": "0x[A-Fa-f0-9]+",
390
- "name": "constant.numeric.hexadecimal.crystal"
373
+ "name": "constant.numeric.hexadecimal.crystal",
374
+ "match": "0x[A-Fa-f0-9]+"
391
375
  },
392
376
  {
393
- "match": "0o[0-7]+",
394
- "name": "constant.numeric.octal.crystal"
377
+ "name": "constant.numeric.octal.crystal",
378
+ "match": "0o[0-7]+"
395
379
  },
396
380
  {
397
- "match": "0b[10]+",
398
- "name": "constant.numeric.binary.crystal"
381
+ "name": "constant.numeric.binary.crystal",
382
+ "match": "0b[10]+"
399
383
  },
400
384
  {
401
- "comment": "sophisticated, complete numerical matching",
402
- "match": "((((?<=\\s)\\d*)|(^\\d*)|((?<=[\\s&\\|^eE<>%*!\\/=\\[\\](){};,+-])))(((((?<=\\d)((\\.){0,1}|(\\.{3})))|([+-]*))((\\d+\\_*)+)\\.?(((?<=[eE])[+-]?))?\\d*)|((?<=\\d)(_\\d+)+\\.?\\d*))(((?<=\\d)[eE]?\\d*)(?=[.eE\\s_iuf&\\|^<>%*!\\/=\\[\\](){};,+-])|($))|((?<=\\d)\\.{3}\\w*(?=\\))))",
403
- "name": "constant.numeric.crystal"
385
+ "name": "constant.numeric.crystal",
386
+ "match": "((((?\u003c=\\s)\\d*)|(^\\d*)|((?\u003c=[\\s\u0026\\|^eE\u003c\u003e%*!\\/=\\[\\](){};,+-])))(((((?\u003c=\\d)((\\.){0,1}|(\\.{3})))|([+-]*))((\\d+\\_*)+)\\.?(((?\u003c=[eE])[+-]?))?\\d*)|((?\u003c=\\d)(_\\d+)+\\.?\\d*))(((?\u003c=\\d)[eE]?\\d*)(?=[.eE\\s_iuf\u0026\\|^\u003c\u003e%*!\\/=\\[\\](){};,+-])|($))|((?\u003c=\\d)\\.{3}\\w*(?=\\))))"
404
387
  },
405
388
  {
406
- "comment": "match the unsigned-int type as per language spec",
407
- "match": "((?<=\\d_)|(?<=\\d))(u(8|16|32|64))(?!\\w)",
408
- "name": "entity.name.type.unsigned-int.crystal"
389
+ "name": "entity.name.type.unsigned-int.crystal",
390
+ "match": "((?\u003c=\\d_)|(?\u003c=\\d))(u(8|16|32|64))(?!\\w)"
409
391
  },
410
392
  {
411
- "comment": "match the signed-int type as per language spec",
412
- "match": "((?<=\\d_)|(?<=\\d))(i(8|16|32|64))(?!\\w)",
413
- "name": "entity.name.type.signed-int.crystal"
393
+ "name": "entity.name.type.signed-int.crystal",
394
+ "match": "((?\u003c=\\d_)|(?\u003c=\\d))(i(8|16|32|64))(?!\\w)"
414
395
  },
415
396
  {
416
- "comment": "match the float type as per language spec",
417
- "match": "((?<=\\d_)|(?<=\\d))(f(32|64))(?!\\w)",
418
- "name": "entity.name.type.float.crystal"
397
+ "name": "entity.name.type.float.crystal",
398
+ "match": "((?\u003c=\\d_)|(?\u003c=\\d))(f(32|64))(?!\\w)"
419
399
  },
420
400
  {
401
+ "name": "constant.other.symbol.crystal",
421
402
  "begin": ":'",
403
+ "end": "'",
404
+ "patterns": [
405
+ {
406
+ "name": "constant.character.escape.crystal",
407
+ "match": "\\\\['\\\\]"
408
+ }
409
+ ],
422
410
  "beginCaptures": {
423
411
  "0": {
424
412
  "name": "punctuation.definition.symbol.begin.crystal"
425
413
  }
426
414
  },
427
- "comment": "symbol literal with '' delimitor",
428
- "end": "'",
429
415
  "endCaptures": {
430
416
  "0": {
431
417
  "name": "punctuation.definition.symbol.end.crystal"
432
418
  }
433
- },
434
- "name": "constant.other.symbol.crystal",
435
- "patterns": [
436
- {
437
- "match": "\\\\['\\\\]",
438
- "name": "constant.character.escape.crystal"
439
- }
440
- ]
419
+ }
441
420
  },
442
421
  {
422
+ "name": "constant.other.symbol.interpolated.crystal",
443
423
  "begin": ":\"",
444
- "beginCaptures": {
445
- "0": {
446
- "name": "punctuation.section.symbol.begin.crystal"
447
- }
448
- },
449
- "comment": "symbol literal with \"\" delimitor",
450
424
  "end": "\"",
451
- "endCaptures": {
452
- "0": {
453
- "name": "punctuation.section.symbol.end.crystal"
454
- }
455
- },
456
- "name": "constant.other.symbol.interpolated.crystal",
457
425
  "patterns": [
458
426
  {
459
427
  "include": "#interpolated_crystal"
@@ -461,48 +429,47 @@
461
429
  {
462
430
  "include": "#escaped_char"
463
431
  }
464
- ]
465
- },
466
- {
467
- "comment": "Needs higher precidence than regular expressions.",
468
- "match": "(?<!\\()/=",
469
- "name": "keyword.operator.assignment.augmented.crystal"
470
- },
471
- {
472
- "begin": "'",
432
+ ],
473
433
  "beginCaptures": {
474
434
  "0": {
475
- "name": "punctuation.definition.char.begin.crystal"
435
+ "name": "punctuation.section.symbol.begin.crystal"
476
436
  }
477
437
  },
478
- "end": "'",
479
438
  "endCaptures": {
480
439
  "0": {
481
- "name": "punctuation.definition.char.end.crystal"
440
+ "name": "punctuation.section.symbol.end.crystal"
482
441
  }
483
- },
442
+ }
443
+ },
444
+ {
445
+ "name": "keyword.operator.assignment.augmented.crystal",
446
+ "match": "(?\u003c!\\()/="
447
+ },
448
+ {
484
449
  "name": "string.quoted.single.crystal",
450
+ "begin": "'",
451
+ "end": "'",
485
452
  "patterns": [
486
453
  {
487
- "match": "\\\\'|\\\\\\\\",
488
- "name": "constant.character.escape.crystal"
454
+ "name": "constant.character.escape.crystal",
455
+ "match": "\\\\'|\\\\\\\\"
489
456
  }
490
- ]
491
- },
492
- {
493
- "begin": "\"",
457
+ ],
494
458
  "beginCaptures": {
495
459
  "0": {
496
- "name": "punctuation.definition.string.begin.crystal"
460
+ "name": "punctuation.definition.char.begin.crystal"
497
461
  }
498
462
  },
499
- "end": "\"",
500
463
  "endCaptures": {
501
464
  "0": {
502
- "name": "punctuation.definition.string.end.crystal"
465
+ "name": "punctuation.definition.char.end.crystal"
503
466
  }
504
- },
467
+ }
468
+ },
469
+ {
505
470
  "name": "string.quoted.double.crystal",
471
+ "begin": "\"",
472
+ "end": "\"",
506
473
  "patterns": [
507
474
  {
508
475
  "include": "#interpolated_crystal"
@@ -510,23 +477,22 @@
510
477
  {
511
478
  "include": "#escaped_char"
512
479
  }
513
- ]
514
- },
515
- {
516
- "begin": "`",
480
+ ],
517
481
  "beginCaptures": {
518
482
  "0": {
519
483
  "name": "punctuation.definition.string.begin.crystal"
520
484
  }
521
485
  },
522
- "comment": "execute string (allows for interpolation)",
523
- "end": "`",
524
486
  "endCaptures": {
525
487
  "0": {
526
488
  "name": "punctuation.definition.string.end.crystal"
527
489
  }
528
- },
490
+ }
491
+ },
492
+ {
529
493
  "name": "string.interpolated.crystal",
494
+ "begin": "`",
495
+ "end": "`",
530
496
  "patterns": [
531
497
  {
532
498
  "include": "#interpolated_crystal"
@@ -534,23 +500,22 @@
534
500
  {
535
501
  "include": "#escaped_char"
536
502
  }
537
- ]
538
- },
539
- {
540
- "begin": "%x\\{",
503
+ ],
541
504
  "beginCaptures": {
542
505
  "0": {
543
506
  "name": "punctuation.definition.string.begin.crystal"
544
507
  }
545
508
  },
546
- "comment": "execute string (allow for interpolation)",
547
- "end": "\\}",
548
509
  "endCaptures": {
549
510
  "0": {
550
511
  "name": "punctuation.definition.string.end.crystal"
551
512
  }
552
- },
513
+ }
514
+ },
515
+ {
553
516
  "name": "string.interpolated.crystal",
517
+ "begin": "%x\\{",
518
+ "end": "\\}",
554
519
  "patterns": [
555
520
  {
556
521
  "include": "#interpolated_crystal"
@@ -561,23 +526,22 @@
561
526
  {
562
527
  "include": "#nest_curly_i"
563
528
  }
564
- ]
565
- },
566
- {
567
- "begin": "%x\\[",
529
+ ],
568
530
  "beginCaptures": {
569
531
  "0": {
570
532
  "name": "punctuation.definition.string.begin.crystal"
571
533
  }
572
534
  },
573
- "comment": "execute string (allow for interpolation)",
574
- "end": "\\]",
575
535
  "endCaptures": {
576
536
  "0": {
577
537
  "name": "punctuation.definition.string.end.crystal"
578
538
  }
579
- },
539
+ }
540
+ },
541
+ {
580
542
  "name": "string.interpolated.crystal",
543
+ "begin": "%x\\[",
544
+ "end": "\\]",
581
545
  "patterns": [
582
546
  {
583
547
  "include": "#interpolated_crystal"
@@ -588,23 +552,22 @@
588
552
  {
589
553
  "include": "#nest_brackets_i"
590
554
  }
591
- ]
592
- },
593
- {
594
- "begin": "%x\\<",
555
+ ],
595
556
  "beginCaptures": {
596
557
  "0": {
597
558
  "name": "punctuation.definition.string.begin.crystal"
598
559
  }
599
560
  },
600
- "comment": "execute string (allow for interpolation)",
601
- "end": "\\>",
602
561
  "endCaptures": {
603
562
  "0": {
604
563
  "name": "punctuation.definition.string.end.crystal"
605
564
  }
606
- },
565
+ }
566
+ },
567
+ {
607
568
  "name": "string.interpolated.crystal",
569
+ "begin": "%x\\\u003c",
570
+ "end": "\\\u003e",
608
571
  "patterns": [
609
572
  {
610
573
  "include": "#interpolated_crystal"
@@ -615,23 +578,22 @@
615
578
  {
616
579
  "include": "#nest_ltgt_i"
617
580
  }
618
- ]
619
- },
620
- {
621
- "begin": "%x\\(",
581
+ ],
622
582
  "beginCaptures": {
623
583
  "0": {
624
584
  "name": "punctuation.definition.string.begin.crystal"
625
585
  }
626
586
  },
627
- "comment": "execute string (allow for interpolation)",
628
- "end": "\\)",
629
587
  "endCaptures": {
630
588
  "0": {
631
589
  "name": "punctuation.definition.string.end.crystal"
632
590
  }
633
- },
591
+ }
592
+ },
593
+ {
634
594
  "name": "string.interpolated.crystal",
595
+ "begin": "%x\\(",
596
+ "end": "\\)",
635
597
  "patterns": [
636
598
  {
637
599
  "include": "#interpolated_crystal"
@@ -642,34 +604,50 @@
642
604
  {
643
605
  "include": "#nest_parens_i"
644
606
  }
645
- ]
646
- },
647
- {
648
- "begin": "%x([^\\w])",
607
+ ],
649
608
  "beginCaptures": {
650
609
  "0": {
651
610
  "name": "punctuation.definition.string.begin.crystal"
652
611
  }
653
612
  },
654
- "comment": "execute string (allow for interpolation)",
655
- "end": "\\1",
656
613
  "endCaptures": {
657
614
  "0": {
658
615
  "name": "punctuation.definition.string.end.crystal"
659
616
  }
660
- },
661
- "name": "string.interpolated.crystal",
662
- "patterns": [
617
+ }
618
+ },
619
+ {
620
+ "name": "string.interpolated.crystal",
621
+ "begin": "%x([^\\w])",
622
+ "end": "\\1",
623
+ "patterns": [
663
624
  {
664
625
  "include": "#interpolated_crystal"
665
626
  },
666
627
  {
667
628
  "include": "#escaped_char"
668
629
  }
669
- ]
630
+ ],
631
+ "beginCaptures": {
632
+ "0": {
633
+ "name": "punctuation.definition.string.begin.crystal"
634
+ }
635
+ },
636
+ "endCaptures": {
637
+ "0": {
638
+ "name": "punctuation.definition.string.end.crystal"
639
+ }
640
+ }
670
641
  },
671
642
  {
672
- "begin": "(?<![\\w)])((/))(?![*+?])(?=(?:\\\\/|[^/])*/[eimnosux]*\\s*([\\]#).,?:}]|$|\\|\\||&&|<=>|=>|==|=~|!~|!=|;|if|else|elsif|then|do|end|unless|while|until|or|and))",
643
+ "contentName": "string.regexp.interpolated.crystal",
644
+ "begin": "(?\u003c![\\w)])((/))(?![*+?])(?=(?:\\\\/|[^/])*/[eimnosux]*\\s*([\\]#).,?:}]|$|\\|\\||\u0026\u0026|\u003c=\u003e|=\u003e|==|=~|!~|!=|;|if|else|elsif|then|do|end|unless|while|until|or|and))",
645
+ "end": "((/[eimnosux]*))(?=[^eimnosux])",
646
+ "patterns": [
647
+ {
648
+ "include": "#regex_sub"
649
+ }
650
+ ],
673
651
  "captures": {
674
652
  "1": {
675
653
  "name": "string.regexp.interpolated.crystal"
@@ -677,31 +655,12 @@
677
655
  "2": {
678
656
  "name": "punctuation.section.regexp.crystal"
679
657
  }
680
- },
681
- "comment": "regular expression literal with interpolation",
682
- "contentName": "string.regexp.interpolated.crystal",
683
- "end": "((/[eimnosux]*))(?=[^eimnosux])",
684
- "patterns": [
685
- {
686
- "include": "#regex_sub"
687
- }
688
- ]
658
+ }
689
659
  },
690
660
  {
661
+ "name": "string.regexp.interpolated.crystal",
691
662
  "begin": "%r\\{",
692
- "beginCaptures": {
693
- "0": {
694
- "name": "punctuation.section.regexp.begin.crystal"
695
- }
696
- },
697
- "comment": "regular expression literal with interpolation and {} delimitor",
698
663
  "end": "\\}[eimnosux]*",
699
- "endCaptures": {
700
- "0": {
701
- "name": "punctuation.section.regexp.end.crystal"
702
- }
703
- },
704
- "name": "string.regexp.interpolated.crystal",
705
664
  "patterns": [
706
665
  {
707
666
  "include": "#regex_sub"
@@ -709,23 +668,22 @@
709
668
  {
710
669
  "include": "#nest_curly_r"
711
670
  }
712
- ]
713
- },
714
- {
715
- "begin": "%r\\[",
671
+ ],
716
672
  "beginCaptures": {
717
673
  "0": {
718
674
  "name": "punctuation.section.regexp.begin.crystal"
719
675
  }
720
676
  },
721
- "comment": "regular expression literal with interpolation and [] delimitor",
722
- "end": "\\][eimnosux]*",
723
677
  "endCaptures": {
724
678
  "0": {
725
679
  "name": "punctuation.section.regexp.end.crystal"
726
680
  }
727
- },
681
+ }
682
+ },
683
+ {
728
684
  "name": "string.regexp.interpolated.crystal",
685
+ "begin": "%r\\[",
686
+ "end": "\\][eimnosux]*",
729
687
  "patterns": [
730
688
  {
731
689
  "include": "#regex_sub"
@@ -733,23 +691,22 @@
733
691
  {
734
692
  "include": "#nest_brackets_r"
735
693
  }
736
- ]
737
- },
738
- {
739
- "begin": "%r\\(",
694
+ ],
740
695
  "beginCaptures": {
741
696
  "0": {
742
697
  "name": "punctuation.section.regexp.begin.crystal"
743
698
  }
744
699
  },
745
- "comment": "regular expression literal with interpolation and () delimitor",
746
- "end": "\\)[eimnosux]*",
747
700
  "endCaptures": {
748
701
  "0": {
749
702
  "name": "punctuation.section.regexp.end.crystal"
750
703
  }
751
- },
704
+ }
705
+ },
706
+ {
752
707
  "name": "string.regexp.interpolated.crystal",
708
+ "begin": "%r\\(",
709
+ "end": "\\)[eimnosux]*",
753
710
  "patterns": [
754
711
  {
755
712
  "include": "#regex_sub"
@@ -757,23 +714,22 @@
757
714
  {
758
715
  "include": "#nest_parens_r"
759
716
  }
760
- ]
761
- },
762
- {
763
- "begin": "%r\\<",
717
+ ],
764
718
  "beginCaptures": {
765
719
  "0": {
766
720
  "name": "punctuation.section.regexp.begin.crystal"
767
721
  }
768
722
  },
769
- "comment": "regular expression literal with interpolation and <> delimitor",
770
- "end": "\\>[eimnosux]*",
771
723
  "endCaptures": {
772
724
  "0": {
773
725
  "name": "punctuation.section.regexp.end.crystal"
774
726
  }
775
- },
727
+ }
728
+ },
729
+ {
776
730
  "name": "string.regexp.interpolated.crystal",
731
+ "begin": "%r\\\u003c",
732
+ "end": "\\\u003e[eimnosux]*",
777
733
  "patterns": [
778
734
  {
779
735
  "include": "#regex_sub"
@@ -781,44 +737,42 @@
781
737
  {
782
738
  "include": "#nest_ltgt_r"
783
739
  }
784
- ]
785
- },
786
- {
787
- "begin": "%r([^\\w])",
740
+ ],
788
741
  "beginCaptures": {
789
742
  "0": {
790
743
  "name": "punctuation.section.regexp.begin.crystal"
791
744
  }
792
745
  },
793
- "comment": "regular expression literal with interpolation and {} delimitor",
794
- "end": "\\1[eimnosux]*",
795
746
  "endCaptures": {
796
747
  "0": {
797
748
  "name": "punctuation.section.regexp.end.crystal"
798
749
  }
799
- },
750
+ }
751
+ },
752
+ {
800
753
  "name": "string.regexp.interpolated.crystal",
754
+ "begin": "%r([^\\w])",
755
+ "end": "\\1[eimnosux]*",
801
756
  "patterns": [
802
757
  {
803
758
  "include": "#regex_sub"
804
759
  }
805
- ]
806
- },
807
- {
808
- "begin": "%I\\[",
760
+ ],
809
761
  "beginCaptures": {
810
762
  "0": {
811
- "name": "punctuation.section.array.begin.crystal"
763
+ "name": "punctuation.section.regexp.begin.crystal"
812
764
  }
813
765
  },
814
- "comment": "array of symbols literal with interpolation and [] delimitor",
815
- "end": "\\]",
816
766
  "endCaptures": {
817
767
  "0": {
818
- "name": "punctuation.section.array.end.crystal"
768
+ "name": "punctuation.section.regexp.end.crystal"
819
769
  }
820
- },
770
+ }
771
+ },
772
+ {
821
773
  "name": "constant.other.symbol.interpolated.crystal",
774
+ "begin": "%I\\[",
775
+ "end": "\\]",
822
776
  "patterns": [
823
777
  {
824
778
  "include": "#interpolated_crystal"
@@ -829,23 +783,22 @@
829
783
  {
830
784
  "include": "#nest_brackets_i"
831
785
  }
832
- ]
833
- },
834
- {
835
- "begin": "%I\\(",
786
+ ],
836
787
  "beginCaptures": {
837
788
  "0": {
838
789
  "name": "punctuation.section.array.begin.crystal"
839
790
  }
840
791
  },
841
- "comment": "array of symbols literal with interpolation and () delimitor",
842
- "end": "\\)",
843
792
  "endCaptures": {
844
793
  "0": {
845
794
  "name": "punctuation.section.array.end.crystal"
846
795
  }
847
- },
796
+ }
797
+ },
798
+ {
848
799
  "name": "constant.other.symbol.interpolated.crystal",
800
+ "begin": "%I\\(",
801
+ "end": "\\)",
849
802
  "patterns": [
850
803
  {
851
804
  "include": "#interpolated_crystal"
@@ -856,23 +809,22 @@
856
809
  {
857
810
  "include": "#nest_parens_i"
858
811
  }
859
- ]
860
- },
861
- {
862
- "begin": "%I\\<",
812
+ ],
863
813
  "beginCaptures": {
864
814
  "0": {
865
815
  "name": "punctuation.section.array.begin.crystal"
866
816
  }
867
817
  },
868
- "comment": "array of symbols literal with interpolation and <> delimitor",
869
- "end": "\\>",
870
818
  "endCaptures": {
871
819
  "0": {
872
820
  "name": "punctuation.section.array.end.crystal"
873
821
  }
874
- },
822
+ }
823
+ },
824
+ {
875
825
  "name": "constant.other.symbol.interpolated.crystal",
826
+ "begin": "%I\\\u003c",
827
+ "end": "\\\u003e",
876
828
  "patterns": [
877
829
  {
878
830
  "include": "#interpolated_crystal"
@@ -883,23 +835,22 @@
883
835
  {
884
836
  "include": "#nest_ltgt_i"
885
837
  }
886
- ]
887
- },
888
- {
889
- "begin": "%I\\{",
838
+ ],
890
839
  "beginCaptures": {
891
840
  "0": {
892
841
  "name": "punctuation.section.array.begin.crystal"
893
842
  }
894
843
  },
895
- "comment": "array of symbols literal with interpolation and {} delimitor",
896
- "end": "\\}",
897
844
  "endCaptures": {
898
845
  "0": {
899
846
  "name": "punctuation.section.array.end.crystal"
900
847
  }
901
- },
848
+ }
849
+ },
850
+ {
902
851
  "name": "constant.other.symbol.interpolated.crystal",
852
+ "begin": "%I\\{",
853
+ "end": "\\}",
903
854
  "patterns": [
904
855
  {
905
856
  "include": "#interpolated_crystal"
@@ -910,23 +861,22 @@
910
861
  {
911
862
  "include": "#nest_curly_i"
912
863
  }
913
- ]
914
- },
915
- {
916
- "begin": "%I([^\\w])",
864
+ ],
917
865
  "beginCaptures": {
918
866
  "0": {
919
867
  "name": "punctuation.section.array.begin.crystal"
920
868
  }
921
869
  },
922
- "comment": "array of symbols literal with interpolation and wildcard delimitor",
923
- "end": "\\1",
924
870
  "endCaptures": {
925
871
  "0": {
926
872
  "name": "punctuation.section.array.end.crystal"
927
873
  }
928
- },
874
+ }
875
+ },
876
+ {
929
877
  "name": "constant.other.symbol.interpolated.crystal",
878
+ "begin": "%I([^\\w])",
879
+ "end": "\\1",
930
880
  "patterns": [
931
881
  {
932
882
  "include": "#interpolated_crystal"
@@ -934,145 +884,138 @@
934
884
  {
935
885
  "include": "#escaped_char"
936
886
  }
937
- ]
938
- },
939
- {
940
- "begin": "%i\\[",
887
+ ],
941
888
  "beginCaptures": {
942
889
  "0": {
943
890
  "name": "punctuation.section.array.begin.crystal"
944
891
  }
945
892
  },
946
- "comment": "array of symbols literal with [] delimitor",
947
- "end": "\\]",
948
893
  "endCaptures": {
949
894
  "0": {
950
895
  "name": "punctuation.section.array.end.crystal"
951
896
  }
952
- },
897
+ }
898
+ },
899
+ {
953
900
  "name": "constant.other.symbol.crystal",
901
+ "begin": "%i\\[",
902
+ "end": "\\]",
954
903
  "patterns": [
955
904
  {
956
- "match": "\\\\\\]|\\\\\\\\",
957
- "name": "constant.character.escape.crystal"
905
+ "name": "constant.character.escape.crystal",
906
+ "match": "\\\\\\]|\\\\\\\\"
958
907
  },
959
908
  {
960
909
  "include": "#nest_brackets"
961
910
  }
962
- ]
963
- },
964
- {
965
- "begin": "%i\\(",
911
+ ],
966
912
  "beginCaptures": {
967
913
  "0": {
968
914
  "name": "punctuation.section.array.begin.crystal"
969
915
  }
970
916
  },
971
- "comment": "array of symbols literal with () delimitor",
972
- "end": "\\)",
973
917
  "endCaptures": {
974
918
  "0": {
975
919
  "name": "punctuation.section.array.end.crystal"
976
920
  }
977
- },
921
+ }
922
+ },
923
+ {
978
924
  "name": "constant.other.symbol.crystal",
925
+ "begin": "%i\\(",
926
+ "end": "\\)",
979
927
  "patterns": [
980
928
  {
981
- "match": "\\\\\\)|\\\\\\\\",
982
- "name": "constant.character.escape.crystal"
929
+ "name": "constant.character.escape.crystal",
930
+ "match": "\\\\\\)|\\\\\\\\"
983
931
  },
984
932
  {
985
933
  "include": "#nest_parens"
986
934
  }
987
- ]
988
- },
989
- {
990
- "begin": "%i\\<",
935
+ ],
991
936
  "beginCaptures": {
992
937
  "0": {
993
938
  "name": "punctuation.section.array.begin.crystal"
994
939
  }
995
940
  },
996
- "comment": "array of symbols literal with <> delimitor",
997
- "end": "\\>",
998
941
  "endCaptures": {
999
942
  "0": {
1000
943
  "name": "punctuation.section.array.end.crystal"
1001
944
  }
1002
- },
945
+ }
946
+ },
947
+ {
1003
948
  "name": "constant.other.symbol.crystal",
949
+ "begin": "%i\\\u003c",
950
+ "end": "\\\u003e",
1004
951
  "patterns": [
1005
952
  {
1006
- "match": "\\\\\\>|\\\\\\\\",
1007
- "name": "constant.character.escape.crystal"
953
+ "name": "constant.character.escape.crystal",
954
+ "match": "\\\\\\\u003e|\\\\\\\\"
1008
955
  },
1009
956
  {
1010
957
  "include": "#nest_ltgt"
1011
958
  }
1012
- ]
1013
- },
1014
- {
1015
- "begin": "%i\\{",
959
+ ],
1016
960
  "beginCaptures": {
1017
961
  "0": {
1018
962
  "name": "punctuation.section.array.begin.crystal"
1019
963
  }
1020
964
  },
1021
- "comment": "array of symbols literal with {} delimitor",
1022
- "end": "\\}",
1023
965
  "endCaptures": {
1024
966
  "0": {
1025
967
  "name": "punctuation.section.array.end.crystal"
1026
968
  }
1027
- },
969
+ }
970
+ },
971
+ {
1028
972
  "name": "constant.other.symbol.crystal",
973
+ "begin": "%i\\{",
974
+ "end": "\\}",
1029
975
  "patterns": [
1030
976
  {
1031
- "match": "\\\\\\}|\\\\\\\\",
1032
- "name": "constant.character.escape.crystal"
977
+ "name": "constant.character.escape.crystal",
978
+ "match": "\\\\\\}|\\\\\\\\"
1033
979
  },
1034
980
  {
1035
981
  "include": "#nest_curly"
1036
982
  }
1037
- ]
1038
- },
1039
- {
1040
- "begin": "%i([^\\w])",
983
+ ],
1041
984
  "beginCaptures": {
1042
985
  "0": {
1043
986
  "name": "punctuation.section.array.begin.crystal"
1044
987
  }
1045
988
  },
1046
- "comment": "array of symbols literal with wildcard delimitor",
1047
- "end": "\\1",
1048
989
  "endCaptures": {
1049
990
  "0": {
1050
991
  "name": "punctuation.section.array.end.crystal"
1051
992
  }
1052
- },
993
+ }
994
+ },
995
+ {
1053
996
  "name": "constant.other.symbol.crystal",
997
+ "begin": "%i([^\\w])",
998
+ "end": "\\1",
1054
999
  "patterns": [
1055
1000
  {
1056
- "comment": "Cant be named because its not neccesarily an escape.",
1057
1001
  "match": "\\\\."
1058
1002
  }
1059
- ]
1060
- },
1061
- {
1062
- "begin": "%W\\[",
1003
+ ],
1063
1004
  "beginCaptures": {
1064
1005
  "0": {
1065
1006
  "name": "punctuation.section.array.begin.crystal"
1066
1007
  }
1067
1008
  },
1068
- "comment": "array of strings literal with interpolation and [] delimitor",
1069
- "end": "\\]",
1070
1009
  "endCaptures": {
1071
1010
  "0": {
1072
1011
  "name": "punctuation.section.array.end.crystal"
1073
1012
  }
1074
- },
1013
+ }
1014
+ },
1015
+ {
1075
1016
  "name": "string.quoted.other.interpolated.crystal",
1017
+ "begin": "%W\\[",
1018
+ "end": "\\]",
1076
1019
  "patterns": [
1077
1020
  {
1078
1021
  "include": "#interpolated_crystal"
@@ -1083,23 +1026,22 @@
1083
1026
  {
1084
1027
  "include": "#nest_brackets_i"
1085
1028
  }
1086
- ]
1087
- },
1088
- {
1089
- "begin": "%W\\(",
1029
+ ],
1090
1030
  "beginCaptures": {
1091
1031
  "0": {
1092
1032
  "name": "punctuation.section.array.begin.crystal"
1093
1033
  }
1094
1034
  },
1095
- "comment": "array of strings literal with interpolation and () delimitor",
1096
- "end": "\\)",
1097
1035
  "endCaptures": {
1098
1036
  "0": {
1099
1037
  "name": "punctuation.section.array.end.crystal"
1100
1038
  }
1101
- },
1039
+ }
1040
+ },
1041
+ {
1102
1042
  "name": "string.quoted.other.interpolated.crystal",
1043
+ "begin": "%W\\(",
1044
+ "end": "\\)",
1103
1045
  "patterns": [
1104
1046
  {
1105
1047
  "include": "#interpolated_crystal"
@@ -1110,23 +1052,22 @@
1110
1052
  {
1111
1053
  "include": "#nest_parens_i"
1112
1054
  }
1113
- ]
1114
- },
1115
- {
1116
- "begin": "%W\\<",
1055
+ ],
1117
1056
  "beginCaptures": {
1118
1057
  "0": {
1119
1058
  "name": "punctuation.section.array.begin.crystal"
1120
1059
  }
1121
1060
  },
1122
- "comment": "array of strings literal with interpolation and <> delimitor",
1123
- "end": "\\>",
1124
1061
  "endCaptures": {
1125
1062
  "0": {
1126
1063
  "name": "punctuation.section.array.end.crystal"
1127
1064
  }
1128
- },
1065
+ }
1066
+ },
1067
+ {
1129
1068
  "name": "string.quoted.other.interpolated.crystal",
1069
+ "begin": "%W\\\u003c",
1070
+ "end": "\\\u003e",
1130
1071
  "patterns": [
1131
1072
  {
1132
1073
  "include": "#interpolated_crystal"
@@ -1137,23 +1078,22 @@
1137
1078
  {
1138
1079
  "include": "#nest_ltgt_i"
1139
1080
  }
1140
- ]
1141
- },
1142
- {
1143
- "begin": "%W\\{",
1081
+ ],
1144
1082
  "beginCaptures": {
1145
1083
  "0": {
1146
1084
  "name": "punctuation.section.array.begin.crystal"
1147
1085
  }
1148
1086
  },
1149
- "comment": "array of strings literal with interpolation and {} delimitor",
1150
- "end": "\\}",
1151
1087
  "endCaptures": {
1152
1088
  "0": {
1153
1089
  "name": "punctuation.section.array.end.crystal"
1154
1090
  }
1155
- },
1091
+ }
1092
+ },
1093
+ {
1156
1094
  "name": "string.quoted.other.interpolated.crystal",
1095
+ "begin": "%W\\{",
1096
+ "end": "\\}",
1157
1097
  "patterns": [
1158
1098
  {
1159
1099
  "include": "#interpolated_crystal"
@@ -1164,23 +1104,22 @@
1164
1104
  {
1165
1105
  "include": "#nest_curly_i"
1166
1106
  }
1167
- ]
1168
- },
1169
- {
1170
- "begin": "%W([^\\w])",
1107
+ ],
1171
1108
  "beginCaptures": {
1172
1109
  "0": {
1173
1110
  "name": "punctuation.section.array.begin.crystal"
1174
1111
  }
1175
1112
  },
1176
- "comment": "array of strings literal with interpolation and wildcard delimitor",
1177
- "end": "\\1",
1178
1113
  "endCaptures": {
1179
1114
  "0": {
1180
1115
  "name": "punctuation.section.array.end.crystal"
1181
1116
  }
1182
- },
1117
+ }
1118
+ },
1119
+ {
1183
1120
  "name": "string.quoted.other.interpolated.crystal",
1121
+ "begin": "%W([^\\w])",
1122
+ "end": "\\1",
1184
1123
  "patterns": [
1185
1124
  {
1186
1125
  "include": "#interpolated_crystal"
@@ -1188,145 +1127,138 @@
1188
1127
  {
1189
1128
  "include": "#escaped_char"
1190
1129
  }
1191
- ]
1192
- },
1193
- {
1194
- "begin": "%w\\[",
1130
+ ],
1195
1131
  "beginCaptures": {
1196
1132
  "0": {
1197
1133
  "name": "punctuation.section.array.begin.crystal"
1198
1134
  }
1199
1135
  },
1200
- "comment": "array of strings literal with [] delimitor",
1201
- "end": "\\]",
1202
1136
  "endCaptures": {
1203
1137
  "0": {
1204
1138
  "name": "punctuation.section.array.end.crystal"
1205
1139
  }
1206
- },
1140
+ }
1141
+ },
1142
+ {
1207
1143
  "name": "string.quoted.other.crystal",
1144
+ "begin": "%w\\[",
1145
+ "end": "\\]",
1208
1146
  "patterns": [
1209
1147
  {
1210
- "match": "\\\\\\]|\\\\\\\\",
1211
- "name": "constant.character.escape.crystal"
1148
+ "name": "constant.character.escape.crystal",
1149
+ "match": "\\\\\\]|\\\\\\\\"
1212
1150
  },
1213
1151
  {
1214
1152
  "include": "#nest_brackets"
1215
1153
  }
1216
- ]
1217
- },
1218
- {
1219
- "begin": "%w\\(",
1154
+ ],
1220
1155
  "beginCaptures": {
1221
1156
  "0": {
1222
1157
  "name": "punctuation.section.array.begin.crystal"
1223
1158
  }
1224
1159
  },
1225
- "comment": "array of strings literal with () delimitor",
1226
- "end": "\\)",
1227
1160
  "endCaptures": {
1228
1161
  "0": {
1229
1162
  "name": "punctuation.section.array.end.crystal"
1230
1163
  }
1231
- },
1164
+ }
1165
+ },
1166
+ {
1232
1167
  "name": "string.quoted.other.crystal",
1168
+ "begin": "%w\\(",
1169
+ "end": "\\)",
1233
1170
  "patterns": [
1234
1171
  {
1235
- "match": "\\\\\\)|\\\\\\\\",
1236
- "name": "constant.character.escape.crystal"
1172
+ "name": "constant.character.escape.crystal",
1173
+ "match": "\\\\\\)|\\\\\\\\"
1237
1174
  },
1238
1175
  {
1239
1176
  "include": "#nest_parens"
1240
1177
  }
1241
- ]
1242
- },
1243
- {
1244
- "begin": "%w\\<",
1178
+ ],
1245
1179
  "beginCaptures": {
1246
1180
  "0": {
1247
1181
  "name": "punctuation.section.array.begin.crystal"
1248
1182
  }
1249
1183
  },
1250
- "comment": "array of strings literal with <> delimitor",
1251
- "end": "\\>",
1252
1184
  "endCaptures": {
1253
1185
  "0": {
1254
1186
  "name": "punctuation.section.array.end.crystal"
1255
1187
  }
1256
- },
1188
+ }
1189
+ },
1190
+ {
1257
1191
  "name": "string.quoted.other.crystal",
1192
+ "begin": "%w\\\u003c",
1193
+ "end": "\\\u003e",
1258
1194
  "patterns": [
1259
1195
  {
1260
- "match": "\\\\\\>|\\\\\\\\",
1261
- "name": "constant.character.escape.crystal"
1196
+ "name": "constant.character.escape.crystal",
1197
+ "match": "\\\\\\\u003e|\\\\\\\\"
1262
1198
  },
1263
1199
  {
1264
1200
  "include": "#nest_ltgt"
1265
1201
  }
1266
- ]
1267
- },
1268
- {
1269
- "begin": "%w\\{",
1202
+ ],
1270
1203
  "beginCaptures": {
1271
1204
  "0": {
1272
1205
  "name": "punctuation.section.array.begin.crystal"
1273
1206
  }
1274
1207
  },
1275
- "comment": "array of strings literal with {} delimitor",
1276
- "end": "\\}",
1277
1208
  "endCaptures": {
1278
1209
  "0": {
1279
1210
  "name": "punctuation.section.array.end.crystal"
1280
1211
  }
1281
- },
1212
+ }
1213
+ },
1214
+ {
1282
1215
  "name": "string.quoted.other.crystal",
1216
+ "begin": "%w\\{",
1217
+ "end": "\\}",
1283
1218
  "patterns": [
1284
1219
  {
1285
- "match": "\\\\\\}|\\\\\\\\",
1286
- "name": "constant.character.escape.crystal"
1220
+ "name": "constant.character.escape.crystal",
1221
+ "match": "\\\\\\}|\\\\\\\\"
1287
1222
  },
1288
1223
  {
1289
1224
  "include": "#nest_curly"
1290
1225
  }
1291
- ]
1292
- },
1293
- {
1294
- "begin": "%w([^\\w])",
1226
+ ],
1295
1227
  "beginCaptures": {
1296
1228
  "0": {
1297
1229
  "name": "punctuation.section.array.begin.crystal"
1298
1230
  }
1299
1231
  },
1300
- "comment": "array of strings literal with wildcard delimitor",
1301
- "end": "\\1",
1302
1232
  "endCaptures": {
1303
1233
  "0": {
1304
1234
  "name": "punctuation.section.array.end.crystal"
1305
1235
  }
1306
- },
1236
+ }
1237
+ },
1238
+ {
1307
1239
  "name": "string.quoted.other.crystal",
1240
+ "begin": "%w([^\\w])",
1241
+ "end": "\\1",
1308
1242
  "patterns": [
1309
1243
  {
1310
- "comment": "Cant be named because its not neccesarily an escape.",
1311
1244
  "match": "\\\\."
1312
1245
  }
1313
- ]
1314
- },
1315
- {
1316
- "begin": "%Q\\(",
1246
+ ],
1317
1247
  "beginCaptures": {
1318
1248
  "0": {
1319
- "name": "punctuation.definition.string.begin.crystal"
1249
+ "name": "punctuation.section.array.begin.crystal"
1320
1250
  }
1321
1251
  },
1322
- "comment": "string literal with interpolation and () delimitor",
1323
- "end": "\\)",
1324
1252
  "endCaptures": {
1325
1253
  "0": {
1326
- "name": "punctuation.definition.string.end.crystal"
1254
+ "name": "punctuation.section.array.end.crystal"
1327
1255
  }
1328
- },
1256
+ }
1257
+ },
1258
+ {
1329
1259
  "name": "string.quoted.other.interpolated.crystal",
1260
+ "begin": "%Q\\(",
1261
+ "end": "\\)",
1330
1262
  "patterns": [
1331
1263
  {
1332
1264
  "include": "#interpolated_crystal"
@@ -1337,23 +1269,22 @@
1337
1269
  {
1338
1270
  "include": "#nest_parens_i"
1339
1271
  }
1340
- ]
1341
- },
1342
- {
1343
- "begin": "%Q\\[",
1272
+ ],
1344
1273
  "beginCaptures": {
1345
1274
  "0": {
1346
1275
  "name": "punctuation.definition.string.begin.crystal"
1347
1276
  }
1348
1277
  },
1349
- "comment": "string literal with interpolation and [] delimitor",
1350
- "end": "\\]",
1351
1278
  "endCaptures": {
1352
1279
  "0": {
1353
1280
  "name": "punctuation.definition.string.end.crystal"
1354
1281
  }
1355
- },
1282
+ }
1283
+ },
1284
+ {
1356
1285
  "name": "string.quoted.other.interpolated.crystal",
1286
+ "begin": "%Q\\[",
1287
+ "end": "\\]",
1357
1288
  "patterns": [
1358
1289
  {
1359
1290
  "include": "#interpolated_crystal"
@@ -1364,23 +1295,22 @@
1364
1295
  {
1365
1296
  "include": "#nest_brackets_i"
1366
1297
  }
1367
- ]
1368
- },
1369
- {
1370
- "begin": "%Q\\<",
1298
+ ],
1371
1299
  "beginCaptures": {
1372
1300
  "0": {
1373
1301
  "name": "punctuation.definition.string.begin.crystal"
1374
1302
  }
1375
1303
  },
1376
- "comment": "string literal with interpolation and <> delimitor",
1377
- "end": "\\>",
1378
1304
  "endCaptures": {
1379
1305
  "0": {
1380
1306
  "name": "punctuation.definition.string.end.crystal"
1381
1307
  }
1382
- },
1308
+ }
1309
+ },
1310
+ {
1383
1311
  "name": "string.quoted.other.interpolated.crystal",
1312
+ "begin": "%Q\\\u003c",
1313
+ "end": "\\\u003e",
1384
1314
  "patterns": [
1385
1315
  {
1386
1316
  "include": "#interpolated_crystal"
@@ -1391,23 +1321,22 @@
1391
1321
  {
1392
1322
  "include": "#nest_ltgt_i"
1393
1323
  }
1394
- ]
1395
- },
1396
- {
1397
- "begin": "%Q\\{",
1324
+ ],
1398
1325
  "beginCaptures": {
1399
1326
  "0": {
1400
1327
  "name": "punctuation.definition.string.begin.crystal"
1401
1328
  }
1402
1329
  },
1403
- "comment": "string literal with interpolation and {} delimitor",
1404
- "end": "\\}",
1405
1330
  "endCaptures": {
1406
1331
  "0": {
1407
1332
  "name": "punctuation.definition.string.end.crystal"
1408
1333
  }
1409
- },
1334
+ }
1335
+ },
1336
+ {
1410
1337
  "name": "string.quoted.other.interpolated.crystal",
1338
+ "begin": "%Q\\{",
1339
+ "end": "\\}",
1411
1340
  "patterns": [
1412
1341
  {
1413
1342
  "include": "#interpolated_crystal"
@@ -1418,23 +1347,22 @@
1418
1347
  {
1419
1348
  "include": "#nest_curly_i"
1420
1349
  }
1421
- ]
1422
- },
1423
- {
1424
- "begin": "%Q([^\\w])",
1350
+ ],
1425
1351
  "beginCaptures": {
1426
1352
  "0": {
1427
1353
  "name": "punctuation.definition.string.begin.crystal"
1428
1354
  }
1429
1355
  },
1430
- "comment": "string literal with interpolation and wildcard delimitor",
1431
- "end": "\\1",
1432
1356
  "endCaptures": {
1433
1357
  "0": {
1434
1358
  "name": "punctuation.definition.string.end.crystal"
1435
1359
  }
1436
- },
1360
+ }
1361
+ },
1362
+ {
1437
1363
  "name": "string.quoted.other.interpolated.crystal",
1364
+ "begin": "%Q([^\\w])",
1365
+ "end": "\\1",
1438
1366
  "patterns": [
1439
1367
  {
1440
1368
  "include": "#interpolated_crystal"
@@ -1442,22 +1370,22 @@
1442
1370
  {
1443
1371
  "include": "#escaped_char"
1444
1372
  }
1445
- ]
1446
- },
1447
- {
1448
- "begin": "%\\{",
1373
+ ],
1449
1374
  "beginCaptures": {
1450
1375
  "0": {
1451
1376
  "name": "punctuation.definition.string.begin.crystal"
1452
1377
  }
1453
1378
  },
1454
- "end": "\\}",
1455
1379
  "endCaptures": {
1456
1380
  "0": {
1457
1381
  "name": "punctuation.definition.string.end.crystal"
1458
1382
  }
1459
- },
1383
+ }
1384
+ },
1385
+ {
1460
1386
  "name": "string.quoted.other.interpolated.crystal",
1387
+ "begin": "%\\{",
1388
+ "end": "\\}",
1461
1389
  "patterns": [
1462
1390
  {
1463
1391
  "include": "#interpolated_crystal"
@@ -1468,22 +1396,22 @@
1468
1396
  {
1469
1397
  "include": "#nest_curly"
1470
1398
  }
1471
- ]
1472
- },
1473
- {
1474
- "begin": "%\\[",
1399
+ ],
1475
1400
  "beginCaptures": {
1476
1401
  "0": {
1477
1402
  "name": "punctuation.definition.string.begin.crystal"
1478
1403
  }
1479
1404
  },
1480
- "end": "\\]",
1481
1405
  "endCaptures": {
1482
1406
  "0": {
1483
1407
  "name": "punctuation.definition.string.end.crystal"
1484
1408
  }
1485
- },
1409
+ }
1410
+ },
1411
+ {
1486
1412
  "name": "string.quoted.other.interpolated.crystal",
1413
+ "begin": "%\\[",
1414
+ "end": "\\]",
1487
1415
  "patterns": [
1488
1416
  {
1489
1417
  "include": "#interpolated_crystal"
@@ -1494,22 +1422,22 @@
1494
1422
  {
1495
1423
  "include": "#nest_brackets"
1496
1424
  }
1497
- ]
1498
- },
1499
- {
1500
- "begin": "%\\(",
1425
+ ],
1501
1426
  "beginCaptures": {
1502
1427
  "0": {
1503
1428
  "name": "punctuation.definition.string.begin.crystal"
1504
1429
  }
1505
1430
  },
1506
- "end": "\\)",
1507
1431
  "endCaptures": {
1508
1432
  "0": {
1509
1433
  "name": "punctuation.definition.string.end.crystal"
1510
1434
  }
1511
- },
1435
+ }
1436
+ },
1437
+ {
1512
1438
  "name": "string.quoted.other.interpolated.crystal",
1439
+ "begin": "%\\(",
1440
+ "end": "\\)",
1513
1441
  "patterns": [
1514
1442
  {
1515
1443
  "include": "#interpolated_crystal"
@@ -1520,22 +1448,22 @@
1520
1448
  {
1521
1449
  "include": "#nest_parens"
1522
1450
  }
1523
- ]
1524
- },
1525
- {
1526
- "begin": "%\\<",
1451
+ ],
1527
1452
  "beginCaptures": {
1528
1453
  "0": {
1529
1454
  "name": "punctuation.definition.string.begin.crystal"
1530
1455
  }
1531
1456
  },
1532
- "end": "\\>",
1533
1457
  "endCaptures": {
1534
1458
  "0": {
1535
1459
  "name": "punctuation.definition.string.end.crystal"
1536
1460
  }
1537
- },
1461
+ }
1462
+ },
1463
+ {
1538
1464
  "name": "string.quoted.other.interpolated.crystal",
1465
+ "begin": "%\\\u003c",
1466
+ "end": "\\\u003e",
1539
1467
  "patterns": [
1540
1468
  {
1541
1469
  "include": "#interpolated_crystal"
@@ -1546,332 +1474,317 @@
1546
1474
  {
1547
1475
  "include": "#nest_ltgt"
1548
1476
  }
1549
- ]
1550
- },
1551
- {
1552
- "begin": "%q\\(",
1477
+ ],
1553
1478
  "beginCaptures": {
1554
1479
  "0": {
1555
1480
  "name": "punctuation.definition.string.begin.crystal"
1556
1481
  }
1557
1482
  },
1558
- "comment": "string literal with () delimitor",
1559
- "end": "\\)",
1560
1483
  "endCaptures": {
1561
1484
  "0": {
1562
1485
  "name": "punctuation.definition.string.end.crystal"
1563
1486
  }
1564
- },
1487
+ }
1488
+ },
1489
+ {
1565
1490
  "name": "string.quoted.other.crystal",
1491
+ "begin": "%q\\(",
1492
+ "end": "\\)",
1566
1493
  "patterns": [
1567
1494
  {
1568
- "match": "\\\\\\)|\\\\\\\\",
1569
- "name": "constant.character.escape.crystal"
1495
+ "name": "constant.character.escape.crystal",
1496
+ "match": "\\\\\\)|\\\\\\\\"
1570
1497
  },
1571
1498
  {
1572
1499
  "include": "#nest_parens"
1573
1500
  }
1574
- ]
1575
- },
1576
- {
1577
- "begin": "%q\\<",
1501
+ ],
1578
1502
  "beginCaptures": {
1579
1503
  "0": {
1580
1504
  "name": "punctuation.definition.string.begin.crystal"
1581
1505
  }
1582
1506
  },
1583
- "comment": "string literal with <> delimitor",
1584
- "end": "\\>",
1585
1507
  "endCaptures": {
1586
1508
  "0": {
1587
1509
  "name": "punctuation.definition.string.end.crystal"
1588
1510
  }
1589
- },
1511
+ }
1512
+ },
1513
+ {
1590
1514
  "name": "string.quoted.other.crystal",
1515
+ "begin": "%q\\\u003c",
1516
+ "end": "\\\u003e",
1591
1517
  "patterns": [
1592
1518
  {
1593
- "match": "\\\\\\>|\\\\\\\\",
1594
- "name": "constant.character.escape.crystal"
1519
+ "name": "constant.character.escape.crystal",
1520
+ "match": "\\\\\\\u003e|\\\\\\\\"
1595
1521
  },
1596
1522
  {
1597
1523
  "include": "#nest_ltgt"
1598
1524
  }
1599
- ]
1600
- },
1601
- {
1602
- "begin": "%q\\[",
1525
+ ],
1603
1526
  "beginCaptures": {
1604
1527
  "0": {
1605
1528
  "name": "punctuation.definition.string.begin.crystal"
1606
1529
  }
1607
1530
  },
1608
- "comment": "string literal with [] delimitor",
1609
- "end": "\\]",
1610
1531
  "endCaptures": {
1611
1532
  "0": {
1612
1533
  "name": "punctuation.definition.string.end.crystal"
1613
1534
  }
1614
- },
1535
+ }
1536
+ },
1537
+ {
1615
1538
  "name": "string.quoted.other.crystal",
1539
+ "begin": "%q\\[",
1540
+ "end": "\\]",
1616
1541
  "patterns": [
1617
1542
  {
1618
- "match": "\\\\\\]|\\\\\\\\",
1619
- "name": "constant.character.escape.crystal"
1543
+ "name": "constant.character.escape.crystal",
1544
+ "match": "\\\\\\]|\\\\\\\\"
1620
1545
  },
1621
1546
  {
1622
1547
  "include": "#nest_brackets"
1623
1548
  }
1624
- ]
1625
- },
1626
- {
1627
- "begin": "%q\\{",
1549
+ ],
1628
1550
  "beginCaptures": {
1629
1551
  "0": {
1630
1552
  "name": "punctuation.definition.string.begin.crystal"
1631
1553
  }
1632
1554
  },
1633
- "comment": "string literal with {} delimitor",
1634
- "end": "\\}",
1635
1555
  "endCaptures": {
1636
1556
  "0": {
1637
1557
  "name": "punctuation.definition.string.end.crystal"
1638
1558
  }
1639
- },
1559
+ }
1560
+ },
1561
+ {
1640
1562
  "name": "string.quoted.other.crystal",
1563
+ "begin": "%q\\{",
1564
+ "end": "\\}",
1641
1565
  "patterns": [
1642
1566
  {
1643
- "match": "\\\\\\}|\\\\\\\\",
1644
- "name": "constant.character.escape.crystal"
1567
+ "name": "constant.character.escape.crystal",
1568
+ "match": "\\\\\\}|\\\\\\\\"
1645
1569
  },
1646
1570
  {
1647
1571
  "include": "#nest_curly"
1648
1572
  }
1649
- ]
1650
- },
1651
- {
1652
- "begin": "%q([^\\w])",
1573
+ ],
1653
1574
  "beginCaptures": {
1654
1575
  "0": {
1655
1576
  "name": "punctuation.definition.string.begin.crystal"
1656
1577
  }
1657
1578
  },
1658
- "comment": "string literal with wildcard delimitor",
1659
- "end": "\\1",
1660
1579
  "endCaptures": {
1661
1580
  "0": {
1662
1581
  "name": "punctuation.definition.string.end.crystal"
1663
1582
  }
1664
- },
1583
+ }
1584
+ },
1585
+ {
1665
1586
  "name": "string.quoted.other.crystal",
1587
+ "begin": "%q([^\\w])",
1588
+ "end": "\\1",
1666
1589
  "patterns": [
1667
1590
  {
1668
- "comment": "Cant be named because its not neccesarily an escape.",
1669
1591
  "match": "\\\\."
1670
1592
  }
1671
- ]
1672
- },
1673
- {
1674
- "begin": "%s\\(",
1593
+ ],
1675
1594
  "beginCaptures": {
1676
1595
  "0": {
1677
- "name": "punctuation.definition.symbol.begin.crystal"
1596
+ "name": "punctuation.definition.string.begin.crystal"
1678
1597
  }
1679
1598
  },
1680
- "comment": "symbol literal with () delimitor",
1681
- "end": "\\)",
1682
1599
  "endCaptures": {
1683
1600
  "0": {
1684
- "name": "punctuation.definition.symbol.end.crystal"
1601
+ "name": "punctuation.definition.string.end.crystal"
1685
1602
  }
1686
- },
1603
+ }
1604
+ },
1605
+ {
1687
1606
  "name": "constant.other.symbol.crystal",
1607
+ "begin": "%s\\(",
1608
+ "end": "\\)",
1688
1609
  "patterns": [
1689
1610
  {
1690
- "match": "\\\\\\)|\\\\\\\\",
1691
- "name": "constant.character.escape.crystal"
1611
+ "name": "constant.character.escape.crystal",
1612
+ "match": "\\\\\\)|\\\\\\\\"
1692
1613
  },
1693
1614
  {
1694
1615
  "include": "#nest_parens"
1695
1616
  }
1696
- ]
1697
- },
1698
- {
1699
- "begin": "%s\\<",
1617
+ ],
1700
1618
  "beginCaptures": {
1701
1619
  "0": {
1702
1620
  "name": "punctuation.definition.symbol.begin.crystal"
1703
1621
  }
1704
1622
  },
1705
- "comment": "symbol literal with <> delimitor",
1706
- "end": "\\>",
1707
1623
  "endCaptures": {
1708
1624
  "0": {
1709
1625
  "name": "punctuation.definition.symbol.end.crystal"
1710
1626
  }
1711
- },
1627
+ }
1628
+ },
1629
+ {
1712
1630
  "name": "constant.other.symbol.crystal",
1631
+ "begin": "%s\\\u003c",
1632
+ "end": "\\\u003e",
1713
1633
  "patterns": [
1714
1634
  {
1715
- "match": "\\\\\\>|\\\\\\\\",
1716
- "name": "constant.character.escape.crystal"
1635
+ "name": "constant.character.escape.crystal",
1636
+ "match": "\\\\\\\u003e|\\\\\\\\"
1717
1637
  },
1718
1638
  {
1719
1639
  "include": "#nest_ltgt"
1720
1640
  }
1721
- ]
1722
- },
1723
- {
1724
- "begin": "%s\\[",
1641
+ ],
1725
1642
  "beginCaptures": {
1726
1643
  "0": {
1727
1644
  "name": "punctuation.definition.symbol.begin.crystal"
1728
1645
  }
1729
1646
  },
1730
- "comment": "symbol literal with [] delimitor",
1731
- "end": "\\]",
1732
1647
  "endCaptures": {
1733
1648
  "0": {
1734
1649
  "name": "punctuation.definition.symbol.end.crystal"
1735
1650
  }
1736
- },
1651
+ }
1652
+ },
1653
+ {
1737
1654
  "name": "constant.other.symbol.crystal",
1655
+ "begin": "%s\\[",
1656
+ "end": "\\]",
1738
1657
  "patterns": [
1739
1658
  {
1740
- "match": "\\\\\\]|\\\\\\\\",
1741
- "name": "constant.character.escape.crystal"
1659
+ "name": "constant.character.escape.crystal",
1660
+ "match": "\\\\\\]|\\\\\\\\"
1742
1661
  },
1743
1662
  {
1744
1663
  "include": "#nest_brackets"
1745
1664
  }
1746
- ]
1747
- },
1748
- {
1749
- "begin": "%s\\{",
1665
+ ],
1750
1666
  "beginCaptures": {
1751
1667
  "0": {
1752
1668
  "name": "punctuation.definition.symbol.begin.crystal"
1753
1669
  }
1754
1670
  },
1755
- "comment": "symbol literal with {} delimitor",
1756
- "end": "\\}",
1757
1671
  "endCaptures": {
1758
1672
  "0": {
1759
1673
  "name": "punctuation.definition.symbol.end.crystal"
1760
1674
  }
1761
- },
1675
+ }
1676
+ },
1677
+ {
1762
1678
  "name": "constant.other.symbol.crystal",
1679
+ "begin": "%s\\{",
1680
+ "end": "\\}",
1763
1681
  "patterns": [
1764
1682
  {
1765
- "match": "\\\\\\}|\\\\\\\\",
1766
- "name": "constant.character.escape.crystal"
1683
+ "name": "constant.character.escape.crystal",
1684
+ "match": "\\\\\\}|\\\\\\\\"
1767
1685
  },
1768
1686
  {
1769
1687
  "include": "#nest_curly"
1770
1688
  }
1771
- ]
1772
- },
1773
- {
1774
- "begin": "%s([^\\w])",
1689
+ ],
1775
1690
  "beginCaptures": {
1776
1691
  "0": {
1777
1692
  "name": "punctuation.definition.symbol.begin.crystal"
1778
1693
  }
1779
1694
  },
1780
- "comment": "symbol literal with wildcard delimitor",
1781
- "end": "\\1",
1782
1695
  "endCaptures": {
1783
1696
  "0": {
1784
1697
  "name": "punctuation.definition.symbol.end.crystal"
1785
1698
  }
1786
- },
1699
+ }
1700
+ },
1701
+ {
1787
1702
  "name": "constant.other.symbol.crystal",
1703
+ "begin": "%s([^\\w])",
1704
+ "end": "\\1",
1788
1705
  "patterns": [
1789
1706
  {
1790
- "comment": "Cant be named because its not neccesarily an escape.",
1791
1707
  "match": "\\\\."
1792
1708
  }
1793
- ]
1709
+ ],
1710
+ "beginCaptures": {
1711
+ "0": {
1712
+ "name": "punctuation.definition.symbol.begin.crystal"
1713
+ }
1714
+ },
1715
+ "endCaptures": {
1716
+ "0": {
1717
+ "name": "punctuation.definition.symbol.end.crystal"
1718
+ }
1719
+ }
1794
1720
  },
1795
1721
  {
1722
+ "name": "constant.other.symbol.crystal",
1723
+ "match": "(?\u003c!:)(:)(?\u003e[$a-zA-Z_]\\w*(?\u003e[?!]|=(?![\u003e=]))?|===?|\u003c=\u003e|\u003e[\u003e=]?|\u003c[\u003c=]?|[%\u0026`/\\|]|\\*\\*?|=?~|[-+]@?|\\[\\]=?|@@?[a-zA-Z_]\\w*)",
1796
1724
  "captures": {
1797
1725
  "1": {
1798
1726
  "name": "punctuation.definition.constant.crystal"
1799
1727
  }
1800
- },
1801
- "comment": "symbols",
1802
- "match": "(?<!:)(:)(?>[$a-zA-Z_]\\w*(?>[?!]|=(?![>=]))?|===?|<=>|>[>=]?|<[<=]?|[%&`/\\|]|\\*\\*?|=?~|[-+]@?|\\[\\]=?|@@?[a-zA-Z_]\\w*)",
1803
- "name": "constant.other.symbol.crystal"
1728
+ }
1804
1729
  },
1805
1730
  {
1806
1731
  "begin": "(^[ \\t]+)?(?=#)",
1807
- "beginCaptures": {
1808
- "1": {
1809
- "name": "punctuation.whitespace.comment.leading.crystal"
1810
- }
1811
- },
1812
1732
  "end": "(?!\\G)",
1813
1733
  "patterns": [
1814
1734
  {
1735
+ "name": "comment.line.number-sign.crystal",
1815
1736
  "begin": "#",
1816
- "beginCaptures": {
1817
- "0": {
1818
- "name": "punctuation.definition.comment.crystal"
1819
- }
1820
- },
1821
1737
  "end": "\\n",
1822
- "name": "comment.line.number-sign.crystal",
1823
1738
  "patterns": [
1824
1739
  {
1825
1740
  "include": "#yard"
1826
1741
  }
1827
- ]
1742
+ ],
1743
+ "beginCaptures": {
1744
+ "0": {
1745
+ "name": "punctuation.definition.comment.crystal"
1746
+ }
1747
+ }
1828
1748
  }
1829
- ]
1749
+ ],
1750
+ "beginCaptures": {
1751
+ "1": {
1752
+ "name": "punctuation.whitespace.comment.leading.crystal"
1753
+ }
1754
+ }
1830
1755
  },
1831
1756
  {
1832
- "begin": "^__END__\\n",
1833
- "captures": {
1834
- "0": {
1835
- "name": "string.unquoted.program-block.crystal"
1836
- }
1837
- },
1838
- "comment": "__END__ marker",
1839
1757
  "contentName": "text.plain",
1758
+ "begin": "^__END__\\n",
1840
1759
  "end": "(?=not)impossible",
1841
1760
  "patterns": [
1842
1761
  {
1843
- "begin": "(?=<?xml|<(?i:html\\b)|!DOCTYPE (?i:html\\b))",
1844
- "end": "(?=not)impossible",
1845
1762
  "name": "text.html.embedded.crystal",
1763
+ "begin": "(?=\u003c?xml|\u003c(?i:html\\b)|!DOCTYPE (?i:html\\b))",
1764
+ "end": "(?=not)impossible",
1846
1765
  "patterns": [
1847
1766
  {
1848
1767
  "include": "text.html.basic"
1849
1768
  }
1850
1769
  ]
1851
1770
  }
1852
- ]
1771
+ ],
1772
+ "captures": {
1773
+ "0": {
1774
+ "name": "string.unquoted.program-block.crystal"
1775
+ }
1776
+ }
1853
1777
  },
1854
1778
  {
1855
- "begin": "(?=(?><<-(\"?)((?:[_\\w]+_|)HTML)\\b\\1))",
1856
- "comment": "Heredoc with embedded html",
1857
- "end": "(?!\\G)",
1858
1779
  "name": "meta.embedded.block.html",
1780
+ "begin": "(?=(?\u003e\u003c\u003c-(\"?)((?:[_\\w]+_|)HTML)\\b\\1))",
1781
+ "end": "(?!\\G)",
1859
1782
  "patterns": [
1860
1783
  {
1861
- "begin": "(?><<-(\"?)((?:[_\\w]+_|)HTML)\\b\\1)",
1862
- "beginCaptures": {
1863
- "0": {
1864
- "name": "punctuation.definition.string.begin.crystal"
1865
- }
1866
- },
1784
+ "name": "string.unquoted.heredoc.crystal",
1867
1785
  "contentName": "text.html",
1786
+ "begin": "(?\u003e\u003c\u003c-(\"?)((?:[_\\w]+_|)HTML)\\b\\1)",
1868
1787
  "end": "\\s*\\2$\\n?",
1869
- "endCaptures": {
1870
- "0": {
1871
- "name": "punctuation.definition.string.end.crystal"
1872
- }
1873
- },
1874
- "name": "string.unquoted.heredoc.crystal",
1875
1788
  "patterns": [
1876
1789
  {
1877
1790
  "include": "#heredoc"
@@ -1885,31 +1798,30 @@
1885
1798
  {
1886
1799
  "include": "#escaped_char"
1887
1800
  }
1888
- ]
1889
- }
1890
- ]
1891
- },
1892
- {
1893
- "begin": "(?=(?><<-(\"?)((?:[_\\w]+_|)SQL)\\b\\1))",
1894
- "comment": "Heredoc with embedded sql",
1895
- "end": "(?!\\G)",
1896
- "name": "meta.embedded.block.sql",
1897
- "patterns": [
1898
- {
1899
- "begin": "(?><<-(\"?)((?:[_\\w]+_|)SQL)\\b\\1)",
1801
+ ],
1900
1802
  "beginCaptures": {
1901
1803
  "0": {
1902
1804
  "name": "punctuation.definition.string.begin.crystal"
1903
1805
  }
1904
1806
  },
1905
- "contentName": "source.sql",
1906
- "end": "\\s*\\2$\\n?",
1907
1807
  "endCaptures": {
1908
1808
  "0": {
1909
1809
  "name": "punctuation.definition.string.end.crystal"
1910
1810
  }
1911
- },
1811
+ }
1812
+ }
1813
+ ]
1814
+ },
1815
+ {
1816
+ "name": "meta.embedded.block.sql",
1817
+ "begin": "(?=(?\u003e\u003c\u003c-(\"?)((?:[_\\w]+_|)SQL)\\b\\1))",
1818
+ "end": "(?!\\G)",
1819
+ "patterns": [
1820
+ {
1912
1821
  "name": "string.unquoted.heredoc.crystal",
1822
+ "contentName": "source.sql",
1823
+ "begin": "(?\u003e\u003c\u003c-(\"?)((?:[_\\w]+_|)SQL)\\b\\1)",
1824
+ "end": "\\s*\\2$\\n?",
1913
1825
  "patterns": [
1914
1826
  {
1915
1827
  "include": "#heredoc"
@@ -1923,31 +1835,30 @@
1923
1835
  {
1924
1836
  "include": "#escaped_char"
1925
1837
  }
1926
- ]
1927
- }
1928
- ]
1929
- },
1930
- {
1931
- "begin": "(?=(?><<-(\"?)((?:[_\\w]+_|)CSS)\\b\\1))",
1932
- "comment": "Heredoc with embedded css",
1933
- "end": "(?!\\G)",
1934
- "name": "meta.embedded.block.css",
1935
- "patterns": [
1936
- {
1937
- "begin": "(?><<-(\"?)((?:[_\\w]+_|)CSS)\\b\\1)",
1838
+ ],
1938
1839
  "beginCaptures": {
1939
1840
  "0": {
1940
1841
  "name": "punctuation.definition.string.begin.crystal"
1941
1842
  }
1942
1843
  },
1943
- "contentName": "source.css",
1944
- "end": "\\s*\\2$\\n?",
1945
1844
  "endCaptures": {
1946
1845
  "0": {
1947
1846
  "name": "punctuation.definition.string.end.crystal"
1948
1847
  }
1949
- },
1848
+ }
1849
+ }
1850
+ ]
1851
+ },
1852
+ {
1853
+ "name": "meta.embedded.block.css",
1854
+ "begin": "(?=(?\u003e\u003c\u003c-(\"?)((?:[_\\w]+_|)CSS)\\b\\1))",
1855
+ "end": "(?!\\G)",
1856
+ "patterns": [
1857
+ {
1950
1858
  "name": "string.unquoted.heredoc.crystal",
1859
+ "contentName": "source.css",
1860
+ "begin": "(?\u003e\u003c\u003c-(\"?)((?:[_\\w]+_|)CSS)\\b\\1)",
1861
+ "end": "\\s*\\2$\\n?",
1951
1862
  "patterns": [
1952
1863
  {
1953
1864
  "include": "#heredoc"
@@ -1961,31 +1872,30 @@
1961
1872
  {
1962
1873
  "include": "#escaped_char"
1963
1874
  }
1964
- ]
1965
- }
1966
- ]
1967
- },
1968
- {
1969
- "begin": "(?=(?><<-(\"?)((?:[_\\w]+_|)CPP)\\b\\1))",
1970
- "comment": "Heredoc with embedded c++",
1971
- "end": "(?!\\G)",
1972
- "name": "meta.embedded.block.cpp",
1973
- "patterns": [
1974
- {
1975
- "begin": "(?><<-(\"?)((?:[_\\w]+_|)CPP)\\b\\1)",
1875
+ ],
1976
1876
  "beginCaptures": {
1977
1877
  "0": {
1978
1878
  "name": "punctuation.definition.string.begin.crystal"
1979
1879
  }
1980
1880
  },
1981
- "contentName": "source.cpp",
1982
- "end": "\\s*\\2$\\n?",
1983
1881
  "endCaptures": {
1984
1882
  "0": {
1985
1883
  "name": "punctuation.definition.string.end.crystal"
1986
1884
  }
1987
- },
1885
+ }
1886
+ }
1887
+ ]
1888
+ },
1889
+ {
1890
+ "name": "meta.embedded.block.cpp",
1891
+ "begin": "(?=(?\u003e\u003c\u003c-(\"?)((?:[_\\w]+_|)CPP)\\b\\1))",
1892
+ "end": "(?!\\G)",
1893
+ "patterns": [
1894
+ {
1988
1895
  "name": "string.unquoted.heredoc.crystal",
1896
+ "contentName": "source.cpp",
1897
+ "begin": "(?\u003e\u003c\u003c-(\"?)((?:[_\\w]+_|)CPP)\\b\\1)",
1898
+ "end": "\\s*\\2$\\n?",
1989
1899
  "patterns": [
1990
1900
  {
1991
1901
  "include": "#heredoc"
@@ -1994,36 +1904,35 @@
1994
1904
  "include": "#interpolated_crystal"
1995
1905
  },
1996
1906
  {
1997
- "include": "source.cpp"
1907
+ "include": "source.c++"
1998
1908
  },
1999
1909
  {
2000
1910
  "include": "#escaped_char"
2001
1911
  }
2002
- ]
2003
- }
2004
- ]
2005
- },
2006
- {
2007
- "begin": "(?=(?><<-(\"?)((?:[_\\w]+_|)C)\\b\\1))",
2008
- "comment": "Heredoc with embedded c",
2009
- "end": "(?!\\G)",
2010
- "name": "meta.embedded.block.c",
2011
- "patterns": [
2012
- {
2013
- "begin": "(?><<-(\"?)((?:[_\\w]+_|)C)\\b\\1)",
1912
+ ],
2014
1913
  "beginCaptures": {
2015
1914
  "0": {
2016
1915
  "name": "punctuation.definition.string.begin.crystal"
2017
1916
  }
2018
1917
  },
2019
- "contentName": "source.c",
2020
- "end": "\\s*\\2$\\n?",
2021
1918
  "endCaptures": {
2022
1919
  "0": {
2023
1920
  "name": "punctuation.definition.string.end.crystal"
2024
1921
  }
2025
- },
1922
+ }
1923
+ }
1924
+ ]
1925
+ },
1926
+ {
1927
+ "name": "meta.embedded.block.c",
1928
+ "begin": "(?=(?\u003e\u003c\u003c-(\"?)((?:[_\\w]+_|)C)\\b\\1))",
1929
+ "end": "(?!\\G)",
1930
+ "patterns": [
1931
+ {
2026
1932
  "name": "string.unquoted.heredoc.crystal",
1933
+ "contentName": "source.c",
1934
+ "begin": "(?\u003e\u003c\u003c-(\"?)((?:[_\\w]+_|)C)\\b\\1)",
1935
+ "end": "\\s*\\2$\\n?",
2027
1936
  "patterns": [
2028
1937
  {
2029
1938
  "include": "#heredoc"
@@ -2037,31 +1946,30 @@
2037
1946
  {
2038
1947
  "include": "#escaped_char"
2039
1948
  }
2040
- ]
2041
- }
2042
- ]
2043
- },
2044
- {
2045
- "begin": "(?=(?><<-(\"?)((?:[_\\w]+_|)(?:JS|JAVASCRIPT))\\b\\1))",
2046
- "comment": "Heredoc with embedded javascript",
2047
- "end": "(?!\\G)",
2048
- "name": "meta.embedded.block.js",
2049
- "patterns": [
2050
- {
2051
- "begin": "(?><<-(\"?)((?:[_\\w]+_|)(?:JS|JAVASCRIPT))\\b\\1)",
1949
+ ],
2052
1950
  "beginCaptures": {
2053
1951
  "0": {
2054
1952
  "name": "punctuation.definition.string.begin.crystal"
2055
1953
  }
2056
1954
  },
2057
- "contentName": "source.js",
2058
- "end": "\\s*\\2$\\n?",
2059
1955
  "endCaptures": {
2060
1956
  "0": {
2061
1957
  "name": "punctuation.definition.string.end.crystal"
2062
1958
  }
2063
- },
1959
+ }
1960
+ }
1961
+ ]
1962
+ },
1963
+ {
1964
+ "name": "meta.embedded.block.js",
1965
+ "begin": "(?=(?\u003e\u003c\u003c-(\"?)((?:[_\\w]+_|)(?:JS|JAVASCRIPT))\\b\\1))",
1966
+ "end": "(?!\\G)",
1967
+ "patterns": [
1968
+ {
2064
1969
  "name": "string.unquoted.heredoc.crystal",
1970
+ "contentName": "source.js",
1971
+ "begin": "(?\u003e\u003c\u003c-(\"?)((?:[_\\w]+_|)(?:JS|JAVASCRIPT))\\b\\1)",
1972
+ "end": "\\s*\\2$\\n?",
2065
1973
  "patterns": [
2066
1974
  {
2067
1975
  "include": "#heredoc"
@@ -2075,31 +1983,30 @@
2075
1983
  {
2076
1984
  "include": "#escaped_char"
2077
1985
  }
2078
- ]
2079
- }
2080
- ]
2081
- },
2082
- {
2083
- "begin": "(?=(?><<-(\"?)((?:[_\\w]+_|)JQUERY)\\b\\1))",
2084
- "comment": "Heredoc with embedded jQuery javascript",
2085
- "end": "(?!\\G)",
2086
- "name": "meta.embedded.block.js.jquery",
2087
- "patterns": [
2088
- {
2089
- "begin": "(?><<-(\"?)((?:[_\\w]+_|)JQUERY)\\b\\1)",
1986
+ ],
2090
1987
  "beginCaptures": {
2091
1988
  "0": {
2092
1989
  "name": "punctuation.definition.string.begin.crystal"
2093
1990
  }
2094
1991
  },
2095
- "contentName": "source.js.jquery",
2096
- "end": "\\s*\\2$\\n?",
2097
1992
  "endCaptures": {
2098
1993
  "0": {
2099
1994
  "name": "punctuation.definition.string.end.crystal"
2100
1995
  }
2101
- },
1996
+ }
1997
+ }
1998
+ ]
1999
+ },
2000
+ {
2001
+ "name": "meta.embedded.block.js.jquery",
2002
+ "begin": "(?=(?\u003e\u003c\u003c-(\"?)((?:[_\\w]+_|)JQUERY)\\b\\1))",
2003
+ "end": "(?!\\G)",
2004
+ "patterns": [
2005
+ {
2102
2006
  "name": "string.unquoted.heredoc.crystal",
2007
+ "contentName": "source.js.jquery",
2008
+ "begin": "(?\u003e\u003c\u003c-(\"?)((?:[_\\w]+_|)JQUERY)\\b\\1)",
2009
+ "end": "\\s*\\2$\\n?",
2103
2010
  "patterns": [
2104
2011
  {
2105
2012
  "include": "#heredoc"
@@ -2107,37 +2014,34 @@
2107
2014
  {
2108
2015
  "include": "#interpolated_crystal"
2109
2016
  },
2110
- {
2111
- "include": "source.js.jquery"
2112
- },
2017
+ {},
2113
2018
  {
2114
2019
  "include": "#escaped_char"
2115
2020
  }
2116
- ]
2117
- }
2118
- ]
2119
- },
2120
- {
2121
- "begin": "(?=(?><<-(\"?)((?:[_\\w]+_|)(?:SH|SHELL))\\b\\1))",
2122
- "comment": "Heredoc with embedded shell",
2123
- "end": "(?!\\G)",
2124
- "name": "meta.embedded.block.shell",
2125
- "patterns": [
2126
- {
2127
- "begin": "(?><<-(\"?)((?:[_\\w]+_|)(?:SH|SHELL))\\b\\1)",
2021
+ ],
2128
2022
  "beginCaptures": {
2129
2023
  "0": {
2130
2024
  "name": "punctuation.definition.string.begin.crystal"
2131
2025
  }
2132
2026
  },
2133
- "contentName": "source.shell",
2134
- "end": "\\s*\\2$\\n?",
2135
2027
  "endCaptures": {
2136
2028
  "0": {
2137
2029
  "name": "punctuation.definition.string.end.crystal"
2138
2030
  }
2139
- },
2031
+ }
2032
+ }
2033
+ ]
2034
+ },
2035
+ {
2036
+ "name": "meta.embedded.block.shell",
2037
+ "begin": "(?=(?\u003e\u003c\u003c-(\"?)((?:[_\\w]+_|)(?:SH|SHELL))\\b\\1))",
2038
+ "end": "(?!\\G)",
2039
+ "patterns": [
2040
+ {
2140
2041
  "name": "string.unquoted.heredoc.crystal",
2042
+ "contentName": "source.shell",
2043
+ "begin": "(?\u003e\u003c\u003c-(\"?)((?:[_\\w]+_|)(?:SH|SHELL))\\b\\1)",
2044
+ "end": "\\s*\\2$\\n?",
2141
2045
  "patterns": [
2142
2046
  {
2143
2047
  "include": "#heredoc"
@@ -2151,31 +2055,30 @@
2151
2055
  {
2152
2056
  "include": "#escaped_char"
2153
2057
  }
2154
- ]
2155
- }
2156
- ]
2157
- },
2158
- {
2159
- "begin": "(?=(?><<-(\"?)((?:[_\\w]+_|)LUA)\\b\\1))",
2160
- "comment": "Heredoc with embedded lua",
2161
- "end": "(?!\\G)",
2162
- "name": "meta.embedded.block.lua",
2163
- "patterns": [
2164
- {
2165
- "begin": "(?><<-(\"?)((?:[_\\w]+_|)LUA)\\b\\1)",
2058
+ ],
2166
2059
  "beginCaptures": {
2167
2060
  "0": {
2168
2061
  "name": "punctuation.definition.string.begin.crystal"
2169
2062
  }
2170
2063
  },
2171
- "contentName": "source.lua",
2172
- "end": "\\s*\\2$\\n?",
2173
2064
  "endCaptures": {
2174
2065
  "0": {
2175
2066
  "name": "punctuation.definition.string.end.crystal"
2176
2067
  }
2177
- },
2068
+ }
2069
+ }
2070
+ ]
2071
+ },
2072
+ {
2073
+ "name": "meta.embedded.block.lua",
2074
+ "begin": "(?=(?\u003e\u003c\u003c-(\"?)((?:[_\\w]+_|)LUA)\\b\\1))",
2075
+ "end": "(?!\\G)",
2076
+ "patterns": [
2077
+ {
2178
2078
  "name": "string.unquoted.heredoc.crystal",
2079
+ "contentName": "source.lua",
2080
+ "begin": "(?\u003e\u003c\u003c-(\"?)((?:[_\\w]+_|)LUA)\\b\\1)",
2081
+ "end": "\\s*\\2$\\n?",
2179
2082
  "patterns": [
2180
2083
  {
2181
2084
  "include": "#heredoc"
@@ -2189,31 +2092,30 @@
2189
2092
  {
2190
2093
  "include": "#escaped_char"
2191
2094
  }
2192
- ]
2193
- }
2194
- ]
2195
- },
2196
- {
2197
- "begin": "(?=(?><<-(\"?)((?:[_\\w]+_|)crystal)\\b\\1))",
2198
- "comment": "Heredoc with embedded crystal",
2199
- "end": "(?!\\G)",
2200
- "name": "meta.embedded.block.crystal",
2201
- "patterns": [
2202
- {
2203
- "begin": "(?><<-(\"?)((?:[_\\w]+_|)crystal)\\b\\1)",
2095
+ ],
2204
2096
  "beginCaptures": {
2205
2097
  "0": {
2206
2098
  "name": "punctuation.definition.string.begin.crystal"
2207
2099
  }
2208
2100
  },
2209
- "contentName": "source.crystal",
2210
- "end": "\\s*\\2$\\n?",
2211
2101
  "endCaptures": {
2212
2102
  "0": {
2213
2103
  "name": "punctuation.definition.string.end.crystal"
2214
2104
  }
2215
- },
2105
+ }
2106
+ }
2107
+ ]
2108
+ },
2109
+ {
2110
+ "name": "meta.embedded.block.crystal",
2111
+ "begin": "(?=(?\u003e\u003c\u003c-(\"?)((?:[_\\w]+_|)crystal)\\b\\1))",
2112
+ "end": "(?!\\G)",
2113
+ "patterns": [
2114
+ {
2216
2115
  "name": "string.unquoted.heredoc.crystal",
2116
+ "contentName": "source.crystal",
2117
+ "begin": "(?\u003e\u003c\u003c-(\"?)((?:[_\\w]+_|)crystal)\\b\\1)",
2118
+ "end": "\\s*\\2$\\n?",
2217
2119
  "patterns": [
2218
2120
  {
2219
2121
  "include": "#heredoc"
@@ -2227,24 +2129,24 @@
2227
2129
  {
2228
2130
  "include": "#escaped_char"
2229
2131
  }
2230
- ]
2132
+ ],
2133
+ "beginCaptures": {
2134
+ "0": {
2135
+ "name": "punctuation.definition.string.begin.crystal"
2136
+ }
2137
+ },
2138
+ "endCaptures": {
2139
+ "0": {
2140
+ "name": "punctuation.definition.string.end.crystal"
2141
+ }
2142
+ }
2231
2143
  }
2232
2144
  ]
2233
2145
  },
2234
2146
  {
2235
- "begin": "(?>\\=\\s*<<(\\w+))",
2236
- "beginCaptures": {
2237
- "0": {
2238
- "name": "punctuation.definition.string.begin.crystal"
2239
- }
2240
- },
2241
- "end": "^\\1$",
2242
- "endCaptures": {
2243
- "0": {
2244
- "name": "punctuation.definition.string.end.crystal"
2245
- }
2246
- },
2247
2147
  "name": "string.unquoted.heredoc.crystal",
2148
+ "begin": "(?\u003e\\=\\s*\u003c\u003c(\\w+))",
2149
+ "end": "^\\1$",
2248
2150
  "patterns": [
2249
2151
  {
2250
2152
  "include": "#heredoc"
@@ -2255,23 +2157,22 @@
2255
2157
  {
2256
2158
  "include": "#escaped_char"
2257
2159
  }
2258
- ]
2259
- },
2260
- {
2261
- "begin": "(?><<-(\\w+))",
2160
+ ],
2262
2161
  "beginCaptures": {
2263
2162
  "0": {
2264
2163
  "name": "punctuation.definition.string.begin.crystal"
2265
2164
  }
2266
2165
  },
2267
- "comment": "heredoc with indented terminator",
2268
- "end": "\\s*\\1$",
2269
2166
  "endCaptures": {
2270
2167
  "0": {
2271
2168
  "name": "punctuation.definition.string.end.crystal"
2272
2169
  }
2273
- },
2170
+ }
2171
+ },
2172
+ {
2274
2173
  "name": "string.unquoted.heredoc.crystal",
2174
+ "begin": "(?\u003e\u003c\u003c-(\\w+))",
2175
+ "end": "\\s*\\1$",
2275
2176
  "patterns": [
2276
2177
  {
2277
2178
  "include": "#heredoc"
@@ -2282,65 +2183,74 @@
2282
2183
  {
2283
2184
  "include": "#escaped_char"
2284
2185
  }
2285
- ]
2286
- },
2287
- {
2288
- "begin": "(?<=\\{|do|\\{\\s|do\\s)(\\|)",
2289
- "captures": {
2290
- "1": {
2291
- "name": "punctuation.separator.variable.crystal"
2186
+ ],
2187
+ "beginCaptures": {
2188
+ "0": {
2189
+ "name": "punctuation.definition.string.begin.crystal"
2292
2190
  }
2293
2191
  },
2192
+ "endCaptures": {
2193
+ "0": {
2194
+ "name": "punctuation.definition.string.end.crystal"
2195
+ }
2196
+ }
2197
+ },
2198
+ {
2199
+ "begin": "(?\u003c=\\{|do|\\{\\s|do\\s)(\\|)",
2294
2200
  "end": "(\\|)",
2295
2201
  "patterns": [
2296
2202
  {
2297
- "match": "[_a-zA-Z][_a-zA-Z0-9]*",
2298
- "name": "variable.other.block.crystal"
2203
+ "name": "variable.other.block.crystal",
2204
+ "match": "[_a-zA-Z][_a-zA-Z0-9]*"
2299
2205
  },
2300
2206
  {
2301
- "match": ",",
2207
+ "name": "punctuation.separator.variable.crystal",
2208
+ "match": ","
2209
+ }
2210
+ ],
2211
+ "captures": {
2212
+ "1": {
2302
2213
  "name": "punctuation.separator.variable.crystal"
2303
2214
  }
2304
- ]
2215
+ }
2305
2216
  },
2306
2217
  {
2307
- "match": "=>",
2308
- "name": "punctuation.separator.key-value"
2218
+ "name": "punctuation.separator.key-value",
2219
+ "match": "=\u003e"
2309
2220
  },
2310
2221
  {
2311
- "match": "<<=|%=|&{1,2}=|\\*=|\\*\\*=|\\+=|\\-=|\\^=|\\|{1,2}=|<<",
2312
- "name": "keyword.operator.assignment.augmented.crystal"
2222
+ "name": "keyword.operator.assignment.augmented.crystal",
2223
+ "match": "\u003c\u003c=|%=|\u0026{1,2}=|\\*=|\\*\\*=|\\+=|\\-=|\\^=|\\|{1,2}=|\u003c\u003c"
2313
2224
  },
2314
2225
  {
2315
- "match": "<=>|<(?!<|=)|>(?!<|=|>)|<=|>=|===|==|=~|!=|!~|(?<=[ \\t])\\?",
2316
- "name": "keyword.operator.comparison.crystal"
2226
+ "name": "keyword.operator.comparison.crystal",
2227
+ "match": "\u003c=\u003e|\u003c(?!\u003c|=)|\u003e(?!\u003c|=|\u003e)|\u003c=|\u003e=|===|==|=~|!=|!~|(?\u003c=[ \\t])\\?"
2317
2228
  },
2318
2229
  {
2319
- "match": "(?<=[ \\t])!+|\\bnot\\b|&&|\\band\\b|\\|\\||\\bor\\b|\\^",
2320
- "name": "keyword.operator.logical.crystal"
2230
+ "name": "keyword.operator.logical.crystal",
2231
+ "match": "(?\u003c=[ \\t])!+|\\bnot\\b|\u0026\u0026|\\band\\b|\\|\\||\\bor\\b|\\^"
2321
2232
  },
2322
2233
  {
2323
- "match": "(%|&|\\*\\*|\\*|\\+|\\-|/)",
2324
- "name": "keyword.operator.arithmetic.crystal"
2234
+ "name": "keyword.operator.arithmetic.crystal",
2235
+ "match": "(%|\u0026|\\*\\*|\\*|\\+|\\-|/)"
2325
2236
  },
2326
2237
  {
2327
- "match": "=",
2328
- "name": "keyword.operator.assignment.crystal"
2238
+ "name": "keyword.operator.assignment.crystal",
2239
+ "match": "="
2329
2240
  },
2330
2241
  {
2331
- "match": "\\||~|>>",
2332
- "name": "keyword.operator.other.crystal"
2242
+ "name": "keyword.operator.other.crystal",
2243
+ "match": "\\||~|\u003e\u003e"
2333
2244
  },
2334
2245
  {
2335
- "match": "\\;",
2336
- "name": "punctuation.separator.statement.crystal"
2246
+ "name": "punctuation.separator.statement.crystal",
2247
+ "match": "\\;"
2337
2248
  },
2338
2249
  {
2339
- "match": ",",
2340
- "name": "punctuation.separator.object.crystal"
2250
+ "name": "punctuation.separator.object.crystal",
2251
+ "match": ","
2341
2252
  },
2342
2253
  {
2343
- "comment": "Mark as namespace separator if double colons followed by capital letter",
2344
2254
  "match": "(::)\\s*(?=[A-Z])",
2345
2255
  "captures": {
2346
2256
  "1": {
@@ -2349,7 +2259,6 @@
2349
2259
  }
2350
2260
  },
2351
2261
  {
2352
- "comment": "Mark as method separator if double colons not followed by capital letter",
2353
2262
  "match": "(\\.|::)\\s*(?![A-Z])",
2354
2263
  "captures": {
2355
2264
  "1": {
@@ -2358,38 +2267,37 @@
2358
2267
  }
2359
2268
  },
2360
2269
  {
2361
- "comment": "Must come after method and constant separators to prefer double colons",
2362
- "match": ":",
2363
- "name": "punctuation.separator.other.crystal"
2270
+ "name": "punctuation.separator.other.crystal",
2271
+ "match": ":"
2364
2272
  },
2365
2273
  {
2366
- "match": "\\{",
2367
- "name": "punctuation.section.scope.begin.crystal"
2274
+ "name": "punctuation.section.scope.begin.crystal",
2275
+ "match": "\\{"
2368
2276
  },
2369
2277
  {
2370
- "match": "\\}",
2371
- "name": "punctuation.section.scope.end.crystal"
2278
+ "name": "punctuation.section.scope.end.crystal",
2279
+ "match": "\\}"
2372
2280
  },
2373
2281
  {
2374
- "match": "\\[",
2375
- "name": "punctuation.section.array.begin.crystal"
2282
+ "name": "punctuation.section.array.begin.crystal",
2283
+ "match": "\\["
2376
2284
  },
2377
2285
  {
2378
- "match": "\\]",
2379
- "name": "punctuation.section.array.end.crystal"
2286
+ "name": "punctuation.section.array.end.crystal",
2287
+ "match": "\\]"
2380
2288
  },
2381
2289
  {
2382
- "match": "\\(|\\)",
2383
- "name": "punctuation.section.function.crystal"
2290
+ "name": "punctuation.section.function.crystal",
2291
+ "match": "\\(|\\)"
2384
2292
  }
2385
2293
  ],
2386
2294
  "repository": {
2387
2295
  "escaped_char": {
2388
- "match": "\\\\(?:[0-7]{1,3}|x[\\da-fA-F]{1,2}|.)",
2389
- "name": "constant.character.escape.crystal"
2296
+ "name": "constant.character.escape.crystal",
2297
+ "match": "\\\\(?:[0-7]{1,3}|x[\\da-fA-F]{1,2}|.)"
2390
2298
  },
2391
2299
  "heredoc": {
2392
- "begin": "^<<-?\\w+",
2300
+ "begin": "^\u003c\u003c-?\\w+",
2393
2301
  "end": "$",
2394
2302
  "patterns": [
2395
2303
  {
@@ -2400,7 +2308,18 @@
2400
2308
  "interpolated_crystal": {
2401
2309
  "patterns": [
2402
2310
  {
2311
+ "name": "meta.embedded.line.crystal",
2312
+ "contentName": "source.crystal",
2403
2313
  "begin": "(#\\{)",
2314
+ "end": "(\\})",
2315
+ "patterns": [
2316
+ {
2317
+ "include": "#nest_curly_and_self"
2318
+ },
2319
+ {
2320
+ "include": "$self"
2321
+ }
2322
+ ],
2404
2323
  "beginCaptures": {
2405
2324
  "0": {
2406
2325
  "name": "punctuation.section.embedded.begin.crystal"
@@ -2409,8 +2328,6 @@
2409
2328
  "name": "source.crystal"
2410
2329
  }
2411
2330
  },
2412
- "contentName": "source.crystal",
2413
- "end": "(\\})",
2414
2331
  "endCaptures": {
2415
2332
  "0": {
2416
2333
  "name": "punctuation.section.embedded.end.crystal"
@@ -2418,67 +2335,53 @@
2418
2335
  "1": {
2419
2336
  "name": "source.crystal"
2420
2337
  }
2421
- },
2422
- "name": "meta.embedded.line.crystal",
2423
- "patterns": [
2424
- {
2425
- "include": "#nest_curly_and_self"
2426
- },
2427
- {
2428
- "include": "$self"
2429
- }
2430
- ]
2338
+ }
2431
2339
  },
2432
2340
  {
2341
+ "name": "variable.other.readwrite.instance.crystal",
2342
+ "match": "(#@)[a-zA-Z_]\\w*",
2433
2343
  "captures": {
2434
2344
  "1": {
2435
2345
  "name": "punctuation.definition.variable.crystal"
2436
2346
  }
2437
- },
2438
- "match": "(#@)[a-zA-Z_]\\w*",
2439
- "name": "variable.other.readwrite.instance.crystal"
2347
+ }
2440
2348
  },
2441
2349
  {
2350
+ "name": "variable.other.readwrite.class.crystal",
2351
+ "match": "(#@@)[a-zA-Z_]\\w*",
2442
2352
  "captures": {
2443
2353
  "1": {
2444
2354
  "name": "punctuation.definition.variable.crystal"
2445
2355
  }
2446
- },
2447
- "match": "(#@@)[a-zA-Z_]\\w*",
2448
- "name": "variable.other.readwrite.class.crystal"
2356
+ }
2449
2357
  },
2450
2358
  {
2359
+ "name": "variable.other.readwrite.global.crystal",
2360
+ "match": "(#\\$)[a-zA-Z_]\\w*",
2451
2361
  "captures": {
2452
2362
  "1": {
2453
2363
  "name": "punctuation.definition.variable.crystal"
2454
2364
  }
2455
- },
2456
- "match": "(#\\$)[a-zA-Z_]\\w*",
2457
- "name": "variable.other.readwrite.global.crystal"
2365
+ }
2458
2366
  }
2459
2367
  ]
2460
2368
  },
2461
2369
  "nest_brackets": {
2462
2370
  "begin": "\\[",
2463
- "captures": {
2464
- "0": {
2465
- "name": "punctuation.section.scope.crystal"
2466
- }
2467
- },
2468
2371
  "end": "\\]",
2469
2372
  "patterns": [
2470
2373
  {
2471
2374
  "include": "#nest_brackets"
2472
2375
  }
2473
- ]
2474
- },
2475
- "nest_brackets_i": {
2476
- "begin": "\\[",
2376
+ ],
2477
2377
  "captures": {
2478
2378
  "0": {
2479
2379
  "name": "punctuation.section.scope.crystal"
2480
2380
  }
2481
- },
2381
+ }
2382
+ },
2383
+ "nest_brackets_i": {
2384
+ "begin": "\\[",
2482
2385
  "end": "\\]",
2483
2386
  "patterns": [
2484
2387
  {
@@ -2490,15 +2393,15 @@
2490
2393
  {
2491
2394
  "include": "#nest_brackets_i"
2492
2395
  }
2493
- ]
2494
- },
2495
- "nest_brackets_r": {
2496
- "begin": "\\[",
2396
+ ],
2497
2397
  "captures": {
2498
2398
  "0": {
2499
2399
  "name": "punctuation.section.scope.crystal"
2500
2400
  }
2501
- },
2401
+ }
2402
+ },
2403
+ "nest_brackets_r": {
2404
+ "begin": "\\[",
2502
2405
  "end": "\\]",
2503
2406
  "patterns": [
2504
2407
  {
@@ -2507,37 +2410,42 @@
2507
2410
  {
2508
2411
  "include": "#nest_brackets_r"
2509
2412
  }
2510
- ]
2511
- },
2512
- "nest_curly": {
2513
- "begin": "\\{",
2413
+ ],
2514
2414
  "captures": {
2515
2415
  "0": {
2516
2416
  "name": "punctuation.section.scope.crystal"
2517
2417
  }
2518
- },
2418
+ }
2419
+ },
2420
+ "nest_curly": {
2421
+ "begin": "\\{",
2519
2422
  "end": "\\}",
2520
2423
  "patterns": [
2521
2424
  {
2522
2425
  "include": "#nest_curly"
2523
2426
  }
2524
- ]
2427
+ ],
2428
+ "captures": {
2429
+ "0": {
2430
+ "name": "punctuation.section.scope.crystal"
2431
+ }
2432
+ }
2525
2433
  },
2526
2434
  "nest_curly_and_self": {
2527
2435
  "patterns": [
2528
2436
  {
2529
2437
  "begin": "\\{",
2530
- "captures": {
2531
- "0": {
2532
- "name": "punctuation.section.scope.crystal"
2533
- }
2534
- },
2535
2438
  "end": "\\}",
2536
2439
  "patterns": [
2537
2440
  {
2538
2441
  "include": "#nest_curly_and_self"
2539
2442
  }
2540
- ]
2443
+ ],
2444
+ "captures": {
2445
+ "0": {
2446
+ "name": "punctuation.section.scope.crystal"
2447
+ }
2448
+ }
2541
2449
  },
2542
2450
  {
2543
2451
  "include": "$self"
@@ -2546,11 +2454,6 @@
2546
2454
  },
2547
2455
  "nest_curly_i": {
2548
2456
  "begin": "\\{",
2549
- "captures": {
2550
- "0": {
2551
- "name": "punctuation.section.scope.crystal"
2552
- }
2553
- },
2554
2457
  "end": "\\}",
2555
2458
  "patterns": [
2556
2459
  {
@@ -2562,15 +2465,15 @@
2562
2465
  {
2563
2466
  "include": "#nest_curly_i"
2564
2467
  }
2565
- ]
2566
- },
2567
- "nest_curly_r": {
2568
- "begin": "\\{",
2468
+ ],
2569
2469
  "captures": {
2570
2470
  "0": {
2571
2471
  "name": "punctuation.section.scope.crystal"
2572
2472
  }
2573
- },
2473
+ }
2474
+ },
2475
+ "nest_curly_r": {
2476
+ "begin": "\\{",
2574
2477
  "end": "\\}",
2575
2478
  "patterns": [
2576
2479
  {
@@ -2579,30 +2482,30 @@
2579
2482
  {
2580
2483
  "include": "#nest_curly_r"
2581
2484
  }
2582
- ]
2583
- },
2584
- "nest_ltgt": {
2585
- "begin": "\\<",
2485
+ ],
2586
2486
  "captures": {
2587
2487
  "0": {
2588
2488
  "name": "punctuation.section.scope.crystal"
2589
2489
  }
2590
- },
2591
- "end": "\\>",
2490
+ }
2491
+ },
2492
+ "nest_ltgt": {
2493
+ "begin": "\\\u003c",
2494
+ "end": "\\\u003e",
2592
2495
  "patterns": [
2593
2496
  {
2594
2497
  "include": "#nest_ltgt"
2595
2498
  }
2596
- ]
2597
- },
2598
- "nest_ltgt_i": {
2599
- "begin": "\\<",
2499
+ ],
2600
2500
  "captures": {
2601
2501
  "0": {
2602
2502
  "name": "punctuation.section.scope.crystal"
2603
2503
  }
2604
- },
2605
- "end": "\\>",
2504
+ }
2505
+ },
2506
+ "nest_ltgt_i": {
2507
+ "begin": "\\\u003c",
2508
+ "end": "\\\u003e",
2606
2509
  "patterns": [
2607
2510
  {
2608
2511
  "include": "#interpolated_crystal"
@@ -2613,16 +2516,16 @@
2613
2516
  {
2614
2517
  "include": "#nest_ltgt_i"
2615
2518
  }
2616
- ]
2617
- },
2618
- "nest_ltgt_r": {
2619
- "begin": "\\<",
2519
+ ],
2620
2520
  "captures": {
2621
2521
  "0": {
2622
2522
  "name": "punctuation.section.scope.crystal"
2623
2523
  }
2624
- },
2625
- "end": "\\>",
2524
+ }
2525
+ },
2526
+ "nest_ltgt_r": {
2527
+ "begin": "\\\u003c",
2528
+ "end": "\\\u003e",
2626
2529
  "patterns": [
2627
2530
  {
2628
2531
  "include": "#regex_sub"
@@ -2630,29 +2533,29 @@
2630
2533
  {
2631
2534
  "include": "#nest_ltgt_r"
2632
2535
  }
2633
- ]
2634
- },
2635
- "nest_parens": {
2636
- "begin": "\\(",
2536
+ ],
2637
2537
  "captures": {
2638
2538
  "0": {
2639
2539
  "name": "punctuation.section.scope.crystal"
2640
2540
  }
2641
- },
2541
+ }
2542
+ },
2543
+ "nest_parens": {
2544
+ "begin": "\\(",
2642
2545
  "end": "\\)",
2643
2546
  "patterns": [
2644
2547
  {
2645
2548
  "include": "#nest_parens"
2646
2549
  }
2647
- ]
2648
- },
2649
- "nest_parens_i": {
2650
- "begin": "\\(",
2550
+ ],
2651
2551
  "captures": {
2652
2552
  "0": {
2653
2553
  "name": "punctuation.section.scope.crystal"
2654
2554
  }
2655
- },
2555
+ }
2556
+ },
2557
+ "nest_parens_i": {
2558
+ "begin": "\\(",
2656
2559
  "end": "\\)",
2657
2560
  "patterns": [
2658
2561
  {
@@ -2664,15 +2567,15 @@
2664
2567
  {
2665
2568
  "include": "#nest_parens_i"
2666
2569
  }
2667
- ]
2668
- },
2669
- "nest_parens_r": {
2670
- "begin": "\\(",
2570
+ ],
2671
2571
  "captures": {
2672
2572
  "0": {
2673
2573
  "name": "punctuation.section.scope.crystal"
2674
2574
  }
2675
- },
2575
+ }
2576
+ },
2577
+ "nest_parens_r": {
2578
+ "begin": "\\(",
2676
2579
  "end": "\\)",
2677
2580
  "patterns": [
2678
2581
  {
@@ -2681,7 +2584,12 @@
2681
2584
  {
2682
2585
  "include": "#nest_parens_r"
2683
2586
  }
2684
- ]
2587
+ ],
2588
+ "captures": {
2589
+ "0": {
2590
+ "name": "punctuation.section.scope.crystal"
2591
+ }
2592
+ }
2685
2593
  },
2686
2594
  "regex_sub": {
2687
2595
  "patterns": [
@@ -2692,6 +2600,8 @@
2692
2600
  "include": "#escaped_char"
2693
2601
  },
2694
2602
  {
2603
+ "name": "string.regexp.arbitrary-repetition.crystal",
2604
+ "match": "(\\{)\\d+(,\\d+)?(\\})",
2695
2605
  "captures": {
2696
2606
  "1": {
2697
2607
  "name": "punctuation.definition.arbitrary-repetition.crystal"
@@ -2699,78 +2609,74 @@
2699
2609
  "3": {
2700
2610
  "name": "punctuation.definition.arbitrary-repetition.crystal"
2701
2611
  }
2702
- },
2703
- "match": "(\\{)\\d+(,\\d+)?(\\})",
2704
- "name": "string.regexp.arbitrary-repetition.crystal"
2612
+ }
2705
2613
  },
2706
2614
  {
2615
+ "name": "string.regexp.character-class.crystal",
2707
2616
  "begin": "\\[(?:\\^?\\])?",
2708
- "captures": {
2709
- "0": {
2710
- "name": "punctuation.definition.character-class.crystal"
2711
- }
2712
- },
2713
2617
  "end": "\\]",
2714
- "name": "string.regexp.character-class.crystal",
2715
2618
  "patterns": [
2716
2619
  {
2717
2620
  "include": "#escaped_char"
2718
2621
  }
2719
- ]
2622
+ ],
2623
+ "captures": {
2624
+ "0": {
2625
+ "name": "punctuation.definition.character-class.crystal"
2626
+ }
2627
+ }
2720
2628
  },
2721
2629
  {
2630
+ "name": "comment.line.number-sign.crystal",
2722
2631
  "begin": "\\(\\?#",
2632
+ "end": "\\)",
2633
+ "patterns": [
2634
+ {
2635
+ "include": "#escaped_char"
2636
+ }
2637
+ ],
2723
2638
  "beginCaptures": {
2724
2639
  "0": {
2725
2640
  "name": "punctuation.definition.comment.begin.crystal"
2726
2641
  }
2727
2642
  },
2728
- "end": "\\)",
2729
2643
  "endCaptures": {
2730
2644
  "0": {
2731
2645
  "name": "punctuation.definition.comment.end.crystal"
2732
2646
  }
2733
- },
2734
- "name": "comment.line.number-sign.crystal",
2735
- "patterns": [
2736
- {
2737
- "include": "#escaped_char"
2738
- }
2739
- ]
2647
+ }
2740
2648
  },
2741
2649
  {
2650
+ "name": "string.regexp.group.crystal",
2742
2651
  "begin": "\\(",
2743
- "captures": {
2744
- "0": {
2745
- "name": "punctuation.definition.group.crystal"
2746
- }
2747
- },
2748
2652
  "end": "\\)",
2749
- "name": "string.regexp.group.crystal",
2750
2653
  "patterns": [
2751
2654
  {
2752
2655
  "include": "#regex_sub"
2753
2656
  }
2754
- ]
2657
+ ],
2658
+ "captures": {
2659
+ "0": {
2660
+ "name": "punctuation.definition.group.crystal"
2661
+ }
2662
+ }
2755
2663
  },
2756
2664
  {
2757
- "begin": "(?<=^|\\s)(#)\\s(?=[[a-zA-Z0-9,. \\t?!-][^\\x{00}-\\x{7F}]]*$)",
2665
+ "name": "comment.line.number-sign.crystal",
2666
+ "begin": "(?\u003c=^|\\s)(#)\\s(?=[[a-zA-Z0-9,. \\t?!-][^\\x{00}-\\x{7F}]]*$)",
2667
+ "end": "$\\n?",
2758
2668
  "beginCaptures": {
2759
2669
  "1": {
2760
2670
  "name": "punctuation.definition.comment.crystal"
2761
2671
  }
2762
2672
  },
2763
- "comment": "We are restrictive in what we allow to go after the comment character to avoid false positives, since the availability of comments depend on regexp flags.",
2764
- "end": "$\\n?",
2765
2673
  "endCaptures": {
2766
2674
  "0": {
2767
2675
  "name": "punctuation.definition.comment.crystal"
2768
2676
  }
2769
- },
2770
- "name": "comment.line.number-sign.crystal"
2677
+ }
2771
2678
  }
2772
2679
  ]
2773
2680
  }
2774
- },
2775
- "uuid": "13aed1ba-1656-4b29-a18c-07739f166db7"
2776
- }
2681
+ }
2682
+ }