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,14 +1,10 @@
1
1
  {
2
- "fileTypes": [
3
- "ml",
4
- "mli"
5
- ],
6
- "foldingStartMarker": "(\\b(module|class|)\\s.*?=\\s*$|\\bbegin|sig|struct|(object(\\s*\\(_?[a-z]+\\))?)\\s*$|\\bwhile\\s.*?\\bdo\\s*$|^let(?:\\s+rec)?\\s+[a-z_][a-zA-Z0-9_]*\\s+(?!=)\\S)",
7
- "foldingStopMarker": "(\\bend(\\s+in)?[ \\t]*(;{1,2}|=)?|\\bdone;?|^\\s*;;|^\\s*in)[ \\t]*$",
8
- "keyEquivalent": "^~O",
9
2
  "name": "OCaml",
3
+ "scopeName": "source.ocaml",
10
4
  "patterns": [
11
5
  {
6
+ "name": "meta.module.binding",
7
+ "match": "\\b(let)\\s+(module)\\s+([A-Z][a-zA-Z0-9'_]*)\\s*(=)",
12
8
  "captures": {
13
9
  "1": {
14
10
  "name": "keyword.other.module-binding.ocaml"
@@ -22,12 +18,23 @@
22
18
  "4": {
23
19
  "name": "punctuation.separator.module-binding.ocmal"
24
20
  }
25
- },
26
- "match": "\\b(let)\\s+(module)\\s+([A-Z][a-zA-Z0-9'_]*)\\s*(=)",
27
- "name": "meta.module.binding"
21
+ }
28
22
  },
29
23
  {
24
+ "name": "meta.module.openbinding",
30
25
  "begin": "\\b(let)\\s+(open)\\s+([A-Z][a-zA-Z0-9'_]*)(?=(\\.[A-Z][a-zA-Z0-9_]*)*)",
26
+ "end": "(\\s|$)",
27
+ "patterns": [
28
+ {
29
+ "name": "support.other.module.ocaml",
30
+ "match": "(\\.)([A-Z][a-zA-Z0-9'_]*)",
31
+ "captures": {
32
+ "1": {
33
+ "name": "punctuation.separator.module-reference.ocaml"
34
+ }
35
+ }
36
+ }
37
+ ],
31
38
  "beginCaptures": {
32
39
  "1": {
33
40
  "name": "keyword.other.module-binding.ocaml"
@@ -38,23 +45,17 @@
38
45
  "3": {
39
46
  "name": "support.other.module.ocaml"
40
47
  }
41
- },
42
- "end": "(\\s|$)",
43
- "name": "meta.module.openbinding",
44
- "patterns": [
45
- {
46
- "captures": {
47
- "1": {
48
- "name": "punctuation.separator.module-reference.ocaml"
49
- }
50
- },
51
- "match": "(\\.)([A-Z][a-zA-Z0-9'_]*)",
52
- "name": "support.other.module.ocaml"
53
- }
54
- ]
48
+ }
55
49
  },
56
50
  {
51
+ "name": "meta.function.ocaml",
57
52
  "begin": "\\b(let|and)\\s+(?!\\(\\*)((rec\\s+)([a-z_][a-zA-Z0-9_']*)\\b|([a-z_][a-zA-Z0-9_']*|\\([^)]+\\))(?=\\s)((?=\\s*=\\s*(?=fun(?:ction)\\b))|(?!\\s*=)))",
53
+ "end": "(?:(:)\\s*([^=]+))?(?:(=)|(=)\\s*(?=fun(?:ction)\\b))",
54
+ "patterns": [
55
+ {
56
+ "include": "#variables"
57
+ }
58
+ ],
58
59
  "beginCaptures": {
59
60
  "1": {
60
61
  "name": "keyword.other.function-definition.ocaml"
@@ -69,7 +70,6 @@
69
70
  "name": "entity.name.function.ocaml"
70
71
  }
71
72
  },
72
- "end": "(?:(:)\\s*([^=]+))?(?:(=)|(=)\\s*(?=fun(?:ction)\\b))",
73
73
  "endCaptures": {
74
74
  "1": {
75
75
  "name": "punctuation.separator.function.type-constraint.ocaml"
@@ -83,61 +83,62 @@
83
83
  "4": {
84
84
  "name": "keyword.operator.ocaml"
85
85
  }
86
- },
87
- "name": "meta.function.ocaml",
88
- "patterns": [
89
- {
90
- "include": "#variables"
91
- }
92
- ]
86
+ }
93
87
  },
94
88
  {
89
+ "name": "meta.function.anonymous.ocaml",
95
90
  "begin": "(\\(|\\s)(?=fun\\s)",
96
- "beginCaptures": {
97
- "1": {
98
- "name": "punctuation.definition.function.anonymous.ocaml"
99
- }
100
- },
101
91
  "end": "(\\))",
102
- "endCaptures": {
103
- "1": {
104
- "name": "punctuation.definition.function.anonymous.ocaml"
105
- }
106
- },
107
- "name": "meta.function.anonymous.ocaml",
108
92
  "patterns": [
109
93
  {
110
- "begin": "(?<=(\\(|\\s))(fun)\\s",
94
+ "name": "meta.function.anonymous.definition.ocaml",
95
+ "begin": "(?\u003c=(\\(|\\s))(fun)\\s",
96
+ "end": "(-\u003e)",
97
+ "patterns": [
98
+ {
99
+ "include": "#variables"
100
+ }
101
+ ],
111
102
  "beginCaptures": {
112
103
  "2": {
113
104
  "name": "keyword.other.function-definition.ocaml"
114
105
  }
115
106
  },
116
- "end": "(->)",
117
107
  "endCaptures": {
118
108
  "1": {
119
109
  "name": "punctuation.separator.function-definition.ocaml"
120
110
  }
121
- },
122
- "name": "meta.function.anonymous.definition.ocaml",
123
- "patterns": [
124
- {
125
- "include": "#variables"
126
- }
127
- ]
111
+ }
128
112
  },
129
113
  {
130
114
  "include": "$self"
131
115
  }
132
- ]
116
+ ],
117
+ "beginCaptures": {
118
+ "1": {
119
+ "name": "punctuation.definition.function.anonymous.ocaml"
120
+ }
121
+ },
122
+ "endCaptures": {
123
+ "1": {
124
+ "name": "punctuation.definition.function.anonymous.ocaml"
125
+ }
126
+ }
133
127
  },
134
128
  {
129
+ "name": "meta.type-definition-group.ocaml",
135
130
  "begin": "^\\s*(?=type\\s)",
136
131
  "end": "\\b(?=let|end|val)|^\\s*$",
137
- "name": "meta.type-definition-group.ocaml",
138
132
  "patterns": [
139
133
  {
134
+ "name": "meta.type-definition.ocaml",
140
135
  "begin": "\\b(type|and)\\s+([^=]*)(=)?",
136
+ "end": "(?=\\b(type|and|let|end|val)\\b)|(?=^\\s*$)",
137
+ "patterns": [
138
+ {
139
+ "include": "#typedefs"
140
+ }
141
+ ],
141
142
  "beginCaptures": {
142
143
  "1": {
143
144
  "name": "keyword.other.type-definition.ocaml"
@@ -148,19 +149,19 @@
148
149
  "3": {
149
150
  "name": "punctuation.separator.type-definition.ocaml"
150
151
  }
151
- },
152
- "end": "(?=\\b(type|and|let|end|val)\\b)|(?=^\\s*$)",
153
- "name": "meta.type-definition.ocaml",
154
- "patterns": [
155
- {
156
- "include": "#typedefs"
157
- }
158
- ]
152
+ }
159
153
  }
160
154
  ]
161
155
  },
162
156
  {
163
- "begin": "\\b(with|function)(?=(\\s*$|.*->))\\b|((?<!\\S)(\\|)(?=(\\w|\\s).*->))",
157
+ "name": "meta.pattern-match.ocaml",
158
+ "begin": "\\b(with|function)(?=(\\s*$|.*-\u003e))\\b|((?\u003c!\\S)(\\|)(?=(\\w|\\s).*-\u003e))",
159
+ "end": "(?:(-\u003e)|\\b(when)\\b|\\s(?=\\|))",
160
+ "patterns": [
161
+ {
162
+ "include": "#matchpatterns"
163
+ }
164
+ ],
164
165
  "beginCaptures": {
165
166
  "1": {
166
167
  "name": "keyword.control.match-definition.ocaml"
@@ -172,7 +173,6 @@
172
173
  "name": "keyword.control.match-definition.ocaml"
173
174
  }
174
175
  },
175
- "end": "(?:(->)|\\b(when)\\b|\\s(?=\\|))",
176
176
  "endCaptures": {
177
177
  "1": {
178
178
  "name": "punctuation.separator.match-definition.ocaml"
@@ -180,15 +180,11 @@
180
180
  "2": {
181
181
  "name": "keyword.control.match-condition.ocaml"
182
182
  }
183
- },
184
- "name": "meta.pattern-match.ocaml",
185
- "patterns": [
186
- {
187
- "include": "#matchpatterns"
188
- }
189
- ]
183
+ }
190
184
  },
191
185
  {
186
+ "name": "meta.class.type-definition.ocaml",
187
+ "match": "^[ \\t]*(class\\s+type\\s+)((\\[\\s*('[A-Za-z][a-zA-Z0-9_']*(?:\\s*,\\s*'[A-Za-z][a-zA-Z0-9_']*)*)\\s*\\]\\s+)?[a-z_][a-zA-Z0-9'_]*)",
192
188
  "captures": {
193
189
  "1": {
194
190
  "name": "keyword.other.class-type-definition.ocaml"
@@ -199,12 +195,17 @@
199
195
  "4": {
200
196
  "name": "storage.type.ocaml"
201
197
  }
202
- },
203
- "match": "^[ \\t]*(class\\s+type\\s+)((\\[\\s*('[A-Za-z][a-zA-Z0-9_']*(?:\\s*,\\s*'[A-Za-z][a-zA-Z0-9_']*)*)\\s*\\]\\s+)?[a-z_][a-zA-Z0-9'_]*)",
204
- "name": "meta.class.type-definition.ocaml"
198
+ }
205
199
  },
206
200
  {
201
+ "name": "meta.class.ocaml",
207
202
  "begin": "^[ \\t]*(class)(?:\\s+(?!(?:virtual)\\s+))((\\[\\s*('[A-Za-z][a-zA-Z0-9_']*(?:\\s*,\\s*'[A-Za-z][a-zA-Z0-9_']*)*)\\s*\\]\\s+)?[a-z_][a-zA-Z0-9'_]*)",
203
+ "end": "(=)",
204
+ "patterns": [
205
+ {
206
+ "include": "#variables"
207
+ }
208
+ ],
208
209
  "beginCaptures": {
209
210
  "1": {
210
211
  "name": "keyword.other.class-definition.ocaml"
@@ -216,21 +217,21 @@
216
217
  "name": "storage.type.ocaml"
217
218
  }
218
219
  },
219
- "end": "(=)",
220
220
  "endCaptures": {
221
221
  "1": {
222
222
  "name": "keyword.operator.ocaml"
223
223
  }
224
- },
225
- "name": "meta.class.ocaml",
224
+ }
225
+ },
226
+ {
227
+ "name": "meta.class.virtual.ocaml",
228
+ "begin": "^[ \\t]*(class\\s+virtual\\s+)((\\[\\s*('[A-Za-z][a-zA-Z0-9_']*(?:\\s*,\\s*'[A-Za-z][a-zA-Z0-9_']*)*)\\s*\\]\\s+)?[a-z_][a-zA-Z0-9'_]*)",
229
+ "end": "(=)",
226
230
  "patterns": [
227
231
  {
228
232
  "include": "#variables"
229
233
  }
230
- ]
231
- },
232
- {
233
- "begin": "^[ \\t]*(class\\s+virtual\\s+)((\\[\\s*('[A-Za-z][a-zA-Z0-9_']*(?:\\s*,\\s*'[A-Za-z][a-zA-Z0-9_']*)*)\\s*\\]\\s+)?[a-z_][a-zA-Z0-9'_]*)",
234
+ ],
234
235
  "beginCaptures": {
235
236
  "1": {
236
237
  "name": "keyword.other.class-definition.ocaml"
@@ -242,20 +243,15 @@
242
243
  "name": "storage.type.ocaml"
243
244
  }
244
245
  },
245
- "end": "(=)",
246
246
  "endCaptures": {
247
247
  "1": {
248
248
  "name": "keyword.operator.ocaml"
249
249
  }
250
- },
251
- "name": "meta.class.virtual.ocaml",
252
- "patterns": [
253
- {
254
- "include": "#variables"
255
- }
256
- ]
250
+ }
257
251
  },
258
252
  {
253
+ "name": "meta.class.virtual.type-definition.ocaml",
254
+ "match": "^[ \\t]*(class\\s+type\\s+virtual)((\\[\\s*('[A-Za-z][a-zA-Z0-9_']*(?:\\s*,\\s*'[A-Za-z][a-zA-Z0-9_']*)*)\\s*\\]\\s+)?[a-z_][a-zA-Z0-9'_]*)",
259
255
  "captures": {
260
256
  "1": {
261
257
  "name": "keyword.other.class-type-definition.ocaml"
@@ -266,31 +262,26 @@
266
262
  "4": {
267
263
  "name": "storage.type.ocaml"
268
264
  }
269
- },
270
- "match": "^[ \\t]*(class\\s+type\\s+virtual)((\\[\\s*('[A-Za-z][a-zA-Z0-9_']*(?:\\s*,\\s*'[A-Za-z][a-zA-Z0-9_']*)*)\\s*\\]\\s+)?[a-z_][a-zA-Z0-9'_]*)",
271
- "name": "meta.class.virtual.type-definition.ocaml"
265
+ }
272
266
  },
273
267
  {
268
+ "name": "meta.record.ocaml",
274
269
  "begin": "(\\{)",
275
- "beginCaptures": {
276
- "1": {
277
- "name": "punctuation.definition.record.ocaml"
278
- }
279
- },
280
270
  "end": "(\\})",
281
- "endCaptures": {
282
- "1": {
283
- "name": "punctuation.definition.record.ocaml"
284
- }
285
- },
286
- "name": "meta.record.ocaml",
287
271
  "patterns": [
288
272
  {
289
- "match": "\\bwith\\b",
290
- "name": "keyword.other.language.ocaml"
273
+ "name": "keyword.other.language.ocaml",
274
+ "match": "\\bwith\\b"
291
275
  },
292
276
  {
277
+ "name": "meta.record.definition.ocaml",
293
278
  "begin": "(\\bmutable\\s+)?\\b([a-z_][a-zA-Z0-9_']*)\\s*(:)",
279
+ "end": "(;|(?=}))",
280
+ "patterns": [
281
+ {
282
+ "include": "#typedefs"
283
+ }
284
+ ],
294
285
  "beginCaptures": {
295
286
  "1": {
296
287
  "name": "keyword.other.storage.modifier.ocaml"
@@ -302,53 +293,41 @@
302
293
  "name": "punctuation.definition.record.ocaml"
303
294
  }
304
295
  },
305
- "end": "(;|(?=}))",
306
296
  "endCaptures": {
307
297
  "1": {
308
298
  "name": "keyword.operator.ocaml"
309
299
  }
310
- },
311
- "name": "meta.record.definition.ocaml",
312
- "patterns": [
313
- {
314
- "include": "#typedefs"
315
- }
316
- ]
300
+ }
317
301
  },
318
302
  {
319
303
  "include": "$self"
320
304
  }
321
- ]
322
- },
323
- {
324
- "begin": "\\b(object)\\s*(?:(\\()(_?[a-z]+)(\\)))?\\s*$",
305
+ ],
325
306
  "beginCaptures": {
326
307
  "1": {
327
- "name": "keyword.other.object-definition.ocaml"
328
- },
329
- "2": {
330
- "name": "punctuation.definition.self-binding.ocaml"
331
- },
332
- "3": {
333
- "name": "entity.name.type.self-binding.ocaml"
334
- },
335
- "4": {
336
- "name": "punctuation.definition.self-binding.ocaml"
308
+ "name": "punctuation.definition.record.ocaml"
337
309
  }
338
310
  },
339
- "end": "\\b(end)\\b",
340
311
  "endCaptures": {
341
312
  "1": {
342
- "name": "keyword.control.object.ocaml"
343
- },
344
- "2": {
345
- "name": "punctuation.terminator.expression.ocaml"
313
+ "name": "punctuation.definition.record.ocaml"
346
314
  }
347
- },
315
+ }
316
+ },
317
+ {
348
318
  "name": "meta.object.ocaml",
319
+ "begin": "\\b(object)\\s*(?:(\\()(_?[a-z]+)(\\)))?\\s*$",
320
+ "end": "\\b(end)\\b",
349
321
  "patterns": [
350
322
  {
323
+ "name": "meta.method.ocaml",
351
324
  "begin": "\\b(method)\\s+(virtual\\s+)?(private\\s+)?([a-z_][a-zA-Z0-9'_]*)",
325
+ "end": "(=|:)",
326
+ "patterns": [
327
+ {
328
+ "include": "#variables"
329
+ }
330
+ ],
352
331
  "beginCaptures": {
353
332
  "1": {
354
333
  "name": "keyword.other.method-definition.ocaml"
@@ -363,21 +342,16 @@
363
342
  "name": "entity.name.function.method.ocaml"
364
343
  }
365
344
  },
366
- "end": "(=|:)",
367
345
  "endCaptures": {
368
346
  "1": {
369
347
  "name": "keyword.operator.ocaml"
370
348
  }
371
- },
372
- "name": "meta.method.ocaml",
373
- "patterns": [
374
- {
375
- "include": "#variables"
376
- }
377
- ]
349
+ }
378
350
  },
379
351
  {
352
+ "name": "meta.object.type-constraint.ocaml",
380
353
  "begin": "(constraint)\\s+([a-z_'][a-zA-Z0-9'_]*)\\s+(=)",
354
+ "end": "(#[a-z_][a-zA-Z0-9'_]*)|(int|char|float|string|list|array|bool|unit|exn|option|int32|int64|nativeint|format4|lazy_t)|([a-z_][a-zA-Z0-9'_]*)\\s*$",
381
355
  "beginCaptures": {
382
356
  "1": {
383
357
  "name": "keyword.other.language.ocaml"
@@ -389,7 +363,6 @@
389
363
  "name": "keyword.operator.ocaml"
390
364
  }
391
365
  },
392
- "end": "(#[a-z_][a-zA-Z0-9'_]*)|(int|char|float|string|list|array|bool|unit|exn|option|int32|int64|nativeint|format4|lazy_t)|([a-z_][a-zA-Z0-9'_]*)\\s*$",
393
366
  "endCaptures": {
394
367
  "1": {
395
368
  "name": "storage.type.polymorphic-variant.ocaml"
@@ -400,24 +373,47 @@
400
373
  "3": {
401
374
  "name": "storage.type.ocaml"
402
375
  }
403
- },
404
- "name": "meta.object.type-constraint.ocaml"
376
+ }
405
377
  },
406
378
  {
407
379
  "include": "$self"
408
380
  }
409
- ]
381
+ ],
382
+ "beginCaptures": {
383
+ "1": {
384
+ "name": "keyword.other.object-definition.ocaml"
385
+ },
386
+ "2": {
387
+ "name": "punctuation.definition.self-binding.ocaml"
388
+ },
389
+ "3": {
390
+ "name": "entity.name.type.self-binding.ocaml"
391
+ },
392
+ "4": {
393
+ "name": "punctuation.definition.self-binding.ocaml"
394
+ }
395
+ },
396
+ "endCaptures": {
397
+ "1": {
398
+ "name": "keyword.control.object.ocaml"
399
+ },
400
+ "2": {
401
+ "name": "punctuation.terminator.expression.ocaml"
402
+ }
403
+ }
410
404
  },
411
405
  {
406
+ "name": "meta.method-call.ocaml",
407
+ "match": "(?\u003c=\\w|\\)|')(#)[a-z_][a-zA-Z0-9'_]*",
412
408
  "captures": {
413
409
  "1": {
414
410
  "name": "punctuation.separator.method-call.ocaml"
415
411
  }
416
- },
417
- "match": "(?<=\\w|\\)|')(#)[a-z_][a-zA-Z0-9'_]*",
418
- "name": "meta.method-call.ocaml"
412
+ }
419
413
  },
420
414
  {
415
+ "name": "meta.module.ocaml",
416
+ "match": "^[ \\t]*(module)\\s+([A-Z_][a-zA-Z0-9'_]*)(?:\\s*(:)\\s*([A-Z][a-zA-Z0-9'_]*)?)?",
421
417
  "captures": {
422
418
  "1": {
423
419
  "name": "keyword.other.module-definition.ocaml"
@@ -431,11 +427,11 @@
431
427
  "4": {
432
428
  "name": "entity.name.type.module-type.ocaml"
433
429
  }
434
- },
435
- "match": "^[ \\t]*(module)\\s+([A-Z_][a-zA-Z0-9'_]*)(?:\\s*(:)\\s*([A-Z][a-zA-Z0-9'_]*)?)?",
436
- "name": "meta.module.ocaml"
430
+ }
437
431
  },
438
432
  {
433
+ "name": "meta.module.type.ocaml",
434
+ "match": "^[ \\t]*(module\\s+type\\s+)([A-Z][a-zA-Z0-9'_]*)",
439
435
  "captures": {
440
436
  "1": {
441
437
  "name": "keyword.other.module-type-definition.ocaml"
@@ -443,18 +439,25 @@
443
439
  "2": {
444
440
  "name": "entity.name.type.module-type.ocaml"
445
441
  }
446
- },
447
- "match": "^[ \\t]*(module\\s+type\\s+)([A-Z][a-zA-Z0-9'_]*)",
448
- "name": "meta.module.type.ocaml"
442
+ }
449
443
  },
450
444
  {
445
+ "name": "meta.module.signature.ocaml",
451
446
  "begin": "\\b(sig)\\b",
447
+ "end": "\\b(end)\\b",
448
+ "patterns": [
449
+ {
450
+ "include": "#module-signature"
451
+ },
452
+ {
453
+ "include": "$self"
454
+ }
455
+ ],
452
456
  "beginCaptures": {
453
457
  "1": {
454
458
  "name": "keyword.other.module.signature.ocaml"
455
459
  }
456
460
  },
457
- "end": "\\b(end)\\b",
458
461
  "endCaptures": {
459
462
  "1": {
460
463
  "name": "keyword.other.module.signature.ocaml"
@@ -465,65 +468,58 @@
465
468
  "3": {
466
469
  "name": "keyword.operator.ocaml"
467
470
  }
468
- },
469
- "name": "meta.module.signature.ocaml",
471
+ }
472
+ },
473
+ {
474
+ "name": "meta.module.structure.ocaml",
475
+ "begin": "\\b(struct)\\b",
476
+ "end": "\\b(end)\\b",
470
477
  "patterns": [
471
- {
472
- "include": "#module-signature"
473
- },
474
478
  {
475
479
  "include": "$self"
476
480
  }
477
- ]
478
- },
479
- {
480
- "begin": "\\b(struct)\\b",
481
+ ],
481
482
  "beginCaptures": {
482
483
  "1": {
483
484
  "name": "keyword.other.module.structure.ocaml"
484
485
  }
485
486
  },
486
- "end": "\\b(end)\\b",
487
487
  "endCaptures": {
488
488
  "1": {
489
489
  "name": "keyword.other.module.structure.ocaml"
490
490
  }
491
- },
492
- "name": "meta.module.structure.ocaml",
493
- "patterns": [
494
- {
495
- "include": "$self"
496
- }
497
- ]
491
+ }
498
492
  },
499
493
  {
500
494
  "include": "#moduleref"
501
495
  },
502
496
  {
497
+ "name": "meta.module.open.ocaml",
503
498
  "begin": "\\b(open)\\s+([A-Z][a-zA-Z0-9'_]*)(?=(\\.[A-Z][a-zA-Z0-9_]*)*)",
504
- "beginCaptures": {
505
- "1": {
506
- "name": "keyword.other.ocaml"
507
- },
508
- "2": {
509
- "name": "support.other.module.ocaml"
510
- }
511
- },
512
499
  "end": "(\\s|$)",
513
- "name": "meta.module.open.ocaml",
514
500
  "patterns": [
515
501
  {
502
+ "name": "support.other.module.ocaml",
503
+ "match": "(\\.)([A-Z][a-zA-Z0-9'_]*)",
516
504
  "captures": {
517
505
  "1": {
518
506
  "name": "punctuation.separator.module-reference.ocaml"
519
507
  }
520
- },
521
- "match": "(\\.)([A-Z][a-zA-Z0-9'_]*)",
508
+ }
509
+ }
510
+ ],
511
+ "beginCaptures": {
512
+ "1": {
513
+ "name": "keyword.other.ocaml"
514
+ },
515
+ "2": {
522
516
  "name": "support.other.module.ocaml"
523
517
  }
524
- ]
518
+ }
525
519
  },
526
520
  {
521
+ "name": "meta.exception.ocaml",
522
+ "match": "\\b(exception)\\s+([A-Z][a-zA-Z0-9'_]*)\\b",
527
523
  "captures": {
528
524
  "1": {
529
525
  "name": "keyword.other.ocaml"
@@ -531,24 +527,22 @@
531
527
  "2": {
532
528
  "name": "entity.name.type.exception.ocaml"
533
529
  }
534
- },
535
- "match": "\\b(exception)\\s+([A-Z][a-zA-Z0-9'_]*)\\b",
536
- "name": "meta.exception.ocaml"
530
+ }
537
531
  },
538
532
  {
539
- "begin": "(?=(\\[<)(?![^\\[]+?[^>]]))",
540
- "end": "(>])",
541
- "endCaptures": {
542
- "1": {
543
- "name": "punctuation.definition.camlp4-stream.ocaml"
544
- }
545
- },
546
533
  "name": "source.camlp4.embedded.ocaml",
534
+ "begin": "(?=(\\[\u003c)(?![^\\[]+?[^\u003e]]))",
535
+ "end": "(\u003e])",
547
536
  "patterns": [
548
537
  {
549
538
  "include": "source.camlp4.ocaml"
550
539
  }
551
- ]
540
+ ],
541
+ "endCaptures": {
542
+ "1": {
543
+ "name": "punctuation.definition.camlp4-stream.ocaml"
544
+ }
545
+ }
552
546
  },
553
547
  {
554
548
  "include": "#strings"
@@ -566,13 +560,19 @@
566
560
  "include": "#arrays"
567
561
  },
568
562
  {
569
- "begin": "(\\()(?=(~[a-z][a-zA-Z0-9_]*:|(\"(\\\\\"|[^\"])*\")|[^\\(\\)~\"])+(?<!:)(:>|:(?![:=])))",
563
+ "name": "meta.type-constraint.ocaml",
564
+ "begin": "(\\()(?=(~[a-z][a-zA-Z0-9_]*:|(\"(\\\\\"|[^\"])*\")|[^\\(\\)~\"])+(?\u003c!:)(:\u003e|:(?![:=])))",
565
+ "end": "(?\u003c!:)(:\u003e|:(?![:=]))(.*?)(\\))",
566
+ "patterns": [
567
+ {
568
+ "include": "$self"
569
+ }
570
+ ],
570
571
  "beginCaptures": {
571
572
  "1": {
572
573
  "name": "punctuation.section.type-constraint.ocaml"
573
574
  }
574
575
  },
575
- "end": "(?<!:)(:>|:(?![:=]))(.*?)(\\))",
576
576
  "endCaptures": {
577
577
  "1": {
578
578
  "name": "punctuation.separator.type-constraint.ocaml"
@@ -583,154 +583,148 @@
583
583
  "3": {
584
584
  "name": "punctuation.section.type-constraint.ocaml"
585
585
  }
586
- },
587
- "name": "meta.type-constraint.ocaml",
588
- "patterns": [
589
- {
590
- "include": "$self"
591
- }
592
- ]
586
+ }
593
587
  },
594
588
  {
595
- "match": "^[ \\t]*#[a-zA-Z]+",
596
- "name": "keyword.other.directive.ocaml"
589
+ "name": "keyword.other.directive.ocaml",
590
+ "match": "^[ \\t]*#[a-zA-Z]+"
597
591
  },
598
592
  {
599
- "match": "^[ \\t]*#[0-9]*",
600
- "name": "keyword.other.directive.line-number.ocaml"
593
+ "name": "keyword.other.directive.line-number.ocaml",
594
+ "match": "^[ \\t]*#[0-9]*"
601
595
  },
602
596
  {
603
597
  "include": "#storagetypes"
604
598
  },
605
599
  {
606
- "match": "\\b(mutable|ref)\\b",
607
- "name": "keyword.other.storage.modifier.ocaml"
600
+ "name": "keyword.other.storage.modifier.ocaml",
601
+ "match": "\\b(mutable|ref)\\b"
608
602
  },
609
603
  {
610
- "match": "`[A-Za-z][a-zA-Z0-9'_]*\\b",
611
- "name": "entity.name.type.variant.polymorphic.ocaml"
604
+ "name": "entity.name.type.variant.polymorphic.ocaml",
605
+ "match": "`[A-Za-z][a-zA-Z0-9'_]*\\b"
612
606
  },
613
607
  {
614
- "match": "\\b[A-Z][a-zA-Z0-9'_]*\\b",
615
- "name": "entity.name.type.variant.ocaml"
608
+ "name": "entity.name.type.variant.ocaml",
609
+ "match": "\\b[A-Z][a-zA-Z0-9'_]*\\b"
616
610
  },
617
611
  {
618
- "match": "!=|:=|>|<",
619
- "name": "keyword.operator.symbol.ocaml"
612
+ "name": "keyword.operator.symbol.ocaml",
613
+ "match": "!=|:=|\u003e|\u003c"
620
614
  },
621
615
  {
622
- "match": "[*+/-]\\.",
623
- "name": "keyword.operator.infix.floating-point.ocaml"
616
+ "name": "keyword.operator.infix.floating-point.ocaml",
617
+ "match": "[*+/-]\\."
624
618
  },
625
619
  {
626
- "match": "~-\\.",
627
- "name": "keyword.operator.prefix.floating-point.ocaml"
620
+ "name": "keyword.operator.prefix.floating-point.ocaml",
621
+ "match": "~-\\."
628
622
  },
629
623
  {
630
- "match": "::",
631
- "name": "punctuation.definition.list.constructor.ocaml"
624
+ "name": "punctuation.definition.list.constructor.ocaml",
625
+ "match": "::"
632
626
  },
633
627
  {
634
- "match": ";;",
635
- "name": "punctuation.terminator.expression.ocaml"
628
+ "name": "punctuation.terminator.expression.ocaml",
629
+ "match": ";;"
636
630
  },
637
631
  {
638
- "match": ";",
639
- "name": "punctuation.separator.ocaml"
632
+ "name": "punctuation.separator.ocaml",
633
+ "match": ";"
640
634
  },
641
635
  {
642
- "match": "->",
643
- "name": "punctuation.separator.function-return.ocaml"
636
+ "name": "punctuation.separator.function-return.ocaml",
637
+ "match": "-\u003e"
644
638
  },
645
639
  {
646
- "match": "[=<>@^&+\\-*/$%|][|!$%&*+./:<=>?@^~-]*",
647
- "name": "keyword.operator.infix.ocaml"
640
+ "name": "keyword.operator.infix.ocaml",
641
+ "match": "[=\u003c\u003e@^\u0026+\\-*/$%|][|!$%\u0026*+./:\u003c=\u003e?@^~-]*"
648
642
  },
649
643
  {
650
- "match": "\\bnot\\b|!|[!\\?~][!$%&*+./:<=>?@^~-]+",
651
- "name": "keyword.operator.prefix.ocaml"
644
+ "name": "keyword.operator.prefix.ocaml",
645
+ "match": "\\bnot\\b|!|[!\\?~][!$%\u0026*+./:\u003c=\u003e?@^~-]+"
652
646
  },
653
647
  {
648
+ "name": "entity.name.tag.label.ocaml",
649
+ "match": "~[a-z][a-z0-9'_]*(:)?",
654
650
  "captures": {
655
651
  "1": {
656
652
  "name": "punctuation.separator.argument-label.ocaml"
657
653
  }
658
- },
659
- "match": "~[a-z][a-z0-9'_]*(:)?",
660
- "name": "entity.name.tag.label.ocaml"
654
+ }
661
655
  },
662
656
  {
657
+ "name": "meta.begin-end-group.ocaml",
663
658
  "begin": "\\b(begin)\\b",
659
+ "end": "\\b(end)\\b",
660
+ "patterns": [
661
+ {
662
+ "include": "$self"
663
+ }
664
+ ],
664
665
  "beginCaptures": {
665
666
  "1": {
666
667
  "name": "keyword.control.begin-end.ocaml"
667
668
  }
668
669
  },
669
- "end": "\\b(end)\\b",
670
670
  "endCaptures": {
671
671
  "1": {
672
672
  "name": "keyword.control.begin-end.ocaml"
673
673
  }
674
- },
675
- "name": "meta.begin-end-group.ocaml",
674
+ }
675
+ },
676
+ {
677
+ "name": "meta.for-loop.ocaml",
678
+ "begin": "\\b(for)\\b",
679
+ "end": "\\b(done)\\b",
676
680
  "patterns": [
681
+ {
682
+ "name": "keyword.control.loop.ocaml",
683
+ "match": "\\bdo\\b"
684
+ },
677
685
  {
678
686
  "include": "$self"
679
687
  }
680
- ]
681
- },
682
- {
683
- "begin": "\\b(for)\\b",
688
+ ],
684
689
  "beginCaptures": {
685
690
  "1": {
686
691
  "name": "keyword.control.for-loop.ocaml"
687
692
  }
688
693
  },
689
- "end": "\\b(done)\\b",
690
694
  "endCaptures": {
691
695
  "1": {
692
696
  "name": "keyword.control.for-loop.ocaml"
693
697
  }
694
- },
695
- "name": "meta.for-loop.ocaml",
698
+ }
699
+ },
700
+ {
701
+ "name": "meta.while-loop.ocaml",
702
+ "begin": "\\b(while)\\b",
703
+ "end": "\\b(done)\\b",
696
704
  "patterns": [
697
705
  {
698
- "match": "\\bdo\\b",
699
- "name": "keyword.control.loop.ocaml"
706
+ "name": "keyword.control.loop.ocaml",
707
+ "match": "\\bdo\\b"
700
708
  },
701
709
  {
702
710
  "include": "$self"
703
711
  }
704
- ]
705
- },
706
- {
707
- "begin": "\\b(while)\\b",
712
+ ],
708
713
  "beginCaptures": {
709
714
  "1": {
710
715
  "name": "keyword.control.while-loop.ocaml"
711
716
  }
712
717
  },
713
- "end": "\\b(done)\\b",
714
718
  "endCaptures": {
715
719
  "1": {
716
720
  "name": "keyword.control.while-loop.ocaml"
717
721
  }
718
- },
719
- "name": "meta.while-loop.ocaml",
720
- "patterns": [
721
- {
722
- "match": "\\bdo\\b",
723
- "name": "keyword.control.loop.ocaml"
724
- },
725
- {
726
- "include": "$self"
727
- }
728
- ]
722
+ }
729
723
  },
730
724
  {
725
+ "name": "meta.paren-group.ocaml",
731
726
  "begin": "\\(",
732
727
  "end": "\\)",
733
- "name": "meta.paren-group.ocaml",
734
728
  "patterns": [
735
729
  {
736
730
  "include": "$self"
@@ -738,74 +732,74 @@
738
732
  ]
739
733
  },
740
734
  {
741
- "match": "\\b(and|land|lor|lsl|lsr|asr|lnot|lxor|mod|or)\\b",
742
- "name": "keyword.operator.ocaml"
735
+ "name": "keyword.operator.ocaml",
736
+ "match": "\\b(and|land|lor|lsl|lsr|asr|lnot|lxor|mod|or)\\b"
743
737
  },
744
738
  {
745
- "match": "\\b(downto|if|else|match|then|to|when|with|try)\\b",
746
- "name": "keyword.control.ocaml"
739
+ "name": "keyword.control.ocaml",
740
+ "match": "\\b(downto|if|else|match|then|to|when|with|try)\\b"
747
741
  },
748
742
  {
749
- "match": "\\b(as|assert|class|constraint|exception|functor|in|include|inherit|initializer|lazy|let|mod|module|mutable|new|object|open|private|rec|sig|struct|type|virtual)\\b",
750
- "name": "keyword.other.ocaml"
743
+ "name": "keyword.other.ocaml",
744
+ "match": "\\b(as|assert|class|constraint|exception|functor|in|include|inherit|initializer|lazy|let|mod|module|mutable|new|object|open|private|rec|sig|struct|type|virtual)\\b"
751
745
  },
752
746
  {
753
747
  "include": "#module-signature"
754
748
  },
755
749
  {
756
- "match": "(’|‘|“|”)",
757
- "name": "invalid.illegal.unrecognized-character.ocaml"
750
+ "name": "invalid.illegal.unrecognized-character.ocaml",
751
+ "match": "(’|‘|“|”)"
758
752
  }
759
753
  ],
760
754
  "repository": {
761
755
  "arrays": {
762
756
  "patterns": [
763
757
  {
758
+ "name": "meta.array.ocaml",
764
759
  "begin": "(\\[\\|)",
760
+ "end": "(\\|])",
761
+ "patterns": [
762
+ {
763
+ "include": "#arrays"
764
+ },
765
+ {
766
+ "include": "$self"
767
+ }
768
+ ],
765
769
  "beginCaptures": {
766
770
  "1": {
767
771
  "name": "punctuation.definition.array.begin.ocaml"
768
772
  }
769
773
  },
770
- "end": "(\\|])",
771
774
  "endCaptures": {
772
775
  "1": {
773
776
  "name": "punctuation.definition.array.end.ocaml"
774
777
  }
775
- },
776
- "name": "meta.array.ocaml",
777
- "patterns": [
778
- {
779
- "include": "#arrays"
780
- },
781
- {
782
- "include": "$self"
783
- }
784
- ]
778
+ }
785
779
  }
786
780
  ]
787
781
  },
788
782
  "comments": {
789
783
  "patterns": [
790
784
  {
785
+ "name": "comment.block.ocaml",
791
786
  "begin": "\\(\\*",
787
+ "end": "\\*\\)",
788
+ "patterns": [
789
+ {
790
+ "include": "#comments"
791
+ }
792
+ ],
792
793
  "beginCaptures": {
793
794
  "0": {
794
795
  "name": "punctuation.definition.comment.begin.ocaml"
795
796
  }
796
797
  },
797
- "end": "\\*\\)",
798
798
  "endCaptures": {
799
799
  "0": {
800
800
  "name": "punctuation.definition.comment.end.ocaml"
801
801
  }
802
- },
803
- "name": "comment.block.ocaml",
804
- "patterns": [
805
- {
806
- "include": "#comments"
807
- }
808
- ]
802
+ }
809
803
  }
810
804
  ]
811
805
  },
@@ -815,13 +809,13 @@
815
809
  "include": "#comments"
816
810
  },
817
811
  {
812
+ "name": "comment.block.string.quoted.double.ocaml",
818
813
  "begin": "(?=[^\\\\])(\")",
819
814
  "end": "\"",
820
- "name": "comment.block.string.quoted.double.ocaml",
821
815
  "patterns": [
822
816
  {
823
- "match": "\\\\(x[a-fA-F0-9][a-fA-F0-9]|[0-2]\\d\\d|[bnrt'\"\\\\])",
824
- "name": "comment.block.string.constant.character.escape.ocaml"
817
+ "name": "comment.block.string.constant.character.escape.ocaml",
818
+ "match": "\\\\(x[a-fA-F0-9][a-fA-F0-9]|[0-2]\\d\\d|[bnrt'\"\\\\])"
825
819
  }
826
820
  ]
827
821
  }
@@ -830,6 +824,8 @@
830
824
  "constants": {
831
825
  "patterns": [
832
826
  {
827
+ "name": "constant.language.pseudo-variable.ocaml",
828
+ "match": "(?:\\[\\s*(\\])|\\((\\))|\\(\\s*(\\)))",
833
829
  "captures": {
834
830
  "1": {
835
831
  "name": "meta.empty-typing-pair.ocaml"
@@ -840,37 +836,35 @@
840
836
  "3": {
841
837
  "name": "meta.empty-typing-pair.ocaml"
842
838
  }
843
- },
844
- "match": "(?:\\[\\s*(\\])|\\((\\))|\\(\\s*(\\)))",
845
- "name": "constant.language.pseudo-variable.ocaml"
839
+ }
846
840
  },
847
841
  {
848
- "match": "\\b(true|false)\\b",
849
- "name": "constant.language.boolean.ocaml"
842
+ "name": "constant.language.boolean.ocaml",
843
+ "match": "\\b(true|false)\\b"
850
844
  },
851
845
  {
852
- "match": "\\b-?[0-9][0-9_]*((\\.([0-9][0-9_]*([eE][+-]??[0-9][0-9_]*)?)?)|([eE][+-]??[0-9][0-9_]*))",
853
- "name": "constant.numeric.floating-point.ocaml"
846
+ "name": "constant.numeric.floating-point.ocaml",
847
+ "match": "\\b-?[0-9][0-9_]*((\\.([0-9][0-9_]*([eE][+-]??[0-9][0-9_]*)?)?)|([eE][+-]??[0-9][0-9_]*))"
854
848
  },
855
849
  {
856
- "match": "\\b(-?((0(x|X)[0-9a-fA-F][0-9a-fA-F_]*)|(0(o|O)[0-7][0-7_]*)|(0(b|B)[01][01_]*)|([0-9][0-9_]*)))n",
857
- "name": "constant.numeric.integer.nativeint.ocaml"
850
+ "name": "constant.numeric.integer.nativeint.ocaml",
851
+ "match": "\\b(-?((0(x|X)[0-9a-fA-F][0-9a-fA-F_]*)|(0(o|O)[0-7][0-7_]*)|(0(b|B)[01][01_]*)|([0-9][0-9_]*)))n"
858
852
  },
859
853
  {
860
- "match": "\\b(-?((0(x|X)[0-9a-fA-F][0-9a-fA-F_]*)|(0(o|O)[0-7][0-7_]*)|(0(b|B)[01][01_]*)|([0-9][0-9_]*)))L",
861
- "name": "constant.numeric.integer.int64.ocaml"
854
+ "name": "constant.numeric.integer.int64.ocaml",
855
+ "match": "\\b(-?((0(x|X)[0-9a-fA-F][0-9a-fA-F_]*)|(0(o|O)[0-7][0-7_]*)|(0(b|B)[01][01_]*)|([0-9][0-9_]*)))L"
862
856
  },
863
857
  {
864
- "match": "\\b(-?((0(x|X)[0-9a-fA-F][0-9a-fA-F_]*)|(0(o|O)[0-7][0-7_]*)|(0(b|B)[01][01_]*)|([0-9][0-9_]*)))l",
865
- "name": "constant.numeric.integer.int32.ocaml"
858
+ "name": "constant.numeric.integer.int32.ocaml",
859
+ "match": "\\b(-?((0(x|X)[0-9a-fA-F][0-9a-fA-F_]*)|(0(o|O)[0-7][0-7_]*)|(0(b|B)[01][01_]*)|([0-9][0-9_]*)))l"
866
860
  },
867
861
  {
868
- "match": "\\b(-?((0(x|X)[0-9a-fA-F][0-9a-fA-F_]*)|(0(o|O)[0-7][0-7_]*)|(0(b|B)[01][01_]*)|([0-9][0-9_]*)))",
869
- "name": "constant.numeric.integer.ocaml"
862
+ "name": "constant.numeric.integer.ocaml",
863
+ "match": "\\b(-?((0(x|X)[0-9a-fA-F][0-9a-fA-F_]*)|(0(o|O)[0-7][0-7_]*)|(0(b|B)[01][01_]*)|([0-9][0-9_]*)))"
870
864
  },
871
865
  {
872
- "match": "'(.|\\\\(x[a-fA-F0-9][a-fA-F0-9]|[0-2]\\d\\d|[bnrt'\"\\\\]))'",
873
- "name": "constant.character.ocaml"
866
+ "name": "constant.character.ocaml",
867
+ "match": "'(.|\\\\(x[a-fA-F0-9][a-fA-F0-9]|[0-2]\\d\\d|[bnrt'\"\\\\]))'"
874
868
  }
875
869
  ]
876
870
  },
@@ -880,27 +874,17 @@
880
874
  "include": "#storagetypes"
881
875
  },
882
876
  {
883
- "match": "\\b[a-zA-Z0-9'_]+\\b",
884
- "name": "storage.type.ocaml"
877
+ "name": "storage.type.ocaml",
878
+ "match": "\\b[a-zA-Z0-9'_]+\\b"
885
879
  }
886
880
  ]
887
881
  },
888
882
  "lists": {
889
883
  "patterns": [
890
884
  {
891
- "begin": "(\\[)(?!\\||<|>)",
892
- "beginCaptures": {
893
- "1": {
894
- "name": "punctuation.definition.list.begin.ocaml"
895
- }
896
- },
897
- "end": "(?<!\\||>)(])",
898
- "endCaptures": {
899
- "1": {
900
- "name": "punctuation.definition.list.end.ocaml"
901
- }
902
- },
903
885
  "name": "meta.list.ocaml",
886
+ "begin": "(\\[)(?!\\||\u003c|\u003e)",
887
+ "end": "(?\u003c!\\||\u003e)(])",
904
888
  "patterns": [
905
889
  {
906
890
  "include": "#lists"
@@ -908,43 +892,53 @@
908
892
  {
909
893
  "include": "$self"
910
894
  }
911
- ]
895
+ ],
896
+ "beginCaptures": {
897
+ "1": {
898
+ "name": "punctuation.definition.list.begin.ocaml"
899
+ }
900
+ },
901
+ "endCaptures": {
902
+ "1": {
903
+ "name": "punctuation.definition.list.end.ocaml"
904
+ }
905
+ }
912
906
  }
913
907
  ]
914
908
  },
915
909
  "matchpatterns": {
916
910
  "patterns": [
917
911
  {
918
- "match": "\\b_\\b",
919
- "name": "constant.language.universal-match.ocaml"
912
+ "name": "constant.language.universal-match.ocaml",
913
+ "match": "\\b_\\b"
920
914
  },
921
915
  {
922
- "match": "\\|(?=\\s*\\S)",
923
- "name": "punctuation.separator.match-pattern.ocaml"
916
+ "name": "punctuation.separator.match-pattern.ocaml",
917
+ "match": "\\|(?=\\s*\\S)"
924
918
  },
925
919
  {
926
- "begin": "(\\()(?=(?!=.*?->).*?\\|)",
920
+ "name": "meta.match-option.ocaml",
921
+ "begin": "(\\()(?=(?!=.*?-\u003e).*?\\|)",
922
+ "end": "(\\))",
923
+ "patterns": [
924
+ {
925
+ "name": "punctuation.separator.match-option.ocaml",
926
+ "match": "\\|"
927
+ },
928
+ {
929
+ "include": "#matchpatterns"
930
+ }
931
+ ],
927
932
  "beginCaptures": {
928
933
  "1": {
929
934
  "name": "punctuation.definition.match-option.ocaml"
930
935
  }
931
936
  },
932
- "end": "(\\))",
933
937
  "endCaptures": {
934
938
  "1": {
935
939
  "name": "punctuation.definition.match-option.ocaml"
936
940
  }
937
- },
938
- "name": "meta.match-option.ocaml",
939
- "patterns": [
940
- {
941
- "match": "\\|",
942
- "name": "punctuation.separator.match-option.ocaml"
943
- },
944
- {
945
- "include": "#matchpatterns"
946
- }
947
- ]
941
+ }
948
942
  },
949
943
  {
950
944
  "include": "#moduleref"
@@ -963,22 +957,13 @@
963
957
  "module-signature": {
964
958
  "patterns": [
965
959
  {
960
+ "name": "meta.module.signature.val.ocaml",
966
961
  "begin": "(val)\\s+([a-z_][a-zA-Z0-9_']*)\\s*(:)",
967
- "beginCaptures": {
968
- "1": {
969
- "name": "keyword.other.ocaml"
970
- },
971
- "2": {
972
- "name": "entity.name.type.value-signature.ocaml"
973
- },
974
- "3": {
975
- "name": "punctuation.separator.type-constraint.ocaml"
976
- }
977
- },
978
962
  "end": "(?=\\b(type|val|external|class|module|end)\\b)|^\\s*$",
979
- "name": "meta.module.signature.val.ocaml",
980
963
  "patterns": [
981
964
  {
965
+ "name": "variable.parameter.ameter.optional.ocaml",
966
+ "match": "(\\?)([a-z][a-zA-Z0-9_]*)\\s*(:)",
982
967
  "captures": {
983
968
  "1": {
984
969
  "name": "punctuation.definition.optional-parameter.ocaml"
@@ -989,12 +974,17 @@
989
974
  "3": {
990
975
  "name": "punctuation.separator.optional-parameter.ocaml"
991
976
  }
992
- },
993
- "match": "(\\?)([a-z][a-zA-Z0-9_]*)\\s*(:)",
994
- "name": "variable.parameter.ameter.optional.ocaml"
977
+ }
995
978
  },
996
979
  {
980
+ "name": "variable.parameter.labeled.ocaml",
997
981
  "begin": "([a-z][a-zA-Z0-9'_]*)\\s*(:)\\s*",
982
+ "end": "\\s",
983
+ "patterns": [
984
+ {
985
+ "include": "#definite_storagetypes"
986
+ }
987
+ ],
998
988
  "beginCaptures": {
999
989
  "1": {
1000
990
  "name": "entity.name.tag.label.ocaml"
@@ -1005,37 +995,32 @@
1005
995
  "3": {
1006
996
  "name": "storage.type.ocaml"
1007
997
  }
1008
- },
1009
- "end": "\\s",
1010
- "name": "variable.parameter.labeled.ocaml",
1011
- "patterns": [
1012
- {
1013
- "include": "#definite_storagetypes"
1014
- }
1015
- ]
998
+ }
1016
999
  },
1017
1000
  {
1018
1001
  "include": "#typedefs"
1019
1002
  }
1020
- ]
1021
- },
1022
- {
1023
- "begin": "(external)\\s+([a-z_][a-zA-Z0-9_']*)\\s*(:)",
1003
+ ],
1024
1004
  "beginCaptures": {
1025
1005
  "1": {
1026
1006
  "name": "keyword.other.ocaml"
1027
1007
  },
1028
1008
  "2": {
1029
- "name": "entity.name.type.external-signature.ocaml"
1009
+ "name": "entity.name.type.value-signature.ocaml"
1030
1010
  },
1031
1011
  "3": {
1032
1012
  "name": "punctuation.separator.type-constraint.ocaml"
1033
1013
  }
1034
- },
1035
- "end": "(?=\\b(type|val|external|class|module|let|end)\\b)|^\\s*$",
1014
+ }
1015
+ },
1016
+ {
1036
1017
  "name": "meta.module.signature.external.ocaml",
1018
+ "begin": "(external)\\s+([a-z_][a-zA-Z0-9_']*)\\s*(:)",
1019
+ "end": "(?=\\b(type|val|external|class|module|let|end)\\b)|^\\s*$",
1037
1020
  "patterns": [
1038
1021
  {
1022
+ "name": "variable.parameter.optional.ocaml",
1023
+ "match": "(\\?)([a-z][a-zA-Z0-9_]*)\\s*(:)",
1039
1024
  "captures": {
1040
1025
  "1": {
1041
1026
  "name": "punctuation.definition.optional-parameter.ocaml"
@@ -1046,12 +1031,17 @@
1046
1031
  "3": {
1047
1032
  "name": "punctuation.separator.optional-parameter.ocaml"
1048
1033
  }
1049
- },
1050
- "match": "(\\?)([a-z][a-zA-Z0-9_]*)\\s*(:)",
1051
- "name": "variable.parameter.optional.ocaml"
1034
+ }
1052
1035
  },
1053
1036
  {
1037
+ "name": "variable.parameter.labeled.ocaml",
1054
1038
  "begin": "(~)([a-z][a-zA-Z0-9'_]*)\\s*(:)\\s*",
1039
+ "end": "\\s",
1040
+ "patterns": [
1041
+ {
1042
+ "include": "#variables"
1043
+ }
1044
+ ],
1055
1045
  "beginCaptures": {
1056
1046
  "1": {
1057
1047
  "name": "punctuation.definition.labeled-parameter.ocaml"
@@ -1062,14 +1052,7 @@
1062
1052
  "3": {
1063
1053
  "name": "punctuation.separator.label.ocaml"
1064
1054
  }
1065
- },
1066
- "end": "\\s",
1067
- "name": "variable.parameter.labeled.ocaml",
1068
- "patterns": [
1069
- {
1070
- "include": "#variables"
1071
- }
1072
- ]
1055
+ }
1073
1056
  },
1074
1057
  {
1075
1058
  "include": "#strings"
@@ -1077,13 +1060,26 @@
1077
1060
  {
1078
1061
  "include": "#typedefs"
1079
1062
  }
1080
- ]
1063
+ ],
1064
+ "beginCaptures": {
1065
+ "1": {
1066
+ "name": "keyword.other.ocaml"
1067
+ },
1068
+ "2": {
1069
+ "name": "entity.name.type.external-signature.ocaml"
1070
+ },
1071
+ "3": {
1072
+ "name": "punctuation.separator.type-constraint.ocaml"
1073
+ }
1074
+ }
1081
1075
  }
1082
1076
  ]
1083
1077
  },
1084
1078
  "moduleref": {
1085
1079
  "patterns": [
1086
1080
  {
1081
+ "name": "meta.module-reference.ocaml",
1082
+ "match": "\\b([A-Z][a-zA-Z0-9'_]*)(\\.)",
1087
1083
  "beginCaptures": {
1088
1084
  "1": {
1089
1085
  "name": "support.other.module.ocaml"
@@ -1091,74 +1087,72 @@
1091
1087
  "2": {
1092
1088
  "name": "punctuation.separator.module-reference.ocaml"
1093
1089
  }
1094
- },
1095
- "match": "\\b([A-Z][a-zA-Z0-9'_]*)(\\.)",
1096
- "name": "meta.module-reference.ocaml"
1090
+ }
1097
1091
  }
1098
1092
  ]
1099
1093
  },
1100
1094
  "storagetypes": {
1101
1095
  "patterns": [
1102
1096
  {
1103
- "match": "\\b(int|char|float|string|list|array|bool|unit|exn|option|int32|int64|nativeint|format4|lazy_t)\\b",
1104
- "name": "storage.type.ocaml"
1097
+ "name": "storage.type.ocaml",
1098
+ "match": "\\b(int|char|float|string|list|array|bool|unit|exn|option|int32|int64|nativeint|format4|lazy_t)\\b"
1105
1099
  },
1106
1100
  {
1107
- "match": "#[a-z_][a-zA-Z0-9_]*",
1108
- "name": "storage.type.variant.polymorphic.ocaml"
1101
+ "name": "storage.type.variant.polymorphic.ocaml",
1102
+ "match": "#[a-z_][a-zA-Z0-9_]*"
1109
1103
  }
1110
1104
  ]
1111
1105
  },
1112
1106
  "strings": {
1113
1107
  "patterns": [
1114
1108
  {
1109
+ "name": "string.quoted.double.ocaml",
1115
1110
  "begin": "(?=[^\\\\])(\")",
1116
- "beginCaptures": {
1117
- "1": {
1118
- "name": "punctuation.definition.string.begin.ocaml"
1119
- }
1120
- },
1121
1111
  "end": "(\")",
1122
- "endCaptures": {
1123
- "1": {
1124
- "name": "punctuation.definition.string.end.ocaml"
1125
- }
1126
- },
1127
- "name": "string.quoted.double.ocaml",
1128
1112
  "patterns": [
1129
1113
  {
1130
- "match": "\\\\$[ \\t]*",
1131
- "name": "punctuation.separator.string.ignore-eol.ocaml"
1114
+ "name": "punctuation.separator.string.ignore-eol.ocaml",
1115
+ "match": "\\\\$[ \\t]*"
1132
1116
  },
1133
1117
  {
1134
- "match": "\\\\(x[a-fA-F0-9][a-fA-F0-9]|[0-2]\\d\\d|[bnrt'\"\\\\])",
1135
- "name": "constant.character.string.escape.ocaml"
1118
+ "name": "constant.character.string.escape.ocaml",
1119
+ "match": "\\\\(x[a-fA-F0-9][a-fA-F0-9]|[0-2]\\d\\d|[bnrt'\"\\\\])"
1136
1120
  },
1137
1121
  {
1138
- "match": "\\\\[\\|\\(\\)1-9$^.*+?\\[\\]]",
1139
- "name": "constant.character.regexp.escape.ocaml"
1122
+ "name": "constant.character.regexp.escape.ocaml",
1123
+ "match": "\\\\[\\|\\(\\)1-9$^.*+?\\[\\]]"
1140
1124
  },
1141
1125
  {
1142
- "match": "\\\\(?!(x[a-fA-F0-9][a-fA-F0-9]|[0-2]\\d\\d|[bnrt'\"\\\\]|[\\|\\(\\)1-9$^.*+?\\[\\]]|$[ \\t]*))(?:.)",
1143
- "name": "invalid.illegal.character.string.escape"
1126
+ "name": "invalid.illegal.character.string.escape",
1127
+ "match": "\\\\(?!(x[a-fA-F0-9][a-fA-F0-9]|[0-2]\\d\\d|[bnrt'\"\\\\]|[\\|\\(\\)1-9$^.*+?\\[\\]]|$[ \\t]*))(?:.)"
1144
1128
  }
1145
- ]
1129
+ ],
1130
+ "beginCaptures": {
1131
+ "1": {
1132
+ "name": "punctuation.definition.string.begin.ocaml"
1133
+ }
1134
+ },
1135
+ "endCaptures": {
1136
+ "1": {
1137
+ "name": "punctuation.definition.string.end.ocaml"
1138
+ }
1139
+ }
1146
1140
  }
1147
1141
  ]
1148
1142
  },
1149
1143
  "typedefs": {
1150
1144
  "patterns": [
1151
1145
  {
1152
- "match": "\\|",
1153
- "name": "punctuation.separator.variant-definition.ocaml"
1146
+ "name": "punctuation.separator.variant-definition.ocaml",
1147
+ "match": "\\|"
1154
1148
  },
1155
1149
  {
1156
1150
  "include": "#comments_inner"
1157
1151
  },
1158
1152
  {
1153
+ "name": "meta.paren-group.ocaml",
1159
1154
  "begin": "\\(",
1160
1155
  "end": "\\)",
1161
- "name": "meta.paren-group.ocaml",
1162
1156
  "patterns": [
1163
1157
  {
1164
1158
  "include": "#typedefs"
@@ -1166,17 +1160,19 @@
1166
1160
  ]
1167
1161
  },
1168
1162
  {
1169
- "match": "\\bof\\b",
1170
- "name": "keyword.other.ocaml"
1163
+ "name": "keyword.other.ocaml",
1164
+ "match": "\\bof\\b"
1171
1165
  },
1172
1166
  {
1173
1167
  "include": "#storagetypes"
1174
1168
  },
1175
1169
  {
1176
- "match": "(?<=\\s|\\()['a-z_][a-zA-Z0-9_]*\\b",
1177
- "name": "storage.type.ocaml"
1170
+ "name": "storage.type.ocaml",
1171
+ "match": "(?\u003c=\\s|\\()['a-z_][a-zA-Z0-9_]*\\b"
1178
1172
  },
1179
1173
  {
1174
+ "name": "meta.module.type.ocaml",
1175
+ "match": "\\b((?:[A-Z][a-zA-Z0-9'_]*)(?:\\.[A-Z][a-zA-Z0-9'_]+)*)(\\.[a-zA-Z0-9'_]+)",
1180
1176
  "captures": {
1181
1177
  "1": {
1182
1178
  "name": "support.other.module.ocaml"
@@ -1184,44 +1180,42 @@
1184
1180
  "2": {
1185
1181
  "name": "storage.type.module.ocaml"
1186
1182
  }
1187
- },
1188
- "match": "\\b((?:[A-Z][a-zA-Z0-9'_]*)(?:\\.[A-Z][a-zA-Z0-9'_]+)*)(\\.[a-zA-Z0-9'_]+)",
1189
- "name": "meta.module.type.ocaml"
1183
+ }
1190
1184
  },
1191
1185
  {
1192
- "begin": "(\\[(>|<)?)",
1186
+ "name": "meta.polymorphic-variant.definition.ocaml",
1187
+ "begin": "(\\[(\u003e|\u003c)?)",
1188
+ "end": "(\\])",
1189
+ "patterns": [
1190
+ {
1191
+ "include": "#typedefs"
1192
+ }
1193
+ ],
1193
1194
  "beginCaptures": {
1194
1195
  "1": {
1195
1196
  "name": "punctuation.definition.polymorphic-variant.ocaml"
1196
1197
  }
1197
1198
  },
1198
- "end": "(\\])",
1199
1199
  "endCaptures": {
1200
1200
  "1": {
1201
1201
  "name": "punctuation.definition.polymorphic-variant.ocaml"
1202
1202
  }
1203
- },
1204
- "name": "meta.polymorphic-variant.definition.ocaml",
1205
- "patterns": [
1206
- {
1207
- "include": "#typedefs"
1208
- }
1209
- ]
1203
+ }
1210
1204
  },
1211
1205
  {
1212
1206
  "include": "$self"
1213
1207
  },
1214
1208
  {
1215
- "match": "\\|",
1216
- "name": "punctuation.separator.algebraic-type.ocaml"
1209
+ "name": "punctuation.separator.algebraic-type.ocaml",
1210
+ "match": "\\|"
1217
1211
  }
1218
1212
  ]
1219
1213
  },
1220
1214
  "variables": {
1221
1215
  "patterns": [
1222
1216
  {
1223
- "match": "\\(\\)",
1224
- "name": "variable.parameter.unit.ocaml"
1217
+ "name": "variable.parameter.unit.ocaml",
1218
+ "match": "\\(\\)"
1225
1219
  },
1226
1220
  {
1227
1221
  "include": "#constants"
@@ -1230,7 +1224,14 @@
1230
1224
  "include": "#moduleref"
1231
1225
  },
1232
1226
  {
1227
+ "name": "variable.parameter.labeled.ocaml",
1233
1228
  "begin": "(~)([a-z][a-zA-Z0-9'_]*)(\\s*:\\s*)?",
1229
+ "end": "(?=(-\u003e|\\s))",
1230
+ "patterns": [
1231
+ {
1232
+ "include": "#variables"
1233
+ }
1234
+ ],
1234
1235
  "beginCaptures": {
1235
1236
  "1": {
1236
1237
  "name": "punctuation.definition.labeled-parameter.ocaml"
@@ -1241,16 +1242,11 @@
1241
1242
  "3": {
1242
1243
  "name": "punctuation.separator.label.ocaml"
1243
1244
  }
1244
- },
1245
- "end": "(?=(->|\\s))",
1246
- "name": "variable.parameter.labeled.ocaml",
1247
- "patterns": [
1248
- {
1249
- "include": "#variables"
1250
- }
1251
- ]
1245
+ }
1252
1246
  },
1253
1247
  {
1248
+ "name": "variable.parameter.optional.ocaml",
1249
+ "match": "(\\?)([a-z][a-zA-Z0-9_]*)",
1254
1250
  "captures": {
1255
1251
  "1": {
1256
1252
  "name": "punctuation.definition.optional-parameter.ocaml"
@@ -1258,12 +1254,17 @@
1258
1254
  "2": {
1259
1255
  "name": "entity.name.tag.label.optional.ocaml"
1260
1256
  }
1261
- },
1262
- "match": "(\\?)([a-z][a-zA-Z0-9_]*)",
1263
- "name": "variable.parameter.optional.ocaml"
1257
+ }
1264
1258
  },
1265
1259
  {
1260
+ "name": "variable.parameter.optional.ocaml",
1266
1261
  "begin": "(\\?)(\\()([a-z_][a-zA-Z0-9'_]*)\\s*(=)",
1262
+ "end": "(\\))",
1263
+ "patterns": [
1264
+ {
1265
+ "include": "$self"
1266
+ }
1267
+ ],
1267
1268
  "beginCaptures": {
1268
1269
  "1": {
1269
1270
  "name": "punctuation.definition.optional-parameter.ocaml"
@@ -1278,63 +1279,56 @@
1278
1279
  "name": "punctuation.separator.optional-parameter-assignment.ocaml"
1279
1280
  }
1280
1281
  },
1281
- "end": "(\\))",
1282
1282
  "endCaptures": {
1283
1283
  "1": {
1284
1284
  "name": "punctuation.definition.optional-parameter.ocaml"
1285
1285
  }
1286
- },
1287
- "name": "variable.parameter.optional.ocaml",
1288
- "patterns": [
1289
- {
1290
- "include": "$self"
1291
- }
1292
- ]
1286
+ }
1293
1287
  },
1294
1288
  {
1295
- "begin": "(\\()(?=(~[a-z][a-zA-Z0-9_]*:|(\"(\\\\\"|[^\"])*\")|[^\\(\\)~\"])+(?<!:)(:>|:(?![:=])))",
1296
- "beginCaptures": {
1297
- "1": {
1298
- "name": "punctuation.section.type-constraint.ocaml"
1299
- }
1300
- },
1301
- "end": "(\\))",
1302
- "endCaptures": {
1303
- "1": {
1304
- "name": "punctuation.section.type-constraint.ocaml"
1305
- }
1306
- },
1307
1289
  "name": "meta.parameter.type-constrained.ocaml",
1290
+ "begin": "(\\()(?=(~[a-z][a-zA-Z0-9_]*:|(\"(\\\\\"|[^\"])*\")|[^\\(\\)~\"])+(?\u003c!:)(:\u003e|:(?![:=])))",
1291
+ "end": "(\\))",
1308
1292
  "patterns": [
1309
1293
  {
1310
- "begin": "(?<!:)(:>|:(?![:=]))",
1311
- "beginCaptures": {
1312
- "1": {
1313
- "name": "punctuation.separator.type-constraint.ocaml"
1314
- }
1315
- },
1316
- "end": "(?=\\))",
1317
1294
  "name": "storage.type.ocaml",
1295
+ "begin": "(?\u003c!:)(:\u003e|:(?![:=]))",
1296
+ "end": "(?=\\))",
1318
1297
  "patterns": [
1319
1298
  {
1299
+ "name": "meta.paren.group",
1320
1300
  "begin": "\\(",
1321
- "end": "\\)",
1322
- "name": "meta.paren.group"
1301
+ "end": "\\)"
1302
+ }
1303
+ ],
1304
+ "beginCaptures": {
1305
+ "1": {
1306
+ "name": "punctuation.separator.type-constraint.ocaml"
1323
1307
  }
1324
- ]
1308
+ }
1325
1309
  },
1326
1310
  {
1327
1311
  "include": "#variables"
1328
1312
  }
1329
- ]
1313
+ ],
1314
+ "beginCaptures": {
1315
+ "1": {
1316
+ "name": "punctuation.section.type-constraint.ocaml"
1317
+ }
1318
+ },
1319
+ "endCaptures": {
1320
+ "1": {
1321
+ "name": "punctuation.section.type-constraint.ocaml"
1322
+ }
1323
+ }
1330
1324
  },
1331
1325
  {
1332
1326
  "include": "#comments_inner"
1333
1327
  },
1334
1328
  {
1329
+ "name": "meta.paren-group.ocaml",
1335
1330
  "begin": "\\(",
1336
1331
  "end": "\\)",
1337
- "name": "meta.paren-group.ocaml",
1338
1332
  "patterns": [
1339
1333
  {
1340
1334
  "include": "#variables"
@@ -1342,19 +1336,9 @@
1342
1336
  ]
1343
1337
  },
1344
1338
  {
1339
+ "name": "variable.parameter.tuple.ocaml",
1345
1340
  "begin": "(\\()",
1346
- "beginCaptures": {
1347
- "1": {
1348
- "name": "punctuation.definition.tuple.ocaml"
1349
- }
1350
- },
1351
1341
  "end": "(\\))",
1352
- "endCaptures": {
1353
- "1": {
1354
- "name": "punctuation.definition.tuple.ocaml"
1355
- }
1356
- },
1357
- "name": "variable.parameter.tuple.ocaml",
1358
1342
  "patterns": [
1359
1343
  {
1360
1344
  "include": "#matchpatterns"
@@ -1363,31 +1347,38 @@
1363
1347
  "include": "#variables"
1364
1348
  },
1365
1349
  {
1366
- "match": ",",
1367
- "name": "punctuation.separator.tuple.ocaml"
1350
+ "name": "punctuation.separator.tuple.ocaml",
1351
+ "match": ","
1368
1352
  }
1369
- ]
1370
- },
1371
- {
1372
- "begin": "(\\{)",
1353
+ ],
1373
1354
  "beginCaptures": {
1374
1355
  "1": {
1375
- "name": "punctuation.definition.record.ocaml"
1356
+ "name": "punctuation.definition.tuple.ocaml"
1376
1357
  }
1377
1358
  },
1378
- "end": "(\\})",
1379
1359
  "endCaptures": {
1380
1360
  "1": {
1381
- "name": "punctuation.definition.record.ocaml"
1361
+ "name": "punctuation.definition.tuple.ocaml"
1382
1362
  }
1383
- },
1363
+ }
1364
+ },
1365
+ {
1384
1366
  "name": "variable.parameter.record.ocaml",
1367
+ "begin": "(\\{)",
1368
+ "end": "(\\})",
1385
1369
  "patterns": [
1386
1370
  {
1387
1371
  "include": "#moduleref"
1388
1372
  },
1389
1373
  {
1374
+ "name": "meta.recordfield.match.ocaml",
1390
1375
  "begin": "\\b([a-z][a-zA-Z0-9'_]*)\\s*(=)",
1376
+ "end": "(;)|(?=\\})",
1377
+ "patterns": [
1378
+ {
1379
+ "include": "#matchpatterns"
1380
+ }
1381
+ ],
1391
1382
  "beginCaptures": {
1392
1383
  "1": {
1393
1384
  "name": "entity.name.tag.record.ocaml"
@@ -1396,31 +1387,32 @@
1396
1387
  "name": "punctuation.separator.record.field-assignment.ocaml"
1397
1388
  }
1398
1389
  },
1399
- "end": "(;)|(?=\\})",
1400
1390
  "endCaptures": {
1401
1391
  "1": {
1402
1392
  "name": "punctuation.separator.record.ocaml"
1403
1393
  }
1404
- },
1405
- "name": "meta.recordfield.match.ocaml",
1406
- "patterns": [
1407
- {
1408
- "include": "#matchpatterns"
1409
- }
1410
- ]
1394
+ }
1411
1395
  }
1412
- ]
1396
+ ],
1397
+ "beginCaptures": {
1398
+ "1": {
1399
+ "name": "punctuation.definition.record.ocaml"
1400
+ }
1401
+ },
1402
+ "endCaptures": {
1403
+ "1": {
1404
+ "name": "punctuation.definition.record.ocaml"
1405
+ }
1406
+ }
1413
1407
  },
1414
1408
  {
1415
1409
  "include": "#storagetypes"
1416
1410
  },
1417
1411
  {
1418
- "match": "\\b[a-z_][a-zA-Z0-9'_]*",
1419
- "name": "variable.parameter.ocaml"
1412
+ "name": "variable.parameter.ocaml",
1413
+ "match": "\\b[a-z_][a-zA-Z0-9'_]*"
1420
1414
  }
1421
1415
  ]
1422
1416
  }
1423
- },
1424
- "scopeName": "source.ocaml",
1425
- "uuid": "F816FA69-6EE8-11D9-BF2D-000D93589AF6"
1426
- }
1417
+ }
1418
+ }