github-linguist-grammars 4.6.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (335) hide show
  1. checksums.yaml +7 -0
  2. data/grammars/file.lasso.json +713 -0
  3. data/grammars/module.ceylon.json +54 -0
  4. data/grammars/objdump.x86asm.json +73 -0
  5. data/grammars/source.Inform7.json +45 -0
  6. data/grammars/source.Kotlin.json +774 -0
  7. data/grammars/source.LS.json +104 -0
  8. data/grammars/source.MCPOST.json +68 -0
  9. data/grammars/source.MOD.json +70 -0
  10. data/grammars/source.abap.json +176 -0
  11. data/grammars/source.abl.json +138 -0
  12. data/grammars/source.actionscript.3.json +1571 -0
  13. data/grammars/source.acucobol.json +16 -0
  14. data/grammars/source.ada.json +140 -0
  15. data/grammars/source.agda.json +254 -0
  16. data/grammars/source.ahk.json +171 -0
  17. data/grammars/source.alloy.json +44 -0
  18. data/grammars/source.ampl.json +157 -0
  19. data/grammars/source.antlr.json +300 -0
  20. data/grammars/source.apache-config.json +352 -0
  21. data/grammars/source.apache-config.mod_perl.json +70 -0
  22. data/grammars/source.apl.json +442 -0
  23. data/grammars/source.applescript.json +1385 -0
  24. data/grammars/source.apt.json +25 -0
  25. data/grammars/source.asm.x86.json +182 -0
  26. data/grammars/source.asp.json +157 -0
  27. data/grammars/source.aspectj.json +963 -0
  28. data/grammars/source.ats.json +170 -0
  29. data/grammars/source.autoit.3.json +132 -0
  30. data/grammars/source.awk.json +388 -0
  31. data/grammars/source.befunge.json +38 -0
  32. data/grammars/source.bf.json +36 -0
  33. data/grammars/source.bison.json +59 -0
  34. data/grammars/source.blitzmax.json +912 -0
  35. data/grammars/source.boo.json +452 -0
  36. data/grammars/source.brightauthorproject.json +29 -0
  37. data/grammars/source.brightscript.json +158 -0
  38. data/grammars/source.bro.json +409 -0
  39. data/grammars/source.bsv.json +283 -0
  40. data/grammars/source.c++.json +364 -0
  41. data/grammars/source.c++.qt.json +37 -0
  42. data/grammars/source.c.ec.json +39 -0
  43. data/grammars/source.c.json +727 -0
  44. data/grammars/source.c.platform.json +154 -0
  45. data/grammars/source.cache.cmake.json +75 -0
  46. data/grammars/source.cake.json +16 -0
  47. data/grammars/source.camlp4.ocaml.json +63 -0
  48. data/grammars/source.capnp.json +93 -0
  49. data/grammars/source.ceylon.json +77 -0
  50. data/grammars/source.cfscript.cfc.json +170 -0
  51. data/grammars/source.cfscript.json +744 -0
  52. data/grammars/source.chapel.json +240 -0
  53. data/grammars/source.cirru.json +66 -0
  54. data/grammars/source.clarion.json +159 -0
  55. data/grammars/source.clips.json +80 -0
  56. data/grammars/source.clojure.json +397 -0
  57. data/grammars/source.cm.json +54 -0
  58. data/grammars/source.cmake.json +181 -0
  59. data/grammars/source.cobol.json +528 -0
  60. data/grammars/source.coffee.json +678 -0
  61. data/grammars/source.compiled-papyrus.json +11 -0
  62. data/grammars/source.cool.json +103 -0
  63. data/grammars/source.coq.json +62 -0
  64. data/grammars/source.crystal.json +2760 -0
  65. data/grammars/source.cs.json +556 -0
  66. data/grammars/source.css.json +630 -0
  67. data/grammars/source.css.less.json +276 -0
  68. data/grammars/source.css.mss.json +256 -0
  69. data/grammars/source.csx.json +16 -0
  70. data/grammars/source.cuda-c++.json +137 -0
  71. data/grammars/source.cython.json +2108 -0
  72. data/grammars/source.d.json +722 -0
  73. data/grammars/source.dart.json +763 -0
  74. data/grammars/source.desktop.json +90 -0
  75. data/grammars/source.diff.json +162 -0
  76. data/grammars/source.dockerfile.json +89 -0
  77. data/grammars/source.dosbatch.json +70 -0
  78. data/grammars/source.dot.json +126 -0
  79. data/grammars/source.dylan.json +217 -0
  80. data/grammars/source.eiffel.json +138 -0
  81. data/grammars/source.elixir.json +737 -0
  82. data/grammars/source.elm.json +355 -0
  83. data/grammars/source.erazor.json +126 -0
  84. data/grammars/source.erlang.json +1674 -0
  85. data/grammars/source.essl.json +50 -0
  86. data/grammars/source.factor.json +260 -0
  87. data/grammars/source.fan.json +188 -0
  88. data/grammars/source.fancy.json +270 -0
  89. data/grammars/source.fish.json +214 -0
  90. data/grammars/source.forth.json +101 -0
  91. data/grammars/source.fortran.json +499 -0
  92. data/grammars/source.fortran.modern.json +226 -0
  93. data/grammars/source.fsharp.json +403 -0
  94. data/grammars/source.gap.json +167 -0
  95. data/grammars/source.gcode.json +25 -0
  96. data/grammars/source.gdscript.json +154 -0
  97. data/grammars/source.gfm.json +1270 -0
  98. data/grammars/source.glsl.json +71 -0
  99. data/grammars/source.gnuplot.json +276 -0
  100. data/grammars/source.go.json +552 -0
  101. data/grammars/source.golo.json +182 -0
  102. data/grammars/source.gosu.2.json +163 -0
  103. data/grammars/source.grace.json +679 -0
  104. data/grammars/source.groovy.gradle.json +73 -0
  105. data/grammars/source.groovy.json +1385 -0
  106. data/grammars/source.harbour.json +450 -0
  107. data/grammars/source.haskell.json +449 -0
  108. data/grammars/source.haxe.2.json +1243 -0
  109. data/grammars/source.hss.1.json +464 -0
  110. data/grammars/source.httpspec.json +287 -0
  111. data/grammars/source.hxml.json +26 -0
  112. data/grammars/source.hy.json +270 -0
  113. data/grammars/source.idl-dlm.json +112 -0
  114. data/grammars/source.idl.json +267 -0
  115. data/grammars/source.idris.json +537 -0
  116. data/grammars/source.ini.json +113 -0
  117. data/grammars/source.inno.json +65 -0
  118. data/grammars/source.io.json +164 -0
  119. data/grammars/source.ioke.json +272 -0
  120. data/grammars/source.isabelle.root.json +68 -0
  121. data/grammars/source.isabelle.theory.json +106 -0
  122. data/grammars/source.j.json +49 -0
  123. data/grammars/source.jade.json +1009 -0
  124. data/grammars/source.jasmin.json +299 -0
  125. data/grammars/source.java-properties.json +97 -0
  126. data/grammars/source.java.json +1026 -0
  127. data/grammars/source.jcl.json +49 -0
  128. data/grammars/source.jflex.json +490 -0
  129. data/grammars/source.jq.json +218 -0
  130. data/grammars/source.js.json +948 -0
  131. data/grammars/source.js.jsx.json +2937 -0
  132. data/grammars/source.js.objj.json +424 -0
  133. data/grammars/source.js.regexp.json +150 -0
  134. data/grammars/source.js.regexp.replacement.json +30 -0
  135. data/grammars/source.json.json +149 -0
  136. data/grammars/source.julia.json +407 -0
  137. data/grammars/source.lean.json +145 -0
  138. data/grammars/source.lid.json +23 -0
  139. data/grammars/source.lilypond.json +623 -0
  140. data/grammars/source.lisp.json +111 -0
  141. data/grammars/source.litcoffee.json +669 -0
  142. data/grammars/source.livescript.json +616 -0
  143. data/grammars/source.llvm.json +71 -0
  144. data/grammars/source.logos.json +31 -0
  145. data/grammars/source.logtalk.json +315 -0
  146. data/grammars/source.loomscript.json +214 -0
  147. data/grammars/source.lsl.json +216 -0
  148. data/grammars/source.lua.json +191 -0
  149. data/grammars/source.makefile.json +474 -0
  150. data/grammars/source.makegen.json +13 -0
  151. data/grammars/source.man.json +53 -0
  152. data/grammars/source.mask.json +701 -0
  153. data/grammars/source.mata.json +133 -0
  154. data/grammars/source.mathematica.json +429 -0
  155. data/grammars/source.matlab.json +776 -0
  156. data/grammars/source.mercury.json +251 -0
  157. data/grammars/source.ml.json +291 -0
  158. data/grammars/source.modelica.json +142 -0
  159. data/grammars/source.modula2.json +103 -0
  160. data/grammars/source.monkey.json +701 -0
  161. data/grammars/source.moonscript.json +149 -0
  162. data/grammars/source.mupad.json +149 -0
  163. data/grammars/source.nant-build.json +86 -0
  164. data/grammars/source.ncl.json +66 -0
  165. data/grammars/source.nemerle.json +137 -0
  166. data/grammars/source.nesc.json +27 -0
  167. data/grammars/source.netlinx.erb.json +47 -0
  168. data/grammars/source.netlinx.json +768 -0
  169. data/grammars/source.nginx.json +797 -0
  170. data/grammars/source.nim.json +1150 -0
  171. data/grammars/source.nim_filter.json +133 -0
  172. data/grammars/source.nimcfg.json +116 -0
  173. data/grammars/source.ninja.json +66 -0
  174. data/grammars/source.nit.json +238 -0
  175. data/grammars/source.nix.json +1200 -0
  176. data/grammars/source.nmml.json +87 -0
  177. data/grammars/source.nsis.json +150 -0
  178. data/grammars/source.objc++.json +19 -0
  179. data/grammars/source.objc.json +918 -0
  180. data/grammars/source.objc.platform.json +277 -0
  181. data/grammars/source.ocaml.json +1426 -0
  182. data/grammars/source.ocamllex.json +305 -0
  183. data/grammars/source.ocamlyacc.json +346 -0
  184. data/grammars/source.octave.json +451 -0
  185. data/grammars/source.ooc.json +692 -0
  186. data/grammars/source.opa.json +206 -0
  187. data/grammars/source.opal.json +415 -0
  188. data/grammars/source.opalsysdefs.json +70 -0
  189. data/grammars/source.opencobol.json +65 -0
  190. data/grammars/source.ox.json +97 -0
  191. data/grammars/source.oz.json +84 -0
  192. data/grammars/source.papyrus-assembly.json +266 -0
  193. data/grammars/source.papyrus.json +231 -0
  194. data/grammars/source.parrot.pir.json +117 -0
  195. data/grammars/source.pascal.json +150 -0
  196. data/grammars/source.perl.6.json +310 -0
  197. data/grammars/source.perl.json +2413 -0
  198. data/grammars/source.php.zephir.json +362 -0
  199. data/grammars/source.pig_latin.json +172 -0
  200. data/grammars/source.pike.json +62 -0
  201. data/grammars/source.plsql.oracle.json +642 -0
  202. data/grammars/source.po.json +232 -0
  203. data/grammars/source.pogoscript.json +85 -0
  204. data/grammars/source.postscript.json +231 -0
  205. data/grammars/source.powershell.json +755 -0
  206. data/grammars/source.processing.json +885 -0
  207. data/grammars/source.prolog.eclipse.json +206 -0
  208. data/grammars/source.prolog.json +292 -0
  209. data/grammars/source.protobuf.json +395 -0
  210. data/grammars/source.pubspec.json +13 -0
  211. data/grammars/source.puppet.json +494 -0
  212. data/grammars/source.purescript.json +818 -0
  213. data/grammars/source.pyjade.json +1010 -0
  214. data/grammars/source.python.django.json +34 -0
  215. data/grammars/source.python.json +1960 -0
  216. data/grammars/source.python.salt.json +13 -0
  217. data/grammars/source.qmake.json +217 -0
  218. data/grammars/source.qml.json +195 -0
  219. data/grammars/source.r.json +203 -0
  220. data/grammars/source.racket.json +119 -0
  221. data/grammars/source.rebol.json +647 -0
  222. data/grammars/source.red.json +652 -0
  223. data/grammars/source.regexp.babel.json +190 -0
  224. data/grammars/source.regexp.python.json +187 -0
  225. data/grammars/source.regexp.spin.json +188 -0
  226. data/grammars/source.ruby.json +1956 -0
  227. data/grammars/source.ruby.rspec.cucumber.steps.json +274 -0
  228. data/grammars/source.rust.json +269 -0
  229. data/grammars/source.sas.json +322 -0
  230. data/grammars/source.sas_log.json +26 -0
  231. data/grammars/source.sass.json +248 -0
  232. data/grammars/source.sbt.json +36 -0
  233. data/grammars/source.scad.json +152 -0
  234. data/grammars/source.scala.json +739 -0
  235. data/grammars/source.scaml.json +466 -0
  236. data/grammars/source.scheme.json +370 -0
  237. data/grammars/source.scilab.json +103 -0
  238. data/grammars/source.scss.json +1321 -0
  239. data/grammars/source.shell.json +1212 -0
  240. data/grammars/source.smali.json +1668 -0
  241. data/grammars/source.smalltalk.json +135 -0
  242. data/grammars/source.smt.json +173 -0
  243. data/grammars/source.sp.json +118 -0
  244. data/grammars/source.sparql.json +23 -0
  245. data/grammars/source.spin.json +936 -0
  246. data/grammars/source.sqf.json +112 -0
  247. data/grammars/source.sql.json +473 -0
  248. data/grammars/source.stata.json +208 -0
  249. data/grammars/source.strings.json +53 -0
  250. data/grammars/source.stylus.json +1021 -0
  251. data/grammars/source.swift.json +965 -0
  252. data/grammars/source.systemverilog.json +1050 -0
  253. data/grammars/source.tcl.json +277 -0
  254. data/grammars/source.tea.json +180 -0
  255. data/grammars/source.thrift.json +704 -0
  256. data/grammars/source.toml.json +327 -0
  257. data/grammars/source.ts.json +1094 -0
  258. data/grammars/source.tsx.json +1324 -0
  259. data/grammars/source.turtle.json +505 -0
  260. data/grammars/source.txl.json +62 -0
  261. data/grammars/source.ucfconstraints.json +72 -0
  262. data/grammars/source.vala.json +814 -0
  263. data/grammars/source.varnish.vcl.json +343 -0
  264. data/grammars/source.vbnet.json +338 -0
  265. data/grammars/source.verilog.json +302 -0
  266. data/grammars/source.vhdl.json +1349 -0
  267. data/grammars/source.viml.json +224 -0
  268. data/grammars/source.webidl.json +814 -0
  269. data/grammars/source.x10.json +68 -0
  270. data/grammars/source.x86asm.json +47 -0
  271. data/grammars/source.xc.json +379 -0
  272. data/grammars/source.xq.json +241 -0
  273. data/grammars/source.xquery.json +193 -0
  274. data/grammars/source.xtend.json +733 -0
  275. data/grammars/source.yaml.json +334 -0
  276. data/grammars/source.yaml.salt.json +348 -0
  277. data/grammars/text.bibtex.json +251 -0
  278. data/grammars/text.cfml.basic.json +736 -0
  279. data/grammars/text.dart-analysis-output.json +162 -0
  280. data/grammars/text.dart-doccomments.json +19 -0
  281. data/grammars/text.elixir.json +45 -0
  282. data/grammars/text.gherkin.feature.json +135 -0
  283. data/grammars/text.groff.json +113 -0
  284. data/grammars/text.haml.json +299 -0
  285. data/grammars/text.html.abl.json +24 -0
  286. data/grammars/text.html.asciidoc.json +492 -0
  287. data/grammars/text.html.asdoc.json +541 -0
  288. data/grammars/text.html.asp.json +58 -0
  289. data/grammars/text.html.basic.json +552 -0
  290. data/grammars/text.html.cfm.json +811 -0
  291. data/grammars/text.html.creole.json +329 -0
  292. data/grammars/text.html.django.json +69 -0
  293. data/grammars/text.html.elixir.json +18 -0
  294. data/grammars/text.html.erb.json +157 -0
  295. data/grammars/text.html.erlang.yaws.json +72 -0
  296. data/grammars/text.html.factor.json +27 -0
  297. data/grammars/text.html.handlebars.json +783 -0
  298. data/grammars/text.html.jsp.json +1203 -0
  299. data/grammars/text.html.liquid.json +35 -0
  300. data/grammars/text.html.mako.json +729 -0
  301. data/grammars/text.html.markdown.source.gfm.apib.json +1297 -0
  302. data/grammars/text.html.markdown.source.gfm.mson.json +1165 -0
  303. data/grammars/text.html.mediawiki.json +972 -0
  304. data/grammars/text.html.php.json +2607 -0
  305. data/grammars/text.html.slash.json +313 -0
  306. data/grammars/text.html.smarty.json +216 -0
  307. data/grammars/text.html.ssp.json +49 -0
  308. data/grammars/text.html.tcl.json +44 -0
  309. data/grammars/text.html.twig.json +1353 -0
  310. data/grammars/text.html.vue.json +642 -0
  311. data/grammars/text.idl-idldoc.json +14 -0
  312. data/grammars/text.junit-test-report.json +92 -0
  313. data/grammars/text.log.latex.json +86 -0
  314. data/grammars/text.python.console.json +25 -0
  315. data/grammars/text.python.traceback.json +46 -0
  316. data/grammars/text.rdoc.json +48 -0
  317. data/grammars/text.restructuredtext.json +561 -0
  318. data/grammars/text.robot.json +73 -0
  319. data/grammars/text.shell-session.json +48 -0
  320. data/grammars/text.slim.json +527 -0
  321. data/grammars/text.tex.json +271 -0
  322. data/grammars/text.tex.latex.beamer.json +63 -0
  323. data/grammars/text.tex.latex.haskell.json +56 -0
  324. data/grammars/text.tex.latex.json +1013 -0
  325. data/grammars/text.tex.latex.memoir.json +99 -0
  326. data/grammars/text.tex.latex.rd.json +117 -0
  327. data/grammars/text.xml.ant.json +202 -0
  328. data/grammars/text.xml.flex-config.json +2634 -0
  329. data/grammars/text.xml.genshi.json +34 -0
  330. data/grammars/text.xml.json +364 -0
  331. data/grammars/text.xml.pom.json +774 -0
  332. data/grammars/text.xml.xsl.json +94 -0
  333. data/grammars/text.zone_file.json +72 -0
  334. data/lib/linguist/grammars.rb +13 -0
  335. metadata +389 -0
@@ -0,0 +1,1956 @@
1
+ {
2
+ "comment": "\n\tTODO: unresolved issues\n\n\ttext:\n\t\"p << end\n\tprint me!\n\tend\"\n\tsymptoms:\n\tnot recognized as a heredoc\n\tsolution:\n\tthere is no way to distinguish perfectly between the << operator and the start\n\tof a heredoc. Currently, we require assignment to recognize a heredoc. More\n\trefinement is possible.\n\t• Heredocs with indented terminators (<<-) are always distinguishable, however.\n\t• Nested heredocs are not really supportable at present\n\n\ttext:\n\tprint <<-'THERE' \n\tThis is single quoted. \n\tThe above used #{Time.now} \n\tTHERE \n\tsymtoms:\n\tFrom Programming Ruby p306; should be a non-interpolated heredoc.\n\t\n\ttext:\n\t\"a\\332a\"\n\tsymptoms:\n\t'\\332' is not recognized as slash3.. which should be octal 332.\n\tsolution:\n\tplain regexp.. should be easy.\n\n text:\n val?(a):p(b)\n val?'a':'b'\n symptoms:\n ':p' is recognized as a symbol.. its 2 things ':' and 'p'.\n :'b' has same problem.\n solution:\n ternary operator rule, precedence stuff, symbol rule.\n but also consider 'a.b?(:c)' ??\n",
3
+ "fileTypes": [
4
+ "rb",
5
+ "rbx",
6
+ "rjs",
7
+ "Rakefile",
8
+ "rake",
9
+ "cgi",
10
+ "fcgi",
11
+ "gemspec",
12
+ "irbrc",
13
+ "capfile",
14
+ "ru",
15
+ "prawn",
16
+ "Gemfile",
17
+ "Guardfile",
18
+ "Vagrantfile",
19
+ "Appraisals",
20
+ "Rantfile",
21
+ "Berksfile",
22
+ "Berksfile.lock",
23
+ "Thorfile"
24
+ ],
25
+ "firstLineMatch": "^#!/.*\\bruby",
26
+ "keyEquivalent": "^~R",
27
+ "name": "Ruby",
28
+ "patterns": [
29
+ {
30
+ "captures": {
31
+ "1": {
32
+ "name": "keyword.control.class.ruby"
33
+ },
34
+ "2": {
35
+ "name": "entity.name.type.class.ruby"
36
+ },
37
+ "4": {
38
+ "name": "entity.other.inherited-class.ruby"
39
+ },
40
+ "5": {
41
+ "name": "punctuation.separator.inheritance.ruby"
42
+ },
43
+ "6": {
44
+ "name": "variable.other.object.ruby"
45
+ },
46
+ "7": {
47
+ "name": "punctuation.definition.variable.ruby"
48
+ }
49
+ },
50
+ "match": "^\\s*(class)\\s+(([.a-zA-Z0-9_:]+(\\s*(<)\\s*[.a-zA-Z0-9_:]+)?)|((<<)\\s*[.a-zA-Z0-9_:]+))",
51
+ "name": "meta.class.ruby"
52
+ },
53
+ {
54
+ "captures": {
55
+ "1": {
56
+ "name": "keyword.control.module.ruby"
57
+ },
58
+ "2": {
59
+ "name": "entity.name.type.module.ruby"
60
+ },
61
+ "3": {
62
+ "name": "entity.other.inherited-class.module.first.ruby"
63
+ },
64
+ "4": {
65
+ "name": "punctuation.separator.inheritance.ruby"
66
+ },
67
+ "5": {
68
+ "name": "entity.other.inherited-class.module.second.ruby"
69
+ },
70
+ "6": {
71
+ "name": "punctuation.separator.inheritance.ruby"
72
+ },
73
+ "7": {
74
+ "name": "entity.other.inherited-class.module.third.ruby"
75
+ },
76
+ "8": {
77
+ "name": "punctuation.separator.inheritance.ruby"
78
+ }
79
+ },
80
+ "match": "^\\s*(module)\\s+(([A-Z]\\w*(::))?([A-Z]\\w*(::))?([A-Z]\\w*(::))*[A-Z]\\w*)",
81
+ "name": "meta.module.ruby"
82
+ },
83
+ {
84
+ "comment": "else if is a common mistake carried over from other languages. it works if you put in a second end, but it’s never what you want.",
85
+ "match": "(?<!\\.)\\belse(\\s)+if\\b",
86
+ "name": "invalid.deprecated.ruby"
87
+ },
88
+ {
89
+ "captures": {
90
+ "1": {
91
+ "name": "punctuation.definition.constant.ruby"
92
+ }
93
+ },
94
+ "comment": "symbols as hash key (1.9 syntax)",
95
+ "match": "(?>[a-zA-Z_]\\w*(?>[?!])?)(:)(?!:)",
96
+ "name": "constant.other.symbol.hashkey.ruby"
97
+ },
98
+ {
99
+ "captures": {
100
+ "1": {
101
+ "name": "punctuation.definition.constant.ruby"
102
+ }
103
+ },
104
+ "comment": "symbols as hash key (1.8 syntax)",
105
+ "match": "(?<!:)(:)(?>[a-zA-Z_]\\w*(?>[?!])?)(?=\\s*=>)",
106
+ "name": "constant.other.symbol.hashkey.ruby"
107
+ },
108
+ {
109
+ "comment": "everything being a reserved word, not a value and needing a 'end' is a..",
110
+ "match": "(?<!\\.)\\b(BEGIN|begin|case|class|else|elsif|END|end|ensure|for|if|in|module|rescue|then|unless|until|when|while)\\b(?![?!])",
111
+ "name": "keyword.control.ruby"
112
+ },
113
+ {
114
+ "comment": "contextual smart pair support for block parameters",
115
+ "match": "(?<!\\.)\\bdo\\b\\s*",
116
+ "name": "keyword.control.start-block.ruby"
117
+ },
118
+ {
119
+ "comment": "contextual smart pair support",
120
+ "match": "(?<=\\{)(\\s+)",
121
+ "name": "meta.syntax.ruby.start-block"
122
+ },
123
+ {
124
+ "comment": " as above, just doesn't need a 'end' and does a logic operation",
125
+ "match": "(?<!\\.)\\b(and|not|or)\\b",
126
+ "name": "keyword.operator.logical.ruby"
127
+ },
128
+ {
129
+ "comment": " just as above but being not a logical operation",
130
+ "match": "(?<!\\.)\\b(alias|alias_method|break|next|redo|retry|return|super|undef|yield)\\b(?![?!])|\\bdefined\\?|\\bblock_given\\?",
131
+ "name": "keyword.control.pseudo-method.ruby"
132
+ },
133
+ {
134
+ "match": "\\b(nil|true|false)\\b(?![?!])",
135
+ "name": "constant.language.ruby"
136
+ },
137
+ {
138
+ "match": "\\b(__(FILE|LINE)__|self)\\b(?![?!])",
139
+ "name": "variable.language.ruby"
140
+ },
141
+ {
142
+ "comment": " everything being a method but having a special function is a..",
143
+ "match": "\\b(initialize|new|loop|include|extend|prepend|raise|attr_reader|attr_writer|attr_accessor|attr|catch|throw|private|module_function|public|protected)\\b(?![?!])",
144
+ "name": "keyword.other.special-method.ruby"
145
+ },
146
+ {
147
+ "begin": "\\b(require|require_relative|gem)\\b",
148
+ "captures": {
149
+ "1": {
150
+ "name": "keyword.other.special-method.ruby"
151
+ }
152
+ },
153
+ "end": "$|(?=#|\\})",
154
+ "name": "meta.require.ruby",
155
+ "patterns": [
156
+ {
157
+ "include": "$self"
158
+ }
159
+ ]
160
+ },
161
+ {
162
+ "captures": {
163
+ "1": {
164
+ "name": "punctuation.definition.variable.ruby"
165
+ }
166
+ },
167
+ "match": "(@)[a-zA-Z_]\\w*",
168
+ "name": "variable.other.readwrite.instance.ruby"
169
+ },
170
+ {
171
+ "captures": {
172
+ "1": {
173
+ "name": "punctuation.definition.variable.ruby"
174
+ }
175
+ },
176
+ "match": "(@@)[a-zA-Z_]\\w*",
177
+ "name": "variable.other.readwrite.class.ruby"
178
+ },
179
+ {
180
+ "captures": {
181
+ "1": {
182
+ "name": "punctuation.definition.variable.ruby"
183
+ }
184
+ },
185
+ "match": "(\\$)[a-zA-Z_]\\w*",
186
+ "name": "variable.other.readwrite.global.ruby"
187
+ },
188
+ {
189
+ "captures": {
190
+ "1": {
191
+ "name": "punctuation.definition.variable.ruby"
192
+ }
193
+ },
194
+ "match": "(\\$)(!|@|&|`|'|\\+|\\d+|~|=|/|\\\\|,|;|\\.|<|>|_|\\*|\\$|\\?|:|\"|-[0adFiIlpv])",
195
+ "name": "variable.other.readwrite.global.pre-defined.ruby"
196
+ },
197
+ {
198
+ "begin": "\\b(ENV)\\[",
199
+ "beginCaptures": {
200
+ "1": {
201
+ "name": "variable.other.constant.ruby"
202
+ }
203
+ },
204
+ "end": "\\]",
205
+ "name": "meta.environment-variable.ruby",
206
+ "patterns": [
207
+ {
208
+ "include": "$self"
209
+ }
210
+ ]
211
+ },
212
+ {
213
+ "match": "\\b[A-Z]\\w*(?=((\\.|::)[A-Za-z]|\\[))",
214
+ "name": "support.class.ruby"
215
+ },
216
+ {
217
+ "match": "\\b[A-Z]\\w*\\b",
218
+ "name": "variable.other.constant.ruby"
219
+ },
220
+ {
221
+ "begin": "(?x)\n\t\t\t (?=def\\b) # an optimization to help Oniguruma fail fast\n\t\t\t (?<=^|\\s)(def)\\s+ # the def keyword\n\t\t\t ( (?>[a-zA-Z_]\\w*(?>\\.|::))? # a method name prefix\n\t\t\t (?>[a-zA-Z_]\\w*(?>[?!]|=(?!>))? # the method name\n\t\t\t |===?|>[>=]?|<=>|<[<=]?|[%&`/\\|]|\\*\\*?|=?~|[-+]@?|\\[\\]=?) ) # …or an operator method\n\t\t\t \\s*(\\() # the openning parenthesis for arguments\n\t\t\t ",
222
+ "beginCaptures": {
223
+ "1": {
224
+ "name": "keyword.control.def.ruby"
225
+ },
226
+ "2": {
227
+ "name": "entity.name.function.ruby"
228
+ },
229
+ "3": {
230
+ "name": "punctuation.definition.parameters.ruby"
231
+ }
232
+ },
233
+ "comment": "the method pattern comes from the symbol pattern, see there for a explaination",
234
+ "end": "\\)",
235
+ "endCaptures": {
236
+ "0": {
237
+ "name": "punctuation.definition.parameters.ruby"
238
+ }
239
+ },
240
+ "name": "meta.function.method.with-arguments.ruby",
241
+ "patterns": [
242
+ {
243
+ "begin": "(?![\\s,)])",
244
+ "end": "(?=[,)])",
245
+ "patterns": [
246
+ {
247
+ "captures": {
248
+ "1": {
249
+ "name": "storage.type.variable.ruby"
250
+ },
251
+ "2": {
252
+ "name": "variable.parameter.function.ruby"
253
+ }
254
+ },
255
+ "match": "\\G([&*]?)([_a-zA-Z][_a-zA-Z0-9]*)"
256
+ },
257
+ {
258
+ "include": "$self"
259
+ }
260
+ ]
261
+ }
262
+ ]
263
+ },
264
+ {
265
+ "begin": "(?x)\n\t\t\t (?=def\\b) # an optimization to help Oniguruma fail fast\n\t\t\t (?<=^|\\s)(def)\\s+ # the def keyword\n\t\t\t ( (?>[a-zA-Z_]\\w*(?>\\.|::))? # a method name prefix\n\t\t\t (?>[a-zA-Z_]\\w*(?>[?!]|=(?!>))? # the method name\n\t\t\t |===?|>[>=]?|<=>|<[<=]?|[%&`/\\|]|\\*\\*?|=?~|[-+]@?|\\[\\]=?) ) # …or an operator method\n\t\t\t [ \\t] # the space separating the arguments\n\t\t\t (?=[ \\t]*[^\\s#;]) # make sure arguments and not a comment follow\n\t\t\t ",
266
+ "beginCaptures": {
267
+ "1": {
268
+ "name": "keyword.control.def.ruby"
269
+ },
270
+ "2": {
271
+ "name": "entity.name.function.ruby"
272
+ }
273
+ },
274
+ "comment": "same as the previous rule, but without parentheses around the arguments",
275
+ "end": "$",
276
+ "name": "meta.function.method.with-arguments.ruby",
277
+ "patterns": [
278
+ {
279
+ "begin": "(?![\\s,])",
280
+ "end": "(?=,|$)",
281
+ "patterns": [
282
+ {
283
+ "captures": {
284
+ "1": {
285
+ "name": "punctuation.definition.variable.ruby"
286
+ }
287
+ },
288
+ "match": "\\G([&*]?)[_a-zA-Z][_a-zA-Z0-9]*",
289
+ "name": "variable.parameter.function.ruby"
290
+ },
291
+ {
292
+ "include": "$self"
293
+ }
294
+ ]
295
+ }
296
+ ]
297
+ },
298
+ {
299
+ "captures": {
300
+ "1": {
301
+ "name": "keyword.control.def.ruby"
302
+ },
303
+ "3": {
304
+ "name": "entity.name.function.ruby"
305
+ }
306
+ },
307
+ "comment": " the optional name is just to catch the def also without a method-name",
308
+ "match": "(?x)\n\t\t\t (?=def\\b) # an optimization to help Oniguruma fail fast\n\t\t\t (?<=^|\\s)(def)\\b # the def keyword\n\t\t\t ( \\s+ # an optional group of whitespace followed by…\n\t\t\t ( (?>[a-zA-Z_]\\w*(?>\\.|::))? # a method name prefix\n\t\t\t (?>[a-zA-Z_]\\w*(?>[?!]|=(?!>))? # the method name\n\t\t\t |===?|>[>=]?|<=>|<[<=]?|[%&`/\\|]|\\*\\*?|=?~|[-+]@?|\\[\\]=?) ) )? # …or an operator method\n\t\t\t ",
309
+ "name": "meta.function.method.without-arguments.ruby"
310
+ },
311
+ {
312
+ "match": "\\b\\d(?>_?\\d)*(?=\\.\\d|[eE])(\\.\\d(?>_?\\d)*)?([eE][-+]?\\d(?>_?\\d)*)?r?i?\\b",
313
+ "name": "constant.numeric.float.ruby"
314
+ },
315
+ {
316
+ "match": "\\b(0[dD]\\d|[1-9])(?>_?\\d)*r?i?\\b",
317
+ "name": "constant.numeric.integer.ruby"
318
+ },
319
+ {
320
+ "match": "\\b0[xX]\\h(?>_?\\h)*r?i?\\b",
321
+ "name": "constant.numeric.hex.ruby"
322
+ },
323
+ {
324
+ "match": "\\b0[bB][01](?>_?[01])*r?i?\\b",
325
+ "name": "constant.numeric.binary.ruby"
326
+ },
327
+ {
328
+ "match": "\\b0([oO]?[0-7](?>_?[0-7])*)?r?i?\\b",
329
+ "name": "constant.numeric.octal.ruby"
330
+ },
331
+ {
332
+ "begin": ":'",
333
+ "captures": {
334
+ "0": {
335
+ "name": "punctuation.definition.constant.ruby"
336
+ }
337
+ },
338
+ "end": "'",
339
+ "name": "constant.other.symbol.single-quoted.ruby",
340
+ "patterns": [
341
+ {
342
+ "match": "\\\\['\\\\]",
343
+ "name": "constant.character.escape.ruby"
344
+ }
345
+ ]
346
+ },
347
+ {
348
+ "begin": ":\"",
349
+ "captures": {
350
+ "0": {
351
+ "name": "punctuation.definition.constant.ruby"
352
+ }
353
+ },
354
+ "end": "\"",
355
+ "name": "constant.other.symbol.double-quoted.ruby",
356
+ "patterns": [
357
+ {
358
+ "include": "#interpolated_ruby"
359
+ },
360
+ {
361
+ "include": "#escaped_char"
362
+ }
363
+ ]
364
+ },
365
+ {
366
+ "begin": "'",
367
+ "beginCaptures": {
368
+ "0": {
369
+ "name": "punctuation.definition.string.begin.ruby"
370
+ }
371
+ },
372
+ "comment": "single quoted string (does not allow interpolation)",
373
+ "end": "'",
374
+ "endCaptures": {
375
+ "0": {
376
+ "name": "punctuation.definition.string.end.ruby"
377
+ }
378
+ },
379
+ "name": "string.quoted.single.ruby",
380
+ "patterns": [
381
+ {
382
+ "match": "\\\\'|\\\\\\\\",
383
+ "name": "constant.character.escape.ruby"
384
+ }
385
+ ]
386
+ },
387
+ {
388
+ "begin": "\"",
389
+ "beginCaptures": {
390
+ "0": {
391
+ "name": "punctuation.definition.string.begin.ruby"
392
+ }
393
+ },
394
+ "comment": "double quoted string (allows for interpolation)",
395
+ "end": "\"",
396
+ "endCaptures": {
397
+ "0": {
398
+ "name": "punctuation.definition.string.end.ruby"
399
+ }
400
+ },
401
+ "name": "string.quoted.double.ruby",
402
+ "patterns": [
403
+ {
404
+ "include": "#interpolated_ruby"
405
+ },
406
+ {
407
+ "include": "#escaped_char"
408
+ }
409
+ ]
410
+ },
411
+ {
412
+ "begin": "`",
413
+ "beginCaptures": {
414
+ "0": {
415
+ "name": "punctuation.definition.string.begin.ruby"
416
+ }
417
+ },
418
+ "comment": "execute string (allows for interpolation)",
419
+ "end": "`",
420
+ "endCaptures": {
421
+ "0": {
422
+ "name": "punctuation.definition.string.end.ruby"
423
+ }
424
+ },
425
+ "name": "string.interpolated.ruby",
426
+ "patterns": [
427
+ {
428
+ "include": "#interpolated_ruby"
429
+ },
430
+ {
431
+ "include": "#escaped_char"
432
+ }
433
+ ]
434
+ },
435
+ {
436
+ "begin": "%x\\{",
437
+ "beginCaptures": {
438
+ "0": {
439
+ "name": "punctuation.definition.string.begin.ruby"
440
+ }
441
+ },
442
+ "comment": "execute string (allow for interpolation)",
443
+ "end": "\\}",
444
+ "endCaptures": {
445
+ "0": {
446
+ "name": "punctuation.definition.string.end.ruby"
447
+ }
448
+ },
449
+ "name": "string.interpolated.ruby",
450
+ "patterns": [
451
+ {
452
+ "include": "#interpolated_ruby"
453
+ },
454
+ {
455
+ "include": "#escaped_char"
456
+ },
457
+ {
458
+ "include": "#nest_curly_i"
459
+ }
460
+ ]
461
+ },
462
+ {
463
+ "begin": "%x\\[",
464
+ "beginCaptures": {
465
+ "0": {
466
+ "name": "punctuation.definition.string.begin.ruby"
467
+ }
468
+ },
469
+ "comment": "execute string (allow for interpolation)",
470
+ "end": "\\]",
471
+ "endCaptures": {
472
+ "0": {
473
+ "name": "punctuation.definition.string.end.ruby"
474
+ }
475
+ },
476
+ "name": "string.interpolated.ruby",
477
+ "patterns": [
478
+ {
479
+ "include": "#interpolated_ruby"
480
+ },
481
+ {
482
+ "include": "#escaped_char"
483
+ },
484
+ {
485
+ "include": "#nest_brackets_i"
486
+ }
487
+ ]
488
+ },
489
+ {
490
+ "begin": "%x\\<",
491
+ "beginCaptures": {
492
+ "0": {
493
+ "name": "punctuation.definition.string.begin.ruby"
494
+ }
495
+ },
496
+ "comment": "execute string (allow for interpolation)",
497
+ "end": "\\>",
498
+ "endCaptures": {
499
+ "0": {
500
+ "name": "punctuation.definition.string.end.ruby"
501
+ }
502
+ },
503
+ "name": "string.interpolated.ruby",
504
+ "patterns": [
505
+ {
506
+ "include": "#interpolated_ruby"
507
+ },
508
+ {
509
+ "include": "#escaped_char"
510
+ },
511
+ {
512
+ "include": "#nest_ltgt_i"
513
+ }
514
+ ]
515
+ },
516
+ {
517
+ "begin": "%x\\(",
518
+ "beginCaptures": {
519
+ "0": {
520
+ "name": "punctuation.definition.string.begin.ruby"
521
+ }
522
+ },
523
+ "comment": "execute string (allow for interpolation)",
524
+ "end": "\\)",
525
+ "endCaptures": {
526
+ "0": {
527
+ "name": "punctuation.definition.string.end.ruby"
528
+ }
529
+ },
530
+ "name": "string.interpolated.ruby",
531
+ "patterns": [
532
+ {
533
+ "include": "#interpolated_ruby"
534
+ },
535
+ {
536
+ "include": "#escaped_char"
537
+ },
538
+ {
539
+ "include": "#nest_parens_i"
540
+ }
541
+ ]
542
+ },
543
+ {
544
+ "begin": "%x([\\W_])",
545
+ "beginCaptures": {
546
+ "0": {
547
+ "name": "punctuation.definition.string.begin.ruby"
548
+ }
549
+ },
550
+ "comment": "execute string (allow for interpolation)",
551
+ "end": "\\1",
552
+ "endCaptures": {
553
+ "0": {
554
+ "name": "punctuation.definition.string.end.ruby"
555
+ }
556
+ },
557
+ "name": "string.interpolated.ruby",
558
+ "patterns": [
559
+ {
560
+ "include": "#interpolated_ruby"
561
+ },
562
+ {
563
+ "include": "#escaped_char"
564
+ }
565
+ ]
566
+ },
567
+ {
568
+ "begin": "(?x)\n\t\t\t (?:\n\t\t\t ^ # beginning of line\n\t\t\t | (?<= # or look-behind on:\n\t\t\t [=>~(?:\\[,|&;]\n\t\t\t | [\\s;]if\\s\t\t\t# keywords\n\t\t\t | [\\s;]elsif\\s\n\t\t\t | [\\s;]while\\s\n\t\t\t | [\\s;]unless\\s\n\t\t\t | [\\s;]when\\s\n\t\t\t | [\\s;]assert_match\\s\n\t\t\t | [\\s;]or\\s\t\t\t# boolean opperators\n\t\t\t | [\\s;]and\\s\n\t\t\t | [\\s;]not\\s\n\t\t\t | [\\s.]index\\s\t\t\t# methods\n\t\t\t | [\\s.]scan\\s\n\t\t\t | [\\s.]sub\\s\n\t\t\t | [\\s.]sub!\\s\n\t\t\t | [\\s.]gsub\\s\n\t\t\t | [\\s.]gsub!\\s\n\t\t\t | [\\s.]match\\s\n\t\t\t )\n\t\t\t | (?<= # or a look-behind with line anchor:\n\t\t\t ^when\\s # duplication necessary due to limits of regex\n\t\t\t | ^if\\s\n\t\t\t | ^elsif\\s\n\t\t\t | ^while\\s\n\t\t\t | ^unless\\s\n\t\t\t )\n\t\t\t )\n\t\t\t \\s*((/))(?![*+{}?])\n\t\t\t",
569
+ "captures": {
570
+ "1": {
571
+ "name": "string.regexp.classic.ruby"
572
+ },
573
+ "2": {
574
+ "name": "punctuation.definition.string.ruby"
575
+ }
576
+ },
577
+ "comment": "regular expressions (normal)\n\t\t\twe only start a regexp if the character before it (excluding whitespace)\n\t\t\tis what we think is before a regexp\n\t\t\t",
578
+ "contentName": "string.regexp.classic.ruby",
579
+ "end": "((/[eimnosux]*))",
580
+ "patterns": [
581
+ {
582
+ "include": "#regex_sub"
583
+ }
584
+ ]
585
+ },
586
+ {
587
+ "begin": "%r\\{",
588
+ "beginCaptures": {
589
+ "0": {
590
+ "name": "punctuation.definition.string.begin.ruby"
591
+ }
592
+ },
593
+ "comment": "regular expressions (literal)",
594
+ "end": "\\}[eimnosux]*",
595
+ "endCaptures": {
596
+ "0": {
597
+ "name": "punctuation.definition.string.end.ruby"
598
+ }
599
+ },
600
+ "name": "string.regexp.mod-r.ruby",
601
+ "patterns": [
602
+ {
603
+ "include": "#regex_sub"
604
+ },
605
+ {
606
+ "include": "#nest_curly_r"
607
+ }
608
+ ]
609
+ },
610
+ {
611
+ "begin": "%r\\[",
612
+ "beginCaptures": {
613
+ "0": {
614
+ "name": "punctuation.definition.string.begin.ruby"
615
+ }
616
+ },
617
+ "comment": "regular expressions (literal)",
618
+ "end": "\\][eimnosux]*",
619
+ "endCaptures": {
620
+ "0": {
621
+ "name": "punctuation.definition.string.end.ruby"
622
+ }
623
+ },
624
+ "name": "string.regexp.mod-r.ruby",
625
+ "patterns": [
626
+ {
627
+ "include": "#regex_sub"
628
+ },
629
+ {
630
+ "include": "#nest_brackets_r"
631
+ }
632
+ ]
633
+ },
634
+ {
635
+ "begin": "%r\\(",
636
+ "beginCaptures": {
637
+ "0": {
638
+ "name": "punctuation.definition.string.begin.ruby"
639
+ }
640
+ },
641
+ "comment": "regular expressions (literal)",
642
+ "end": "\\)[eimnosux]*",
643
+ "endCaptures": {
644
+ "0": {
645
+ "name": "punctuation.definition.string.end.ruby"
646
+ }
647
+ },
648
+ "name": "string.regexp.mod-r.ruby",
649
+ "patterns": [
650
+ {
651
+ "include": "#regex_sub"
652
+ },
653
+ {
654
+ "include": "#nest_parens_r"
655
+ }
656
+ ]
657
+ },
658
+ {
659
+ "begin": "%r\\<",
660
+ "beginCaptures": {
661
+ "0": {
662
+ "name": "punctuation.definition.string.begin.ruby"
663
+ }
664
+ },
665
+ "comment": "regular expressions (literal)",
666
+ "end": "\\>[eimnosux]*",
667
+ "endCaptures": {
668
+ "0": {
669
+ "name": "punctuation.definition.string.end.ruby"
670
+ }
671
+ },
672
+ "name": "string.regexp.mod-r.ruby",
673
+ "patterns": [
674
+ {
675
+ "include": "#regex_sub"
676
+ },
677
+ {
678
+ "include": "#nest_ltgt_r"
679
+ }
680
+ ]
681
+ },
682
+ {
683
+ "begin": "%r([\\W_])",
684
+ "beginCaptures": {
685
+ "0": {
686
+ "name": "punctuation.definition.string.begin.ruby"
687
+ }
688
+ },
689
+ "comment": "regular expressions (literal)",
690
+ "end": "\\1[eimnosux]*",
691
+ "endCaptures": {
692
+ "0": {
693
+ "name": "punctuation.definition.string.end.ruby"
694
+ }
695
+ },
696
+ "name": "string.regexp.mod-r.ruby",
697
+ "patterns": [
698
+ {
699
+ "include": "#regex_sub"
700
+ }
701
+ ]
702
+ },
703
+ {
704
+ "begin": "%[QWSR]?\\(",
705
+ "beginCaptures": {
706
+ "0": {
707
+ "name": "punctuation.definition.string.begin.ruby"
708
+ }
709
+ },
710
+ "comment": "literal capable of interpolation ()",
711
+ "end": "\\)",
712
+ "endCaptures": {
713
+ "0": {
714
+ "name": "punctuation.definition.string.end.ruby"
715
+ }
716
+ },
717
+ "name": "string.quoted.other.literal.upper.ruby",
718
+ "patterns": [
719
+ {
720
+ "include": "#interpolated_ruby"
721
+ },
722
+ {
723
+ "include": "#escaped_char"
724
+ },
725
+ {
726
+ "include": "#nest_parens_i"
727
+ }
728
+ ]
729
+ },
730
+ {
731
+ "begin": "%[QWSR]?\\[",
732
+ "beginCaptures": {
733
+ "0": {
734
+ "name": "punctuation.definition.string.begin.ruby"
735
+ }
736
+ },
737
+ "comment": "literal capable of interpolation []",
738
+ "end": "\\]",
739
+ "endCaptures": {
740
+ "0": {
741
+ "name": "punctuation.definition.string.end.ruby"
742
+ }
743
+ },
744
+ "name": "string.quoted.other.literal.upper.ruby",
745
+ "patterns": [
746
+ {
747
+ "include": "#interpolated_ruby"
748
+ },
749
+ {
750
+ "include": "#escaped_char"
751
+ },
752
+ {
753
+ "include": "#nest_brackets_i"
754
+ }
755
+ ]
756
+ },
757
+ {
758
+ "begin": "%[QWSR]?\\<",
759
+ "beginCaptures": {
760
+ "0": {
761
+ "name": "punctuation.definition.string.begin.ruby"
762
+ }
763
+ },
764
+ "comment": "literal capable of interpolation <>",
765
+ "end": "\\>",
766
+ "endCaptures": {
767
+ "0": {
768
+ "name": "punctuation.definition.string.end.ruby"
769
+ }
770
+ },
771
+ "name": "string.quoted.other.literal.upper.ruby",
772
+ "patterns": [
773
+ {
774
+ "include": "#interpolated_ruby"
775
+ },
776
+ {
777
+ "include": "#escaped_char"
778
+ },
779
+ {
780
+ "include": "#nest_ltgt_i"
781
+ }
782
+ ]
783
+ },
784
+ {
785
+ "begin": "%[QWSR]?\\{",
786
+ "beginCaptures": {
787
+ "0": {
788
+ "name": "punctuation.definition.string.begin.ruby"
789
+ }
790
+ },
791
+ "comment": "literal capable of interpolation -- {}",
792
+ "end": "\\}",
793
+ "endCaptures": {
794
+ "0": {
795
+ "name": "punctuation.definition.string.end.ruby"
796
+ }
797
+ },
798
+ "name": "string.quoted.double.ruby.mod",
799
+ "patterns": [
800
+ {
801
+ "include": "#interpolated_ruby"
802
+ },
803
+ {
804
+ "include": "#escaped_char"
805
+ },
806
+ {
807
+ "include": "#nest_curly_i"
808
+ }
809
+ ]
810
+ },
811
+ {
812
+ "begin": "%[QWSR]([\\W_])",
813
+ "beginCaptures": {
814
+ "0": {
815
+ "name": "punctuation.definition.string.begin.ruby"
816
+ }
817
+ },
818
+ "comment": "literal capable of interpolation -- wildcard",
819
+ "end": "\\1",
820
+ "endCaptures": {
821
+ "0": {
822
+ "name": "punctuation.definition.string.end.ruby"
823
+ }
824
+ },
825
+ "name": "string.quoted.other.literal.upper.ruby",
826
+ "patterns": [
827
+ {
828
+ "include": "#interpolated_ruby"
829
+ },
830
+ {
831
+ "include": "#escaped_char"
832
+ }
833
+ ]
834
+ },
835
+ {
836
+ "begin": "%([^\\w\\s=])",
837
+ "beginCaptures": {
838
+ "0": {
839
+ "name": "punctuation.definition.string.begin.ruby"
840
+ }
841
+ },
842
+ "comment": "literal capable of interpolation -- wildcard",
843
+ "end": "\\1",
844
+ "endCaptures": {
845
+ "0": {
846
+ "name": "punctuation.definition.string.end.ruby"
847
+ }
848
+ },
849
+ "name": "string.quoted.other.literal.other.ruby",
850
+ "patterns": [
851
+ {
852
+ "include": "#interpolated_ruby"
853
+ },
854
+ {
855
+ "include": "#escaped_char"
856
+ }
857
+ ]
858
+ },
859
+ {
860
+ "begin": "%[qws]\\(",
861
+ "beginCaptures": {
862
+ "0": {
863
+ "name": "punctuation.definition.string.begin.ruby"
864
+ }
865
+ },
866
+ "comment": "literal incapable of interpolation -- ()",
867
+ "end": "\\)",
868
+ "endCaptures": {
869
+ "0": {
870
+ "name": "punctuation.definition.string.end.ruby"
871
+ }
872
+ },
873
+ "name": "string.quoted.other.literal.lower.ruby",
874
+ "patterns": [
875
+ {
876
+ "match": "\\\\\\)|\\\\\\\\",
877
+ "name": "constant.character.escape.ruby"
878
+ },
879
+ {
880
+ "include": "#nest_parens"
881
+ }
882
+ ]
883
+ },
884
+ {
885
+ "begin": "%[qws]\\<",
886
+ "beginCaptures": {
887
+ "0": {
888
+ "name": "punctuation.definition.string.begin.ruby"
889
+ }
890
+ },
891
+ "comment": "literal incapable of interpolation -- <>",
892
+ "end": "\\>",
893
+ "endCaptures": {
894
+ "0": {
895
+ "name": "punctuation.definition.string.end.ruby"
896
+ }
897
+ },
898
+ "name": "string.quoted.other.literal.lower.ruby",
899
+ "patterns": [
900
+ {
901
+ "match": "\\\\\\>|\\\\\\\\",
902
+ "name": "constant.character.escape.ruby"
903
+ },
904
+ {
905
+ "include": "#nest_ltgt"
906
+ }
907
+ ]
908
+ },
909
+ {
910
+ "begin": "%[qws]\\[",
911
+ "beginCaptures": {
912
+ "0": {
913
+ "name": "punctuation.definition.string.begin.ruby"
914
+ }
915
+ },
916
+ "comment": "literal incapable of interpolation -- []",
917
+ "end": "\\]",
918
+ "endCaptures": {
919
+ "0": {
920
+ "name": "punctuation.definition.string.end.ruby"
921
+ }
922
+ },
923
+ "name": "string.quoted.other.literal.lower.ruby",
924
+ "patterns": [
925
+ {
926
+ "match": "\\\\\\]|\\\\\\\\",
927
+ "name": "constant.character.escape.ruby"
928
+ },
929
+ {
930
+ "include": "#nest_brackets"
931
+ }
932
+ ]
933
+ },
934
+ {
935
+ "begin": "%[qws]\\{",
936
+ "beginCaptures": {
937
+ "0": {
938
+ "name": "punctuation.definition.string.begin.ruby"
939
+ }
940
+ },
941
+ "comment": "literal incapable of interpolation -- {}",
942
+ "end": "\\}",
943
+ "endCaptures": {
944
+ "0": {
945
+ "name": "punctuation.definition.string.end.ruby"
946
+ }
947
+ },
948
+ "name": "string.quoted.other.literal.lower.ruby",
949
+ "patterns": [
950
+ {
951
+ "match": "\\\\\\}|\\\\\\\\",
952
+ "name": "constant.character.escape.ruby"
953
+ },
954
+ {
955
+ "include": "#nest_curly"
956
+ }
957
+ ]
958
+ },
959
+ {
960
+ "begin": "%[qws]([\\W_])",
961
+ "beginCaptures": {
962
+ "0": {
963
+ "name": "punctuation.definition.string.begin.ruby"
964
+ }
965
+ },
966
+ "comment": "literal incapable of interpolation -- wildcard",
967
+ "end": "\\1",
968
+ "endCaptures": {
969
+ "0": {
970
+ "name": "punctuation.definition.string.end.ruby"
971
+ }
972
+ },
973
+ "name": "string.quoted.other.literal.lower.ruby",
974
+ "patterns": [
975
+ {
976
+ "comment": "Cant be named because its not neccesarily an escape.",
977
+ "match": "\\\\."
978
+ }
979
+ ]
980
+ },
981
+ {
982
+ "captures": {
983
+ "1": {
984
+ "name": "punctuation.definition.constant.ruby"
985
+ }
986
+ },
987
+ "comment": "symbols",
988
+ "match": "(?<!:)(:)(?>[a-zA-Z_]\\w*(?>[?!]|=(?![>=]))?|===?|>[>=]?|<[<=]?|<=>|[%&`/\\|]|\\*\\*?|=?~|[-+]@?|\\[\\]=?|@@?[a-zA-Z_]\\w*)",
989
+ "name": "constant.other.symbol.ruby"
990
+ },
991
+ {
992
+ "begin": "^=begin",
993
+ "captures": {
994
+ "0": {
995
+ "name": "punctuation.definition.comment.ruby"
996
+ }
997
+ },
998
+ "comment": "multiline comments",
999
+ "end": "^=end",
1000
+ "name": "comment.block.documentation.ruby"
1001
+ },
1002
+ {
1003
+ "begin": "(^[ \\t]+)?(?=#)",
1004
+ "beginCaptures": {
1005
+ "1": {
1006
+ "name": "punctuation.whitespace.comment.leading.ruby"
1007
+ }
1008
+ },
1009
+ "end": "(?!\\G)",
1010
+ "patterns": [
1011
+ {
1012
+ "begin": "#",
1013
+ "beginCaptures": {
1014
+ "0": {
1015
+ "name": "punctuation.definition.comment.ruby"
1016
+ }
1017
+ },
1018
+ "end": "\\n",
1019
+ "name": "comment.line.number-sign.ruby"
1020
+ }
1021
+ ]
1022
+ },
1023
+ {
1024
+ "comment": "\n\t\t\tmatches questionmark-letters.\n\n\t\t\texamples (1st alternation = hex):\n\t\t\t?\\x1 ?\\x61\n\n\t\t\texamples (2nd alternation = octal):\n\t\t\t?\\0 ?\\07 ?\\017\n\n\t\t\texamples (3rd alternation = escaped):\n\t\t\t?\\n ?\\b\n\n\t\t\texamples (4th alternation = meta-ctrl):\n\t\t\t?\\C-a ?\\M-a ?\\C-\\M-\\C-\\M-a\n\n\t\t\texamples (4th alternation = normal):\n\t\t\t?a ?A ?0 \n\t\t\t?* ?\" ?( \n\t\t\t?. ?#\n\t\t\t\n\t\t\t\n\t\t\tthe negative lookbehind prevents against matching\n\t\t\tp(42.tainted?)\n\t\t\t",
1025
+ "match": "(?<!\\w)\\?(\\\\(x\\h{1,2}(?!\\h)\\b|0[0-7]{0,2}(?![0-7])\\b|[^x0MC])|(\\\\[MC]-)+\\w|[^\\s\\\\])",
1026
+ "name": "constant.numeric.ruby"
1027
+ },
1028
+ {
1029
+ "begin": "^__END__\\n",
1030
+ "captures": {
1031
+ "0": {
1032
+ "name": "string.unquoted.program-block.ruby"
1033
+ }
1034
+ },
1035
+ "comment": "__END__ marker",
1036
+ "contentName": "text.plain",
1037
+ "end": "(?=not)impossible",
1038
+ "patterns": [
1039
+ {
1040
+ "begin": "(?=<?xml|<(?i:html\\b)|!DOCTYPE (?i:html\\b))",
1041
+ "end": "(?=not)impossible",
1042
+ "name": "text.html.embedded.ruby",
1043
+ "patterns": [
1044
+ {
1045
+ "include": "text.html.basic"
1046
+ }
1047
+ ]
1048
+ }
1049
+ ]
1050
+ },
1051
+ {
1052
+ "begin": "(?=(?><<-(\"?)((?:[_\\w]+_|)HTML)\\b\\1))",
1053
+ "comment": "Heredoc with embedded html",
1054
+ "end": "(?!\\G)",
1055
+ "name": "meta.embedded.block.html",
1056
+ "patterns": [
1057
+ {
1058
+ "begin": "(?><<-(\"?)((?:[_\\w]+_|)HTML)\\b\\1)",
1059
+ "beginCaptures": {
1060
+ "0": {
1061
+ "name": "punctuation.definition.string.begin.ruby"
1062
+ }
1063
+ },
1064
+ "contentName": "text.html",
1065
+ "end": "\\s*\\2$\\n?",
1066
+ "endCaptures": {
1067
+ "0": {
1068
+ "name": "punctuation.definition.string.end.ruby"
1069
+ }
1070
+ },
1071
+ "name": "string.unquoted.heredoc.ruby",
1072
+ "patterns": [
1073
+ {
1074
+ "include": "#heredoc"
1075
+ },
1076
+ {
1077
+ "include": "#interpolated_ruby"
1078
+ },
1079
+ {
1080
+ "include": "text.html.basic"
1081
+ },
1082
+ {
1083
+ "include": "#escaped_char"
1084
+ }
1085
+ ]
1086
+ }
1087
+ ]
1088
+ },
1089
+ {
1090
+ "begin": "(?=(?><<-(\"?)((?:[_\\w]+_|)SQL)\\b\\1))",
1091
+ "comment": "Heredoc with embedded sql",
1092
+ "end": "(?!\\G)",
1093
+ "name": "meta.embedded.block.sql",
1094
+ "patterns": [
1095
+ {
1096
+ "begin": "(?><<-(\"?)((?:[_\\w]+_|)SQL)\\b\\1)",
1097
+ "beginCaptures": {
1098
+ "0": {
1099
+ "name": "punctuation.definition.string.begin.ruby"
1100
+ }
1101
+ },
1102
+ "contentName": "source.sql",
1103
+ "end": "\\s*\\2$\\n?",
1104
+ "endCaptures": {
1105
+ "0": {
1106
+ "name": "punctuation.definition.string.end.ruby"
1107
+ }
1108
+ },
1109
+ "name": "string.unquoted.heredoc.ruby",
1110
+ "patterns": [
1111
+ {
1112
+ "include": "#heredoc"
1113
+ },
1114
+ {
1115
+ "include": "#interpolated_ruby"
1116
+ },
1117
+ {
1118
+ "include": "source.sql"
1119
+ },
1120
+ {
1121
+ "include": "#escaped_char"
1122
+ }
1123
+ ]
1124
+ }
1125
+ ]
1126
+ },
1127
+ {
1128
+ "begin": "(?=(?><<-(\"?)((?:[_\\w]+_|)CSS)\\b\\1))",
1129
+ "comment": "Heredoc with embedded css",
1130
+ "end": "(?!\\G)",
1131
+ "name": "meta.embedded.block.css",
1132
+ "patterns": [
1133
+ {
1134
+ "begin": "(?><<-(\"?)((?:[_\\w]+_|)CSS)\\b\\1)",
1135
+ "beginCaptures": {
1136
+ "0": {
1137
+ "name": "punctuation.definition.string.begin.ruby"
1138
+ }
1139
+ },
1140
+ "contentName": "source.css",
1141
+ "end": "\\s*\\2$\\n?",
1142
+ "endCaptures": {
1143
+ "0": {
1144
+ "name": "punctuation.definition.string.end.ruby"
1145
+ }
1146
+ },
1147
+ "name": "string.unquoted.heredoc.ruby",
1148
+ "patterns": [
1149
+ {
1150
+ "include": "#heredoc"
1151
+ },
1152
+ {
1153
+ "include": "#interpolated_ruby"
1154
+ },
1155
+ {
1156
+ "include": "source.css"
1157
+ },
1158
+ {
1159
+ "include": "#escaped_char"
1160
+ }
1161
+ ]
1162
+ }
1163
+ ]
1164
+ },
1165
+ {
1166
+ "begin": "(?=(?><<-(\"?)((?:[_\\w]+_|)CPP)\\b\\1))",
1167
+ "comment": "Heredoc with embedded c++",
1168
+ "end": "(?!\\G)",
1169
+ "name": "meta.embedded.block.c++",
1170
+ "patterns": [
1171
+ {
1172
+ "begin": "(?><<-(\"?)((?:[_\\w]+_|)CPP)\\b\\1)",
1173
+ "beginCaptures": {
1174
+ "0": {
1175
+ "name": "punctuation.definition.string.begin.ruby"
1176
+ }
1177
+ },
1178
+ "contentName": "source.c++",
1179
+ "end": "\\s*\\2$\\n?",
1180
+ "endCaptures": {
1181
+ "0": {
1182
+ "name": "punctuation.definition.string.end.ruby"
1183
+ }
1184
+ },
1185
+ "name": "string.unquoted.heredoc.ruby",
1186
+ "patterns": [
1187
+ {
1188
+ "include": "#heredoc"
1189
+ },
1190
+ {
1191
+ "include": "#interpolated_ruby"
1192
+ },
1193
+ {
1194
+ "include": "source.c++"
1195
+ },
1196
+ {
1197
+ "include": "#escaped_char"
1198
+ }
1199
+ ]
1200
+ }
1201
+ ]
1202
+ },
1203
+ {
1204
+ "begin": "(?=(?><<-(\"?)((?:[_\\w]+_|)C)\\b\\1))",
1205
+ "comment": "Heredoc with embedded c",
1206
+ "end": "(?!\\G)",
1207
+ "name": "meta.embedded.block.c",
1208
+ "patterns": [
1209
+ {
1210
+ "begin": "(?><<-(\"?)((?:[_\\w]+_|)C)\\b\\1)",
1211
+ "beginCaptures": {
1212
+ "0": {
1213
+ "name": "punctuation.definition.string.begin.ruby"
1214
+ }
1215
+ },
1216
+ "contentName": "source.c",
1217
+ "end": "\\s*\\2$\\n?",
1218
+ "endCaptures": {
1219
+ "0": {
1220
+ "name": "punctuation.definition.string.end.ruby"
1221
+ }
1222
+ },
1223
+ "name": "string.unquoted.heredoc.ruby",
1224
+ "patterns": [
1225
+ {
1226
+ "include": "#heredoc"
1227
+ },
1228
+ {
1229
+ "include": "#interpolated_ruby"
1230
+ },
1231
+ {
1232
+ "include": "source.c"
1233
+ },
1234
+ {
1235
+ "include": "#escaped_char"
1236
+ }
1237
+ ]
1238
+ }
1239
+ ]
1240
+ },
1241
+ {
1242
+ "begin": "(?=(?><<-(\"?)((?:[_\\w]+_|)(?:JS|JAVASCRIPT))\\b\\1))",
1243
+ "comment": "Heredoc with embedded javascript",
1244
+ "end": "(?!\\G)",
1245
+ "name": "meta.embedded.block.js",
1246
+ "patterns": [
1247
+ {
1248
+ "begin": "(?><<-(\"?)((?:[_\\w]+_|)(?:JS|JAVASCRIPT))\\b\\1)",
1249
+ "beginCaptures": {
1250
+ "0": {
1251
+ "name": "punctuation.definition.string.begin.ruby"
1252
+ }
1253
+ },
1254
+ "contentName": "source.js",
1255
+ "end": "\\s*\\2$\\n?",
1256
+ "endCaptures": {
1257
+ "0": {
1258
+ "name": "punctuation.definition.string.end.ruby"
1259
+ }
1260
+ },
1261
+ "name": "string.unquoted.heredoc.ruby",
1262
+ "patterns": [
1263
+ {
1264
+ "include": "#heredoc"
1265
+ },
1266
+ {
1267
+ "include": "#interpolated_ruby"
1268
+ },
1269
+ {
1270
+ "include": "source.js"
1271
+ },
1272
+ {
1273
+ "include": "#escaped_char"
1274
+ }
1275
+ ]
1276
+ }
1277
+ ]
1278
+ },
1279
+ {
1280
+ "begin": "(?=(?><<-(\"?)((?:[_\\w]+_|)JQUERY)\\b\\1))",
1281
+ "comment": "Heredoc with embedded jQuery javascript",
1282
+ "end": "(?!\\G)",
1283
+ "name": "meta.embedded.block.js.jquery",
1284
+ "patterns": [
1285
+ {
1286
+ "begin": "(?><<-(\"?)((?:[_\\w]+_|)JQUERY)\\b\\1)",
1287
+ "beginCaptures": {
1288
+ "0": {
1289
+ "name": "punctuation.definition.string.begin.ruby"
1290
+ }
1291
+ },
1292
+ "contentName": "source.js.jquery",
1293
+ "end": "\\s*\\2$\\n?",
1294
+ "endCaptures": {
1295
+ "0": {
1296
+ "name": "punctuation.definition.string.end.ruby"
1297
+ }
1298
+ },
1299
+ "name": "string.unquoted.heredoc.ruby",
1300
+ "patterns": [
1301
+ {
1302
+ "include": "#heredoc"
1303
+ },
1304
+ {
1305
+ "include": "#interpolated_ruby"
1306
+ },
1307
+ {
1308
+ "include": "source.js.jquery"
1309
+ },
1310
+ {
1311
+ "include": "#escaped_char"
1312
+ }
1313
+ ]
1314
+ }
1315
+ ]
1316
+ },
1317
+ {
1318
+ "begin": "(?=(?><<-(\"?)((?:[_\\w]+_|)(?:SH|SHELL))\\b\\1))",
1319
+ "comment": "Heredoc with embedded shell",
1320
+ "end": "(?!\\G)",
1321
+ "name": "meta.embedded.block.shell",
1322
+ "patterns": [
1323
+ {
1324
+ "begin": "(?><<-(\"?)((?:[_\\w]+_|)(?:SH|SHELL))\\b\\1)",
1325
+ "beginCaptures": {
1326
+ "0": {
1327
+ "name": "punctuation.definition.string.begin.ruby"
1328
+ }
1329
+ },
1330
+ "contentName": "source.shell",
1331
+ "end": "\\s*\\2$\\n?",
1332
+ "endCaptures": {
1333
+ "0": {
1334
+ "name": "punctuation.definition.string.end.ruby"
1335
+ }
1336
+ },
1337
+ "name": "string.unquoted.heredoc.ruby",
1338
+ "patterns": [
1339
+ {
1340
+ "include": "#heredoc"
1341
+ },
1342
+ {
1343
+ "include": "#interpolated_ruby"
1344
+ },
1345
+ {
1346
+ "include": "source.shell"
1347
+ },
1348
+ {
1349
+ "include": "#escaped_char"
1350
+ }
1351
+ ]
1352
+ }
1353
+ ]
1354
+ },
1355
+ {
1356
+ "begin": "(?=(?><<-(\"?)((?:[_\\w]+_|)LUA)\\b\\1))",
1357
+ "comment": "Heredoc with embedded lua",
1358
+ "end": "(?!\\G)",
1359
+ "name": "meta.embedded.block.lua",
1360
+ "patterns": [
1361
+ {
1362
+ "begin": "(?><<-(\"?)((?:[_\\w]+_|)LUA)\\b\\1)",
1363
+ "beginCaptures": {
1364
+ "0": {
1365
+ "name": "punctuation.definition.string.begin.ruby"
1366
+ }
1367
+ },
1368
+ "contentName": "source.lua",
1369
+ "end": "\\s*\\2$\\n?",
1370
+ "endCaptures": {
1371
+ "0": {
1372
+ "name": "punctuation.definition.string.end.ruby"
1373
+ }
1374
+ },
1375
+ "name": "string.unquoted.heredoc.ruby",
1376
+ "patterns": [
1377
+ {
1378
+ "include": "#heredoc"
1379
+ },
1380
+ {
1381
+ "include": "#interpolated_ruby"
1382
+ },
1383
+ {
1384
+ "include": "source.lua"
1385
+ },
1386
+ {
1387
+ "include": "#escaped_char"
1388
+ }
1389
+ ]
1390
+ }
1391
+ ]
1392
+ },
1393
+ {
1394
+ "begin": "(?=(?><<-(\"?)((?:[_\\w]+_|)RUBY)\\b\\1))",
1395
+ "comment": "Heredoc with embedded ruby",
1396
+ "end": "(?!\\G)",
1397
+ "name": "meta.embedded.block.ruby",
1398
+ "patterns": [
1399
+ {
1400
+ "begin": "(?><<-(\"?)((?:[_\\w]+_|)RUBY)\\b\\1)",
1401
+ "beginCaptures": {
1402
+ "0": {
1403
+ "name": "punctuation.definition.string.begin.ruby"
1404
+ }
1405
+ },
1406
+ "contentName": "source.ruby",
1407
+ "end": "\\s*\\2$\\n?",
1408
+ "endCaptures": {
1409
+ "0": {
1410
+ "name": "punctuation.definition.string.end.ruby"
1411
+ }
1412
+ },
1413
+ "name": "string.unquoted.heredoc.ruby",
1414
+ "patterns": [
1415
+ {
1416
+ "include": "#heredoc"
1417
+ },
1418
+ {
1419
+ "include": "#interpolated_ruby"
1420
+ },
1421
+ {
1422
+ "include": "source.ruby"
1423
+ },
1424
+ {
1425
+ "include": "#escaped_char"
1426
+ }
1427
+ ]
1428
+ }
1429
+ ]
1430
+ },
1431
+ {
1432
+ "begin": "(?>[=,]\\s*<<(\\w+))",
1433
+ "beginCaptures": {
1434
+ "0": {
1435
+ "name": "punctuation.definition.string.begin.ruby"
1436
+ }
1437
+ },
1438
+ "end": "^\\1$",
1439
+ "endCaptures": {
1440
+ "0": {
1441
+ "name": "punctuation.definition.string.end.ruby"
1442
+ }
1443
+ },
1444
+ "name": "string.unquoted.heredoc.ruby",
1445
+ "patterns": [
1446
+ {
1447
+ "include": "#heredoc"
1448
+ },
1449
+ {
1450
+ "include": "#interpolated_ruby"
1451
+ },
1452
+ {
1453
+ "include": "#escaped_char"
1454
+ }
1455
+ ]
1456
+ },
1457
+ {
1458
+ "begin": "(?><<-(\\w+))",
1459
+ "beginCaptures": {
1460
+ "0": {
1461
+ "name": "punctuation.definition.string.begin.ruby"
1462
+ }
1463
+ },
1464
+ "comment": "heredoc with indented terminator",
1465
+ "end": "\\s*\\1$",
1466
+ "endCaptures": {
1467
+ "0": {
1468
+ "name": "punctuation.definition.string.end.ruby"
1469
+ }
1470
+ },
1471
+ "name": "string.unquoted.heredoc.ruby",
1472
+ "patterns": [
1473
+ {
1474
+ "include": "#heredoc"
1475
+ },
1476
+ {
1477
+ "include": "#interpolated_ruby"
1478
+ },
1479
+ {
1480
+ "include": "#escaped_char"
1481
+ }
1482
+ ]
1483
+ },
1484
+ {
1485
+ "begin": "(?<=\\{|do|\\{\\s|do\\s)(\\|)",
1486
+ "captures": {
1487
+ "1": {
1488
+ "name": "punctuation.separator.variable.ruby"
1489
+ }
1490
+ },
1491
+ "end": "(\\|)",
1492
+ "patterns": [
1493
+ {
1494
+ "match": "[_a-zA-Z][_a-zA-Z0-9]*",
1495
+ "name": "variable.other.block.ruby"
1496
+ },
1497
+ {
1498
+ "match": ",",
1499
+ "name": "punctuation.separator.variable.ruby"
1500
+ }
1501
+ ]
1502
+ },
1503
+ {
1504
+ "match": "=>",
1505
+ "name": "punctuation.separator.key-value"
1506
+ },
1507
+ {
1508
+ "match": "<<=|%=|&=|\\*=|\\*\\*=|/=|\\+=|\\-=|\\^=|\\|{1,2}=|<<",
1509
+ "name": "keyword.operator.assignment.augmented.ruby"
1510
+ },
1511
+ {
1512
+ "match": "<=>|<(?!<|=)|>(?!<|=|>)|<=|>=|===|==|=~|!=|!~|(?<=[ \\t])\\?",
1513
+ "name": "keyword.operator.comparison.ruby"
1514
+ },
1515
+ {
1516
+ "match": "(?<=[ \\t])!+|\\bnot\\b|&&|\\band\\b|\\|\\||\\bor\\b|\\^",
1517
+ "name": "keyword.operator.logical.ruby"
1518
+ },
1519
+ {
1520
+ "match": "(%|&|\\*\\*|\\*|\\+|\\-|/)",
1521
+ "name": "keyword.operator.arithmetic.ruby"
1522
+ },
1523
+ {
1524
+ "match": "=",
1525
+ "name": "keyword.operator.assignment.ruby"
1526
+ },
1527
+ {
1528
+ "match": "\\||~|>>",
1529
+ "name": "keyword.operator.other.ruby"
1530
+ },
1531
+ {
1532
+ "match": ":",
1533
+ "name": "punctuation.separator.other.ruby"
1534
+ },
1535
+ {
1536
+ "match": "\\;",
1537
+ "name": "punctuation.separator.statement.ruby"
1538
+ },
1539
+ {
1540
+ "match": ",",
1541
+ "name": "punctuation.separator.object.ruby"
1542
+ },
1543
+ {
1544
+ "match": "\\.|::",
1545
+ "name": "punctuation.separator.method.ruby"
1546
+ },
1547
+ {
1548
+ "match": "\\{",
1549
+ "name": "punctuation.section.scope.begin.ruby"
1550
+ },
1551
+ {
1552
+ "match": "\\}",
1553
+ "name": "punctuation.section.scope.end.ruby"
1554
+ },
1555
+ {
1556
+ "match": "\\[",
1557
+ "name": "punctuation.section.array.begin.ruby"
1558
+ },
1559
+ {
1560
+ "match": "\\]",
1561
+ "name": "punctuation.section.array.end.ruby"
1562
+ },
1563
+ {
1564
+ "match": "\\(|\\)",
1565
+ "name": "punctuation.section.function.ruby"
1566
+ }
1567
+ ],
1568
+ "repository": {
1569
+ "escaped_char": {
1570
+ "match": "\\\\(?:[0-7]{1,3}|x[\\da-fA-F]{1,2}|.)",
1571
+ "name": "constant.character.escape.ruby"
1572
+ },
1573
+ "heredoc": {
1574
+ "begin": "^<<-?\\w+",
1575
+ "end": "$",
1576
+ "patterns": [
1577
+ {
1578
+ "include": "$self"
1579
+ }
1580
+ ]
1581
+ },
1582
+ "interpolated_ruby": {
1583
+ "patterns": [
1584
+ {
1585
+ "begin": "#\\{",
1586
+ "beginCaptures": {
1587
+ "0": {
1588
+ "name": "punctuation.section.embedded.begin.ruby"
1589
+ }
1590
+ },
1591
+ "contentName": "source.ruby",
1592
+ "end": "(\\})",
1593
+ "endCaptures": {
1594
+ "0": {
1595
+ "name": "punctuation.section.embedded.end.ruby"
1596
+ },
1597
+ "1": {
1598
+ "name": "source.ruby"
1599
+ }
1600
+ },
1601
+ "name": "meta.embedded.line.ruby",
1602
+ "patterns": [
1603
+ {
1604
+ "include": "#nest_curly_and_self"
1605
+ },
1606
+ {
1607
+ "include": "$self"
1608
+ }
1609
+ ]
1610
+ },
1611
+ {
1612
+ "captures": {
1613
+ "1": {
1614
+ "name": "punctuation.definition.variable.ruby"
1615
+ }
1616
+ },
1617
+ "match": "(#@)[a-zA-Z_]\\w*",
1618
+ "name": "variable.other.readwrite.instance.ruby"
1619
+ },
1620
+ {
1621
+ "captures": {
1622
+ "1": {
1623
+ "name": "punctuation.definition.variable.ruby"
1624
+ }
1625
+ },
1626
+ "match": "(#@@)[a-zA-Z_]\\w*",
1627
+ "name": "variable.other.readwrite.class.ruby"
1628
+ },
1629
+ {
1630
+ "captures": {
1631
+ "1": {
1632
+ "name": "punctuation.definition.variable.ruby"
1633
+ }
1634
+ },
1635
+ "match": "(#\\$)[a-zA-Z_]\\w*",
1636
+ "name": "variable.other.readwrite.global.ruby"
1637
+ }
1638
+ ]
1639
+ },
1640
+ "nest_brackets": {
1641
+ "begin": "\\[",
1642
+ "captures": {
1643
+ "0": {
1644
+ "name": "punctuation.section.scope.ruby"
1645
+ }
1646
+ },
1647
+ "end": "\\]",
1648
+ "patterns": [
1649
+ {
1650
+ "include": "#nest_brackets"
1651
+ }
1652
+ ]
1653
+ },
1654
+ "nest_brackets_i": {
1655
+ "begin": "\\[",
1656
+ "captures": {
1657
+ "0": {
1658
+ "name": "punctuation.section.scope.ruby"
1659
+ }
1660
+ },
1661
+ "end": "\\]",
1662
+ "patterns": [
1663
+ {
1664
+ "include": "#interpolated_ruby"
1665
+ },
1666
+ {
1667
+ "include": "#escaped_char"
1668
+ },
1669
+ {
1670
+ "include": "#nest_brackets_i"
1671
+ }
1672
+ ]
1673
+ },
1674
+ "nest_brackets_r": {
1675
+ "begin": "\\[",
1676
+ "captures": {
1677
+ "0": {
1678
+ "name": "punctuation.section.scope.ruby"
1679
+ }
1680
+ },
1681
+ "end": "\\]",
1682
+ "patterns": [
1683
+ {
1684
+ "include": "#regex_sub"
1685
+ },
1686
+ {
1687
+ "include": "#nest_brackets_r"
1688
+ }
1689
+ ]
1690
+ },
1691
+ "nest_curly": {
1692
+ "begin": "\\{",
1693
+ "captures": {
1694
+ "0": {
1695
+ "name": "punctuation.section.scope.ruby"
1696
+ }
1697
+ },
1698
+ "end": "\\}",
1699
+ "patterns": [
1700
+ {
1701
+ "include": "#nest_curly"
1702
+ }
1703
+ ]
1704
+ },
1705
+ "nest_curly_and_self": {
1706
+ "patterns": [
1707
+ {
1708
+ "begin": "\\{",
1709
+ "captures": {
1710
+ "0": {
1711
+ "name": "punctuation.section.scope.ruby"
1712
+ }
1713
+ },
1714
+ "end": "\\}",
1715
+ "patterns": [
1716
+ {
1717
+ "include": "#nest_curly_and_self"
1718
+ }
1719
+ ]
1720
+ },
1721
+ {
1722
+ "include": "$self"
1723
+ }
1724
+ ]
1725
+ },
1726
+ "nest_curly_i": {
1727
+ "begin": "\\{",
1728
+ "captures": {
1729
+ "0": {
1730
+ "name": "punctuation.section.scope.ruby"
1731
+ }
1732
+ },
1733
+ "end": "\\}",
1734
+ "patterns": [
1735
+ {
1736
+ "include": "#interpolated_ruby"
1737
+ },
1738
+ {
1739
+ "include": "#escaped_char"
1740
+ },
1741
+ {
1742
+ "include": "#nest_curly_i"
1743
+ }
1744
+ ]
1745
+ },
1746
+ "nest_curly_r": {
1747
+ "begin": "\\{",
1748
+ "captures": {
1749
+ "0": {
1750
+ "name": "punctuation.section.scope.ruby"
1751
+ }
1752
+ },
1753
+ "end": "\\}",
1754
+ "patterns": [
1755
+ {
1756
+ "include": "#regex_sub"
1757
+ },
1758
+ {
1759
+ "include": "#nest_curly_r"
1760
+ }
1761
+ ]
1762
+ },
1763
+ "nest_ltgt": {
1764
+ "begin": "\\<",
1765
+ "captures": {
1766
+ "0": {
1767
+ "name": "punctuation.section.scope.ruby"
1768
+ }
1769
+ },
1770
+ "end": "\\>",
1771
+ "patterns": [
1772
+ {
1773
+ "include": "#nest_ltgt"
1774
+ }
1775
+ ]
1776
+ },
1777
+ "nest_ltgt_i": {
1778
+ "begin": "\\<",
1779
+ "captures": {
1780
+ "0": {
1781
+ "name": "punctuation.section.scope.ruby"
1782
+ }
1783
+ },
1784
+ "end": "\\>",
1785
+ "patterns": [
1786
+ {
1787
+ "include": "#interpolated_ruby"
1788
+ },
1789
+ {
1790
+ "include": "#escaped_char"
1791
+ },
1792
+ {
1793
+ "include": "#nest_ltgt_i"
1794
+ }
1795
+ ]
1796
+ },
1797
+ "nest_ltgt_r": {
1798
+ "begin": "\\<",
1799
+ "captures": {
1800
+ "0": {
1801
+ "name": "punctuation.section.scope.ruby"
1802
+ }
1803
+ },
1804
+ "end": "\\>",
1805
+ "patterns": [
1806
+ {
1807
+ "include": "#regex_sub"
1808
+ },
1809
+ {
1810
+ "include": "#nest_ltgt_r"
1811
+ }
1812
+ ]
1813
+ },
1814
+ "nest_parens": {
1815
+ "begin": "\\(",
1816
+ "captures": {
1817
+ "0": {
1818
+ "name": "punctuation.section.scope.ruby"
1819
+ }
1820
+ },
1821
+ "end": "\\)",
1822
+ "patterns": [
1823
+ {
1824
+ "include": "#nest_parens"
1825
+ }
1826
+ ]
1827
+ },
1828
+ "nest_parens_i": {
1829
+ "begin": "\\(",
1830
+ "captures": {
1831
+ "0": {
1832
+ "name": "punctuation.section.scope.ruby"
1833
+ }
1834
+ },
1835
+ "end": "\\)",
1836
+ "patterns": [
1837
+ {
1838
+ "include": "#interpolated_ruby"
1839
+ },
1840
+ {
1841
+ "include": "#escaped_char"
1842
+ },
1843
+ {
1844
+ "include": "#nest_parens_i"
1845
+ }
1846
+ ]
1847
+ },
1848
+ "nest_parens_r": {
1849
+ "begin": "\\(",
1850
+ "captures": {
1851
+ "0": {
1852
+ "name": "punctuation.section.scope.ruby"
1853
+ }
1854
+ },
1855
+ "end": "\\)",
1856
+ "patterns": [
1857
+ {
1858
+ "include": "#regex_sub"
1859
+ },
1860
+ {
1861
+ "include": "#nest_parens_r"
1862
+ }
1863
+ ]
1864
+ },
1865
+ "regex_sub": {
1866
+ "patterns": [
1867
+ {
1868
+ "include": "#interpolated_ruby"
1869
+ },
1870
+ {
1871
+ "include": "#escaped_char"
1872
+ },
1873
+ {
1874
+ "captures": {
1875
+ "1": {
1876
+ "name": "punctuation.definition.arbitrary-repitition.ruby"
1877
+ },
1878
+ "3": {
1879
+ "name": "punctuation.definition.arbitrary-repitition.ruby"
1880
+ }
1881
+ },
1882
+ "match": "(\\{)\\d+(,\\d+)?(\\})",
1883
+ "name": "string.regexp.arbitrary-repitition.ruby"
1884
+ },
1885
+ {
1886
+ "begin": "\\[(?:\\^?\\])?",
1887
+ "captures": {
1888
+ "0": {
1889
+ "name": "punctuation.definition.character-class.ruby"
1890
+ }
1891
+ },
1892
+ "end": "\\]",
1893
+ "name": "string.regexp.character-class.ruby",
1894
+ "patterns": [
1895
+ {
1896
+ "include": "#escaped_char"
1897
+ }
1898
+ ]
1899
+ },
1900
+ {
1901
+ "begin": "\\(\\?#",
1902
+ "beginCaptures": {
1903
+ "0": {
1904
+ "name": "punctuation.definition.comment.begin.ruby"
1905
+ }
1906
+ },
1907
+ "end": "\\)",
1908
+ "endCaptures": {
1909
+ "0": {
1910
+ "name": "punctuation.definition.comment.end.ruby"
1911
+ }
1912
+ },
1913
+ "name": "comment.line.number-sign.ruby",
1914
+ "patterns": [
1915
+ {
1916
+ "include": "#escaped_char"
1917
+ }
1918
+ ]
1919
+ },
1920
+ {
1921
+ "begin": "\\(",
1922
+ "captures": {
1923
+ "0": {
1924
+ "name": "punctuation.definition.group.ruby"
1925
+ }
1926
+ },
1927
+ "end": "\\)",
1928
+ "name": "string.regexp.group.ruby",
1929
+ "patterns": [
1930
+ {
1931
+ "include": "#regex_sub"
1932
+ }
1933
+ ]
1934
+ },
1935
+ {
1936
+ "begin": "(?<=^|\\s)(#)\\s(?=[[a-zA-Z0-9,. \\t?!-][^\\x{00}-\\x{7F}]]*$)",
1937
+ "beginCaptures": {
1938
+ "1": {
1939
+ "name": "punctuation.definition.comment.ruby"
1940
+ }
1941
+ },
1942
+ "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.",
1943
+ "end": "$\\n?",
1944
+ "endCaptures": {
1945
+ "0": {
1946
+ "name": "punctuation.definition.comment.ruby"
1947
+ }
1948
+ },
1949
+ "name": "comment.line.number-sign.ruby"
1950
+ }
1951
+ ]
1952
+ }
1953
+ },
1954
+ "scopeName": "source.ruby",
1955
+ "uuid": "E00B62AC-6B1C-11D9-9B1F-000D93589AF6"
1956
+ }