github-linguist 5.2.0 → 5.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (84) hide show
  1. checksums.yaml +4 -4
  2. data/grammars/annotation.liquidhaskell.haskell.json +1445 -0
  3. data/grammars/hint.haskell.json +134 -17
  4. data/grammars/hint.message.haskell.json +134 -17
  5. data/grammars/hint.type.haskell.json +134 -17
  6. data/grammars/source.abl.json +48 -48
  7. data/grammars/source.afm.json +8 -1
  8. data/grammars/source.angelscript.json +195 -0
  9. data/grammars/source.ats.json +128 -58
  10. data/grammars/source.awk.json +138 -138
  11. data/grammars/source.ballerina.json +434 -0
  12. data/grammars/source.chapel.json +1 -1
  13. data/grammars/source.clips.json +20 -20
  14. data/grammars/source.cobol.json +4 -3
  15. data/grammars/source.coffee.json +556 -109
  16. data/grammars/source.cs.json +10 -5
  17. data/grammars/source.csound-document.json +1 -1
  18. data/grammars/source.csound-score.json +9 -9
  19. data/grammars/source.csound.json +23 -28
  20. data/grammars/source.css.json +6 -5
  21. data/grammars/source.data-weave.json +1584 -0
  22. data/grammars/source.elixir.json +3 -61
  23. data/grammars/source.elm.json +88 -88
  24. data/grammars/source.emacs.lisp.json +12 -1
  25. data/grammars/source.haskell.json +134 -17
  26. data/grammars/source.hsig.json +1376 -0
  27. data/grammars/source.httpspec.json +128 -128
  28. data/grammars/source.jison.json +6 -14
  29. data/grammars/source.jisonlex.json +1 -9
  30. data/grammars/source.js.json +1 -0
  31. data/grammars/source.js.regexp.json +0 -4
  32. data/grammars/source.js.regexp.replacement.json +0 -4
  33. data/grammars/source.jsdoc.json +3 -3
  34. data/grammars/source.lsl.json +146 -53
  35. data/grammars/source.mercury.json +166 -166
  36. data/grammars/source.ne.json +108 -0
  37. data/grammars/source.nim_filter.json +51 -51
  38. data/grammars/source.nut.json +266 -0
  39. data/grammars/source.opal.json +112 -112
  40. data/grammars/source.opalsysdefs.json +16 -16
  41. data/grammars/source.pan.json +1 -1
  42. data/grammars/source.papyrus.skyrim.json +720 -720
  43. data/grammars/source.pawn.json +2 -2
  44. data/grammars/source.prolog.eclipse.json +42 -42
  45. data/grammars/source.prolog.json +41 -41
  46. data/grammars/source.purescript.json +41 -25
  47. data/grammars/source.python.json +47 -34
  48. data/grammars/source.racket.json +54 -54
  49. data/grammars/source.reason.json +37 -3
  50. data/grammars/source.regexp.python.json +31 -0
  51. data/grammars/source.ruby.gemfile.json +27 -0
  52. data/grammars/source.ruby.json +1057 -356
  53. data/grammars/source.rust.json +1 -1
  54. data/grammars/source.sbt.json +13 -3
  55. data/grammars/source.scala.json +74 -55
  56. data/grammars/source.shaderlab.json +1 -1
  57. data/grammars/source.shell.json +26 -21
  58. data/grammars/source.shen.json +91 -91
  59. data/grammars/source.sqf.json +1 -1
  60. data/grammars/source.supercollider.json +1 -1
  61. data/grammars/source.swift.json +4 -0
  62. data/grammars/source.terra.json +36 -37
  63. data/grammars/source.terraform.json +98 -98
  64. data/grammars/source.ts.json +2231 -1677
  65. data/grammars/source.tsx.json +142 -3520
  66. data/grammars/source.vbnet.json +201 -263
  67. data/grammars/source.viml.json +2 -2
  68. data/grammars/source.wdl.json +200 -0
  69. data/grammars/source.yaml.json +34 -16
  70. data/grammars/text.find-refs.json +3 -3
  71. data/grammars/text.haml.json +1 -1
  72. data/grammars/text.html.abl.json +6 -6
  73. data/grammars/text.html.erb.json +8 -11
  74. data/grammars/text.html.php.blade.json +256 -220
  75. data/grammars/text.html.vue.json +1 -1
  76. data/grammars/text.slim.json +31 -17
  77. data/grammars/text.tex.latex.haskell.json +150 -33
  78. data/lib/linguist/heuristics.rb +8 -0
  79. data/lib/linguist/languages.json +1 -1
  80. data/lib/linguist/languages.yml +82 -26
  81. data/lib/linguist/samples.json +134512 -132868
  82. data/lib/linguist/vendor.yml +3 -0
  83. data/lib/linguist/version.rb +1 -1
  84. metadata +13 -4
@@ -37,6 +37,29 @@
37
37
  }
38
38
  ]
39
39
  },
40
+ "fstring-formatting-braces": {
41
+ "patterns": [
42
+ {
43
+ "comment": "empty braces are illegal",
44
+ "match": "({)(\\s*?)(})",
45
+ "captures": {
46
+ "1": {
47
+ "name": "constant.character.format.placeholder.other.python"
48
+ },
49
+ "2": {
50
+ "name": "invalid.illegal.brace.python"
51
+ },
52
+ "3": {
53
+ "name": "constant.character.format.placeholder.other.python"
54
+ }
55
+ }
56
+ },
57
+ {
58
+ "name": "constant.character.escape.python",
59
+ "match": "({{|}})"
60
+ }
61
+ ]
62
+ },
40
63
  "regexp-base-common": {
41
64
  "patterns": [
42
65
  {
@@ -159,6 +182,14 @@
159
182
  }
160
183
  ]
161
184
  },
185
+ "codetags": {
186
+ "match": "(?:\\b(NOTE|XXX|HACK|FIXME|BUG|TODO)\\b)",
187
+ "captures": {
188
+ "1": {
189
+ "name": "keyword.codetag.notation.python"
190
+ }
191
+ }
192
+ },
162
193
  "regexp-expression": {
163
194
  "patterns": [
164
195
  {
@@ -0,0 +1,27 @@
1
+ {
2
+ "name": "Gemfile",
3
+ "scopeName": "source.ruby.gemfile",
4
+ "fileTypes": [
5
+ "Gemfile"
6
+ ],
7
+ "patterns": [
8
+ {
9
+ "include": "source.ruby"
10
+ },
11
+ {
12
+ "begin": "\\b(?<!\\.|::)(gem|git|group|platforms|ruby|source)\\b(?![?!])",
13
+ "captures": {
14
+ "1": {
15
+ "name": "keyword.other.special-method.ruby.gemfile"
16
+ }
17
+ },
18
+ "end": "$|(?=#|})",
19
+ "name": "meta.declaration.ruby.gemfile",
20
+ "patterns": [
21
+ {
22
+ "include": "$self"
23
+ }
24
+ ]
25
+ }
26
+ ]
27
+ }
@@ -1,30 +1,46 @@
1
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",
2
+ "name": "Ruby",
3
+ "scopeName": "source.ruby",
3
4
  "fileTypes": [
4
- "rb",
5
- "rbx",
6
- "rjs",
7
- "Rakefile",
8
- "rake",
5
+ "Appfile",
6
+ "Appraisals",
7
+ "arb",
8
+ "Berksfile",
9
+ "Brewfile",
10
+ "cap",
11
+ "Capfile",
12
+ "capfile",
9
13
  "cgi",
14
+ "cr",
15
+ "Dangerfile",
16
+ "Deliverfile",
17
+ "Fastfile",
10
18
  "fcgi",
11
19
  "gemspec",
20
+ "Guardfile",
12
21
  "irbrc",
13
- "capfile",
14
- "ru",
22
+ "opal",
23
+ "Podfile",
24
+ "podspec",
15
25
  "prawn",
16
- "Gemfile",
17
- "Guardfile",
18
- "Vagrantfile",
19
- "Appraisals",
26
+ "pryrc",
27
+ "Puppetfile",
28
+ "rabl",
29
+ "rake",
30
+ "Rakefile",
20
31
  "Rantfile",
21
- "Berksfile",
22
- "Berksfile.lock",
23
- "Thorfile"
32
+ "rb",
33
+ "rbx",
34
+ "rjs",
35
+ "ru",
36
+ "ruby",
37
+ "Schemafile",
38
+ "Snapfile",
39
+ "thor",
40
+ "Thorfile",
41
+ "Vagrantfile"
24
42
  ],
25
- "firstLineMatch": "^#!/.*\\bruby",
26
- "keyEquivalent": "^~R",
27
- "name": "Ruby",
43
+ "firstLineMatch": "(?x)\n# Hashbang\n^\\#!.*(?:\\s|\\/)\n (?:ruby|macruby|rake|jruby|rbx|ruby_executable_hooks)\n(?:$|\\s)\n|\n# Modeline\n(?i:\n # Emacs\n -\\*-(?:\\s*(?=[^:;\\s]+\\s*-\\*-)|(?:.*?[;\\s]|(?<=-\\*-))mode\\s*:\\s*)\n ruby\n (?=[\\s;]|(?<![-*])-\\*-).*?-\\*-\n |\n # Vim\n (?:(?:\\s|^)vi(?:m[<=>]?\\d+|m)?|\\sex)(?=:(?=\\s*set?\\s[^\\n:]+:)|:(?!\\s*set?\\s))(?:(?:\\s|\\s*:\\s*)\\w*(?:\\s*=(?:[^\\n\\\\\\s]|\\\\.)*)?)*[\\s:](?:filetype|ft|syntax)\\s*=\n ruby\n (?=\\s|:|$)\n)",
28
44
  "patterns": [
29
45
  {
30
46
  "captures": {
@@ -47,7 +63,7 @@
47
63
  "name": "punctuation.definition.variable.ruby"
48
64
  }
49
65
  },
50
- "match": "^\\s*(class)\\s+(([.a-zA-Z0-9_:]+(\\s*(<)\\s*[.a-zA-Z0-9_:]+)?)|((<<)\\s*[.a-zA-Z0-9_:]+))",
66
+ "match": "(?x)\n^\\s*(class)\\s+\n(\n (\n [.a-zA-Z0-9_:]+\n (\\s*(<)\\s*[.a-zA-Z0-9_:]+)? # class A < B\n )\n |\n ((<<)\\s*[.a-zA-Z0-9_:]+) # class << C\n)",
51
67
  "name": "meta.class.ruby"
52
68
  },
53
69
  {
@@ -77,7 +93,7 @@
77
93
  "name": "punctuation.separator.inheritance.ruby"
78
94
  }
79
95
  },
80
- "match": "^\\s*(module)\\s+(([A-Z]\\w*(::))?([A-Z]\\w*(::))?([A-Z]\\w*(::))*[A-Z]\\w*)",
96
+ "match": "(?x)\n^\\s*(module)\\s+\n(\n ([A-Z]\\w*(::))?\n ([A-Z]\\w*(::))?\n ([A-Z]\\w*(::))*\n [A-Z]\\w*\n)",
81
97
  "name": "meta.module.ruby"
82
98
  },
83
99
  {
@@ -88,7 +104,7 @@
88
104
  {
89
105
  "captures": {
90
106
  "1": {
91
- "name": "punctuation.definition.constant.ruby"
107
+ "name": "punctuation.definition.constant.hashkey.ruby"
92
108
  }
93
109
  },
94
110
  "comment": "symbols as hash key (1.9 syntax)",
@@ -112,45 +128,47 @@
112
128
  },
113
129
  {
114
130
  "comment": "contextual smart pair support for block parameters",
115
- "match": "(?<!\\.)\\bdo\\b\\s*",
131
+ "match": "(?<!\\.)\\bdo\\b",
116
132
  "name": "keyword.control.start-block.ruby"
117
133
  },
118
134
  {
119
135
  "comment": "contextual smart pair support",
120
- "match": "(?<=\\{)(\\s+)",
136
+ "match": "(?<={)(\\s+)",
121
137
  "name": "meta.syntax.ruby.start-block"
122
138
  },
123
139
  {
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"
140
+ "match": "(?<!\\.)\\b(alias|alias_method|break|next|redo|retry|return|super|undef|yield)\\b(?![?!])|\\bdefined\\?|\\b(block_given|iterator)\\?",
141
+ "name": "keyword.control.pseudo-method.ruby"
127
142
  },
128
143
  {
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"
144
+ "match": "\\bnil\\b(?![?!])",
145
+ "name": "constant.language.nil.ruby"
132
146
  },
133
147
  {
134
- "match": "\\b(nil|true|false)\\b(?![?!])",
135
- "name": "constant.language.ruby"
148
+ "match": "\\b(true|false)\\b(?![?!])",
149
+ "name": "constant.language.boolean.ruby"
136
150
  },
137
151
  {
138
- "match": "\\b(__(FILE|LINE)__|self)\\b(?![?!])",
152
+ "match": "\\b(__(FILE|LINE)__)\\b(?![?!])",
139
153
  "name": "variable.language.ruby"
140
154
  },
155
+ {
156
+ "match": "\\bself\\b(?![?!])",
157
+ "name": "variable.language.self.ruby"
158
+ },
141
159
  {
142
160
  "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(?![?!])",
161
+ "match": "\\b(initialize|new|loop|include|extend|prepend|raise|fail|attr_reader|attr_writer|attr_accessor|attr|catch|throw|private|private_class_method|module_function|public|public_class_method|protected|refine|using)\\b(?![?!])",
144
162
  "name": "keyword.other.special-method.ruby"
145
163
  },
146
164
  {
147
- "begin": "\\b(require|require_relative|gem)\\b",
165
+ "begin": "\\b(?<!\\.|::)(require|require_relative)\\b(?![?!])",
148
166
  "captures": {
149
167
  "1": {
150
168
  "name": "keyword.other.special-method.ruby"
151
169
  }
152
170
  },
153
- "end": "$|(?=#|\\})",
171
+ "end": "$|(?=#|})",
154
172
  "name": "meta.require.ruby",
155
173
  "patterns": [
156
174
  {
@@ -201,7 +219,7 @@
201
219
  "name": "variable.other.constant.ruby"
202
220
  }
203
221
  },
204
- "end": "\\]",
222
+ "end": "]",
205
223
  "name": "meta.environment-variable.ruby",
206
224
  "patterns": [
207
225
  {
@@ -214,11 +232,15 @@
214
232
  "name": "support.class.ruby"
215
233
  },
216
234
  {
217
- "match": "\\b[A-Z]\\w*\\b",
235
+ "match": "\\b((abort|at_exit|autoload|binding|callcc|caller|caller_locations|chomp|chop|eval|exec|exit|fork|format|gets|global_variables|gsub|lambda|load|local_variables|open|p|print|printf|proc|putc|puts|rand|readline|readlines|select|set_trace_func|sleep|spawn|sprintf|srand|sub|syscall|system|test|trace_var|trap|untrace_var|warn)\\b(?![?!])|autoload\\?|exit!)",
236
+ "name": "support.function.kernel.ruby"
237
+ },
238
+ {
239
+ "match": "\\b[_A-Z]\\w*\\b",
218
240
  "name": "variable.other.constant.ruby"
219
241
  },
220
242
  {
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 ",
243
+ "begin": "(?x)\n(?=def\\b) # optimization to help Oniguruma fail fast\n(?<=^|\\s)(def)\\s+\n(\n (?>[a-zA-Z_]\\w*(?>\\.|::))? # method prefix\n (?> # method name\n [a-zA-Z_]\\w*(?>[?!]|=(?!>))?\n |\n ===?|!=|>[>=]?|<=>|<[<=]?|[%&`/\\|]|\\*\\*?|=?~|[-+]@?|\\[]=?\n )\n)\n\\s*(\\()",
222
244
  "beginCaptures": {
223
245
  "1": {
224
246
  "name": "keyword.control.def.ruby"
@@ -230,7 +252,7 @@
230
252
  "name": "punctuation.definition.parameters.ruby"
231
253
  }
232
254
  },
233
- "comment": "the method pattern comes from the symbol pattern, see there for a explaination",
255
+ "comment": "The method pattern comes from the symbol pattern. See there for an explanation.",
234
256
  "end": "\\)",
235
257
  "endCaptures": {
236
258
  "0": {
@@ -241,7 +263,7 @@
241
263
  "patterns": [
242
264
  {
243
265
  "begin": "(?![\\s,)])",
244
- "end": "(?=[,)])",
266
+ "end": "(?=,|\\)\\s*$)",
245
267
  "patterns": [
246
268
  {
247
269
  "captures": {
@@ -249,10 +271,16 @@
249
271
  "name": "storage.type.variable.ruby"
250
272
  },
251
273
  "2": {
274
+ "name": "constant.other.symbol.hashkey.parameter.function.ruby"
275
+ },
276
+ "3": {
277
+ "name": "punctuation.definition.constant.hashkey.ruby"
278
+ },
279
+ "4": {
252
280
  "name": "variable.parameter.function.ruby"
253
281
  }
254
282
  },
255
- "match": "\\G([&*]?)([_a-zA-Z][_a-zA-Z0-9]*)"
283
+ "match": "\\G([&*]?)(?:([_a-zA-Z]\\w*(:))|([_a-zA-Z]\\w*))"
256
284
  },
257
285
  {
258
286
  "include": "$self"
@@ -262,7 +290,7 @@
262
290
  ]
263
291
  },
264
292
  {
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 ",
293
+ "begin": "(?x)\n(?=def\\b) # optimization to help Oniguruma fail fast\n(?<=^|\\s)(def)\\s+\n(\n (?>[a-zA-Z_]\\w*(?>\\.|::))? # method prefix\n (?> # method name\n [a-zA-Z_]\\w*(?>[?!]|=(?!>))?\n |\n ===?|!=|>[>=]?|<=>|<[<=]?|[%&`/\\|]|\\*\\*?|=?~|[-+]@?|\\[]=?\n )\n)\n[ \\t]\n(?=[ \\t]*[^\\s#;]) # make sure the following is not comment",
266
294
  "beginCaptures": {
267
295
  "1": {
268
296
  "name": "keyword.control.def.ruby"
@@ -282,11 +310,19 @@
282
310
  {
283
311
  "captures": {
284
312
  "1": {
285
- "name": "punctuation.definition.variable.ruby"
313
+ "name": "storage.type.variable.ruby"
314
+ },
315
+ "2": {
316
+ "name": "constant.other.symbol.hashkey.parameter.function.ruby"
317
+ },
318
+ "3": {
319
+ "name": "punctuation.definition.constant.hashkey.ruby"
320
+ },
321
+ "4": {
322
+ "name": "variable.parameter.function.ruby"
286
323
  }
287
324
  },
288
- "match": "\\G([&*]?)[_a-zA-Z][_a-zA-Z0-9]*",
289
- "name": "variable.parameter.function.ruby"
325
+ "match": "\\G([&*]?)(?:([_a-zA-Z]\\w*(:))|([_a-zA-Z]\\w*))"
290
326
  },
291
327
  {
292
328
  "include": "$self"
@@ -305,38 +341,28 @@
305
341
  }
306
342
  },
307
343
  "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 ",
344
+ "match": "(?x)\n(?=def\\b) # optimization to help Oniguruma fail fast\n(?<=^|\\s)(def)\\b\n(\n \\s+\n (\n (?>[a-zA-Z_]\\w*(?>\\.|::))? # method prefix\n (?> # method name\n [a-zA-Z_]\\w*(?>[?!]|=(?!>))?\n |\n ===?|!=|>[>=]?|<=>|<[<=]?|[%&`/\\|]|\\*\\*?|=?~|[-+]@?|\\[]=?\n )\n )\n)?",
309
345
  "name": "meta.function.method.without-arguments.ruby"
310
346
  },
311
347
  {
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"
348
+ "match": "(?x)\n\\b\n(\n [\\d](?>_?\\d)* # 100_000\n (\\.(?![^[:space:][:digit:]])(?>_?\\d)*)? # fractional part\n ([eE][-+]?\\d(?>_?\\d)*)? # 1.23e-4\n |\n 0\n (?:\n [xX]\\h(?>_?\\h)*|\n [oO]?[0-7](?>_?[0-7])*|\n [bB][01](?>_?[01])*|\n [dD]\\d(?>_?\\d)*\n ) # A base indicator can only be used with an integer\n)\\b",
349
+ "name": "constant.numeric.ruby"
330
350
  },
331
351
  {
332
352
  "begin": ":'",
333
- "captures": {
353
+ "beginCaptures": {
334
354
  "0": {
335
- "name": "punctuation.definition.constant.ruby"
355
+ "name": "punctuation.definition.symbol.begin.ruby"
336
356
  }
337
357
  },
358
+ "comment": "symbol literal with '' delimitor",
338
359
  "end": "'",
339
- "name": "constant.other.symbol.single-quoted.ruby",
360
+ "endCaptures": {
361
+ "0": {
362
+ "name": "punctuation.definition.symbol.end.ruby"
363
+ }
364
+ },
365
+ "name": "constant.other.symbol.ruby",
340
366
  "patterns": [
341
367
  {
342
368
  "match": "\\\\['\\\\]",
@@ -346,13 +372,19 @@
346
372
  },
347
373
  {
348
374
  "begin": ":\"",
349
- "captures": {
375
+ "beginCaptures": {
350
376
  "0": {
351
- "name": "punctuation.definition.constant.ruby"
377
+ "name": "punctuation.section.symbol.begin.ruby"
352
378
  }
353
379
  },
380
+ "comment": "symbol literal with \"\" delimitor",
354
381
  "end": "\"",
355
- "name": "constant.other.symbol.double-quoted.ruby",
382
+ "endCaptures": {
383
+ "0": {
384
+ "name": "punctuation.section.symbol.end.ruby"
385
+ }
386
+ },
387
+ "name": "constant.other.symbol.interpolated.ruby",
356
388
  "patterns": [
357
389
  {
358
390
  "include": "#interpolated_ruby"
@@ -362,6 +394,11 @@
362
394
  }
363
395
  ]
364
396
  },
397
+ {
398
+ "comment": "Needs higher precidence than regular expressions.",
399
+ "match": "(?<!\\()/=",
400
+ "name": "keyword.operator.assignment.augmented.ruby"
401
+ },
365
402
  {
366
403
  "begin": "'",
367
404
  "beginCaptures": {
@@ -369,7 +406,7 @@
369
406
  "name": "punctuation.definition.string.begin.ruby"
370
407
  }
371
408
  },
372
- "comment": "single quoted string (does not allow interpolation)",
409
+ "comment": "string literal with '' delimitor",
373
410
  "end": "'",
374
411
  "endCaptures": {
375
412
  "0": {
@@ -391,14 +428,14 @@
391
428
  "name": "punctuation.definition.string.begin.ruby"
392
429
  }
393
430
  },
394
- "comment": "double quoted string (allows for interpolation)",
431
+ "comment": "string literal with interpolation and \"\" delimitor",
395
432
  "end": "\"",
396
433
  "endCaptures": {
397
434
  "0": {
398
435
  "name": "punctuation.definition.string.end.ruby"
399
436
  }
400
437
  },
401
- "name": "string.quoted.double.ruby",
438
+ "name": "string.quoted.double.interpolated.ruby",
402
439
  "patterns": [
403
440
  {
404
441
  "include": "#interpolated_ruby"
@@ -433,20 +470,150 @@
433
470
  ]
434
471
  },
435
472
  {
436
- "begin": "%x\\{",
473
+ "begin": "(?x)\n(?<![\\w)])((/))(?![?*+])\n(?=\n (?:\\\\/|[^/])*+ # Do NOT change the order\n /[eimnosux]*\\s*\n (?:\n [)\\]}#.,?:]|\\|\\||&&|<=>|=>|==|=~|!~|!=|;|$|\n if|else|elsif|then|do|end|unless|while|until|or|and\n )\n |\n $\n)",
474
+ "captures": {
475
+ "1": {
476
+ "name": "string.regexp.interpolated.ruby"
477
+ },
478
+ "2": {
479
+ "name": "punctuation.section.regexp.ruby"
480
+ }
481
+ },
482
+ "comment": "regular expression literal with interpolation",
483
+ "contentName": "string.regexp.interpolated.ruby",
484
+ "end": "((/[eimnosux]*))",
485
+ "patterns": [
486
+ {
487
+ "include": "#regex_sub"
488
+ }
489
+ ]
490
+ },
491
+ {
492
+ "begin": "%r{",
437
493
  "beginCaptures": {
438
494
  "0": {
439
- "name": "punctuation.definition.string.begin.ruby"
495
+ "name": "punctuation.section.regexp.begin.ruby"
440
496
  }
441
497
  },
442
- "comment": "execute string (allow for interpolation)",
443
- "end": "\\}",
498
+ "end": "}[eimnosux]*",
444
499
  "endCaptures": {
445
500
  "0": {
446
- "name": "punctuation.definition.string.end.ruby"
501
+ "name": "punctuation.section.regexp.end.ruby"
447
502
  }
448
503
  },
449
- "name": "string.interpolated.ruby",
504
+ "name": "string.regexp.interpolated.ruby",
505
+ "patterns": [
506
+ {
507
+ "include": "#regex_sub"
508
+ },
509
+ {
510
+ "include": "#nest_curly_r"
511
+ }
512
+ ]
513
+ },
514
+ {
515
+ "begin": "%r\\[",
516
+ "beginCaptures": {
517
+ "0": {
518
+ "name": "punctuation.section.regexp.begin.ruby"
519
+ }
520
+ },
521
+ "end": "][eimnosux]*",
522
+ "endCaptures": {
523
+ "0": {
524
+ "name": "punctuation.section.regexp.end.ruby"
525
+ }
526
+ },
527
+ "name": "string.regexp.interpolated.ruby",
528
+ "patterns": [
529
+ {
530
+ "include": "#regex_sub"
531
+ },
532
+ {
533
+ "include": "#nest_brackets_r"
534
+ }
535
+ ]
536
+ },
537
+ {
538
+ "begin": "%r\\(",
539
+ "beginCaptures": {
540
+ "0": {
541
+ "name": "punctuation.section.regexp.begin.ruby"
542
+ }
543
+ },
544
+ "end": "\\)[eimnosux]*",
545
+ "endCaptures": {
546
+ "0": {
547
+ "name": "punctuation.section.regexp.end.ruby"
548
+ }
549
+ },
550
+ "name": "string.regexp.interpolated.ruby",
551
+ "patterns": [
552
+ {
553
+ "include": "#regex_sub"
554
+ },
555
+ {
556
+ "include": "#nest_parens_r"
557
+ }
558
+ ]
559
+ },
560
+ {
561
+ "begin": "%r<",
562
+ "beginCaptures": {
563
+ "0": {
564
+ "name": "punctuation.section.regexp.begin.ruby"
565
+ }
566
+ },
567
+ "end": ">[eimnosux]*",
568
+ "endCaptures": {
569
+ "0": {
570
+ "name": "punctuation.section.regexp.end.ruby"
571
+ }
572
+ },
573
+ "name": "string.regexp.interpolated.ruby",
574
+ "patterns": [
575
+ {
576
+ "include": "#regex_sub"
577
+ },
578
+ {
579
+ "include": "#nest_ltgt_r"
580
+ }
581
+ ]
582
+ },
583
+ {
584
+ "begin": "%r([^\\w])",
585
+ "beginCaptures": {
586
+ "0": {
587
+ "name": "punctuation.section.regexp.begin.ruby"
588
+ }
589
+ },
590
+ "end": "\\1[eimnosux]*",
591
+ "endCaptures": {
592
+ "0": {
593
+ "name": "punctuation.section.regexp.end.ruby"
594
+ }
595
+ },
596
+ "name": "string.regexp.interpolated.ruby",
597
+ "patterns": [
598
+ {
599
+ "include": "#regex_sub"
600
+ }
601
+ ]
602
+ },
603
+ {
604
+ "begin": "%I\\[",
605
+ "beginCaptures": {
606
+ "0": {
607
+ "name": "punctuation.section.array.begin.ruby"
608
+ }
609
+ },
610
+ "end": "]",
611
+ "endCaptures": {
612
+ "0": {
613
+ "name": "punctuation.section.array.end.ruby"
614
+ }
615
+ },
616
+ "name": "constant.other.symbol.interpolated.ruby",
450
617
  "patterns": [
451
618
  {
452
619
  "include": "#interpolated_ruby"
@@ -455,25 +622,24 @@
455
622
  "include": "#escaped_char"
456
623
  },
457
624
  {
458
- "include": "#nest_curly_i"
625
+ "include": "#nest_brackets_i"
459
626
  }
460
627
  ]
461
628
  },
462
629
  {
463
- "begin": "%x\\[",
630
+ "begin": "%I\\(",
464
631
  "beginCaptures": {
465
632
  "0": {
466
- "name": "punctuation.definition.string.begin.ruby"
633
+ "name": "punctuation.section.array.begin.ruby"
467
634
  }
468
635
  },
469
- "comment": "execute string (allow for interpolation)",
470
- "end": "\\]",
636
+ "end": "\\)",
471
637
  "endCaptures": {
472
638
  "0": {
473
- "name": "punctuation.definition.string.end.ruby"
639
+ "name": "punctuation.section.array.end.ruby"
474
640
  }
475
641
  },
476
- "name": "string.interpolated.ruby",
642
+ "name": "constant.other.symbol.interpolated.ruby",
477
643
  "patterns": [
478
644
  {
479
645
  "include": "#interpolated_ruby"
@@ -482,25 +648,24 @@
482
648
  "include": "#escaped_char"
483
649
  },
484
650
  {
485
- "include": "#nest_brackets_i"
651
+ "include": "#nest_parens_i"
486
652
  }
487
653
  ]
488
654
  },
489
655
  {
490
- "begin": "%x\\<",
656
+ "begin": "%I<",
491
657
  "beginCaptures": {
492
658
  "0": {
493
- "name": "punctuation.definition.string.begin.ruby"
659
+ "name": "punctuation.section.array.begin.ruby"
494
660
  }
495
661
  },
496
- "comment": "execute string (allow for interpolation)",
497
- "end": "\\>",
662
+ "end": ">",
498
663
  "endCaptures": {
499
664
  "0": {
500
- "name": "punctuation.definition.string.end.ruby"
665
+ "name": "punctuation.section.array.end.ruby"
501
666
  }
502
667
  },
503
- "name": "string.interpolated.ruby",
668
+ "name": "constant.other.symbol.interpolated.ruby",
504
669
  "patterns": [
505
670
  {
506
671
  "include": "#interpolated_ruby"
@@ -514,20 +679,19 @@
514
679
  ]
515
680
  },
516
681
  {
517
- "begin": "%x\\(",
682
+ "begin": "%I{",
518
683
  "beginCaptures": {
519
684
  "0": {
520
- "name": "punctuation.definition.string.begin.ruby"
685
+ "name": "punctuation.section.array.begin.ruby"
521
686
  }
522
687
  },
523
- "comment": "execute string (allow for interpolation)",
524
- "end": "\\)",
688
+ "end": "}",
525
689
  "endCaptures": {
526
690
  "0": {
527
- "name": "punctuation.definition.string.end.ruby"
691
+ "name": "punctuation.section.array.end.ruby"
528
692
  }
529
693
  },
530
- "name": "string.interpolated.ruby",
694
+ "name": "constant.other.symbol.interpolated.ruby",
531
695
  "patterns": [
532
696
  {
533
697
  "include": "#interpolated_ruby"
@@ -536,25 +700,24 @@
536
700
  "include": "#escaped_char"
537
701
  },
538
702
  {
539
- "include": "#nest_parens_i"
703
+ "include": "#nest_curly_i"
540
704
  }
541
705
  ]
542
706
  },
543
707
  {
544
- "begin": "%x([\\W_])",
708
+ "begin": "%I([^\\w])",
545
709
  "beginCaptures": {
546
710
  "0": {
547
- "name": "punctuation.definition.string.begin.ruby"
711
+ "name": "punctuation.section.array.begin.ruby"
548
712
  }
549
713
  },
550
- "comment": "execute string (allow for interpolation)",
551
714
  "end": "\\1",
552
715
  "endCaptures": {
553
716
  "0": {
554
- "name": "punctuation.definition.string.end.ruby"
717
+ "name": "punctuation.section.array.end.ruby"
555
718
  }
556
719
  },
557
- "name": "string.interpolated.ruby",
720
+ "name": "constant.other.symbol.interpolated.ruby",
558
721
  "patterns": [
559
722
  {
560
723
  "include": "#interpolated_ruby"
@@ -565,156 +728,162 @@
565
728
  ]
566
729
  },
567
730
  {
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"
731
+ "begin": "%i\\[",
732
+ "beginCaptures": {
733
+ "0": {
734
+ "name": "punctuation.section.array.begin.ruby"
575
735
  }
576
736
  },
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]*))",
737
+ "end": "]",
738
+ "endCaptures": {
739
+ "0": {
740
+ "name": "punctuation.section.array.end.ruby"
741
+ }
742
+ },
743
+ "name": "constant.other.symbol.ruby",
580
744
  "patterns": [
581
745
  {
582
- "include": "#regex_sub"
746
+ "match": "\\\\]|\\\\\\\\",
747
+ "name": "constant.character.escape.ruby"
748
+ },
749
+ {
750
+ "include": "#nest_brackets"
583
751
  }
584
752
  ]
585
753
  },
586
754
  {
587
- "begin": "%r\\{",
755
+ "begin": "%i\\(",
588
756
  "beginCaptures": {
589
757
  "0": {
590
- "name": "punctuation.definition.string.begin.ruby"
758
+ "name": "punctuation.section.array.begin.ruby"
591
759
  }
592
760
  },
593
- "comment": "regular expressions (literal)",
594
- "end": "\\}[eimnosux]*",
761
+ "end": "\\)",
595
762
  "endCaptures": {
596
763
  "0": {
597
- "name": "punctuation.definition.string.end.ruby"
764
+ "name": "punctuation.section.array.end.ruby"
598
765
  }
599
766
  },
600
- "name": "string.regexp.mod-r.ruby",
767
+ "name": "constant.other.symbol.ruby",
601
768
  "patterns": [
602
769
  {
603
- "include": "#regex_sub"
770
+ "match": "\\\\\\)|\\\\\\\\",
771
+ "name": "constant.character.escape.ruby"
604
772
  },
605
773
  {
606
- "include": "#nest_curly_r"
774
+ "include": "#nest_parens"
607
775
  }
608
776
  ]
609
777
  },
610
778
  {
611
- "begin": "%r\\[",
779
+ "begin": "%i<",
612
780
  "beginCaptures": {
613
781
  "0": {
614
- "name": "punctuation.definition.string.begin.ruby"
782
+ "name": "punctuation.section.array.begin.ruby"
615
783
  }
616
784
  },
617
- "comment": "regular expressions (literal)",
618
- "end": "\\][eimnosux]*",
785
+ "end": ">",
619
786
  "endCaptures": {
620
787
  "0": {
621
- "name": "punctuation.definition.string.end.ruby"
788
+ "name": "punctuation.section.array.end.ruby"
622
789
  }
623
790
  },
624
- "name": "string.regexp.mod-r.ruby",
791
+ "name": "constant.other.symbol.ruby",
625
792
  "patterns": [
626
793
  {
627
- "include": "#regex_sub"
794
+ "match": "\\\\>|\\\\\\\\",
795
+ "name": "constant.character.escape.ruby"
628
796
  },
629
797
  {
630
- "include": "#nest_brackets_r"
798
+ "include": "#nest_ltgt"
631
799
  }
632
800
  ]
633
801
  },
634
802
  {
635
- "begin": "%r\\(",
803
+ "begin": "%i{",
636
804
  "beginCaptures": {
637
805
  "0": {
638
- "name": "punctuation.definition.string.begin.ruby"
806
+ "name": "punctuation.section.array.begin.ruby"
639
807
  }
640
808
  },
641
- "comment": "regular expressions (literal)",
642
- "end": "\\)[eimnosux]*",
809
+ "end": "}",
643
810
  "endCaptures": {
644
811
  "0": {
645
- "name": "punctuation.definition.string.end.ruby"
812
+ "name": "punctuation.section.array.end.ruby"
646
813
  }
647
814
  },
648
- "name": "string.regexp.mod-r.ruby",
815
+ "name": "constant.other.symbol.ruby",
649
816
  "patterns": [
650
817
  {
651
- "include": "#regex_sub"
818
+ "match": "\\\\}|\\\\\\\\",
819
+ "name": "constant.character.escape.ruby"
652
820
  },
653
821
  {
654
- "include": "#nest_parens_r"
822
+ "include": "#nest_curly"
655
823
  }
656
824
  ]
657
825
  },
658
826
  {
659
- "begin": "%r\\<",
827
+ "begin": "%i([^\\w])",
660
828
  "beginCaptures": {
661
829
  "0": {
662
- "name": "punctuation.definition.string.begin.ruby"
830
+ "name": "punctuation.section.array.begin.ruby"
663
831
  }
664
832
  },
665
- "comment": "regular expressions (literal)",
666
- "end": "\\>[eimnosux]*",
833
+ "end": "\\1",
667
834
  "endCaptures": {
668
835
  "0": {
669
- "name": "punctuation.definition.string.end.ruby"
836
+ "name": "punctuation.section.array.end.ruby"
670
837
  }
671
838
  },
672
- "name": "string.regexp.mod-r.ruby",
839
+ "name": "constant.other.symbol.ruby",
673
840
  "patterns": [
674
841
  {
675
- "include": "#regex_sub"
676
- },
677
- {
678
- "include": "#nest_ltgt_r"
842
+ "comment": "Cant be named because its not neccesarily an escape.",
843
+ "match": "\\\\."
679
844
  }
680
845
  ]
681
846
  },
682
847
  {
683
- "begin": "%r([\\W_])",
848
+ "begin": "%W\\[",
684
849
  "beginCaptures": {
685
850
  "0": {
686
- "name": "punctuation.definition.string.begin.ruby"
851
+ "name": "punctuation.section.array.begin.ruby"
687
852
  }
688
853
  },
689
- "comment": "regular expressions (literal)",
690
- "end": "\\1[eimnosux]*",
854
+ "end": "]",
691
855
  "endCaptures": {
692
856
  "0": {
693
- "name": "punctuation.definition.string.end.ruby"
857
+ "name": "punctuation.section.array.end.ruby"
694
858
  }
695
859
  },
696
- "name": "string.regexp.mod-r.ruby",
860
+ "name": "string.quoted.other.interpolated.ruby",
697
861
  "patterns": [
698
862
  {
699
- "include": "#regex_sub"
863
+ "include": "#interpolated_ruby"
864
+ },
865
+ {
866
+ "include": "#escaped_char"
867
+ },
868
+ {
869
+ "include": "#nest_brackets_i"
700
870
  }
701
871
  ]
702
872
  },
703
873
  {
704
- "begin": "%[QWSR]?\\(",
874
+ "begin": "%W\\(",
705
875
  "beginCaptures": {
706
876
  "0": {
707
- "name": "punctuation.definition.string.begin.ruby"
877
+ "name": "punctuation.section.array.begin.ruby"
708
878
  }
709
879
  },
710
- "comment": "literal capable of interpolation ()",
711
880
  "end": "\\)",
712
881
  "endCaptures": {
713
882
  "0": {
714
- "name": "punctuation.definition.string.end.ruby"
883
+ "name": "punctuation.section.array.end.ruby"
715
884
  }
716
885
  },
717
- "name": "string.quoted.other.literal.upper.ruby",
886
+ "name": "string.quoted.other.interpolated.ruby",
718
887
  "patterns": [
719
888
  {
720
889
  "include": "#interpolated_ruby"
@@ -728,149 +897,478 @@
728
897
  ]
729
898
  },
730
899
  {
731
- "begin": "%[QWSR]?\\[",
900
+ "begin": "%W<",
732
901
  "beginCaptures": {
733
902
  "0": {
734
- "name": "punctuation.definition.string.begin.ruby"
903
+ "name": "punctuation.section.array.begin.ruby"
735
904
  }
736
905
  },
737
- "comment": "literal capable of interpolation []",
738
- "end": "\\]",
906
+ "end": ">",
907
+ "endCaptures": {
908
+ "0": {
909
+ "name": "punctuation.section.array.end.ruby"
910
+ }
911
+ },
912
+ "name": "string.quoted.other.interpolated.ruby",
913
+ "patterns": [
914
+ {
915
+ "include": "#interpolated_ruby"
916
+ },
917
+ {
918
+ "include": "#escaped_char"
919
+ },
920
+ {
921
+ "include": "#nest_ltgt_i"
922
+ }
923
+ ]
924
+ },
925
+ {
926
+ "begin": "%W{",
927
+ "beginCaptures": {
928
+ "0": {
929
+ "name": "punctuation.section.array.begin.ruby"
930
+ }
931
+ },
932
+ "end": "}",
933
+ "endCaptures": {
934
+ "0": {
935
+ "name": "punctuation.section.array.end.ruby"
936
+ }
937
+ },
938
+ "name": "string.quoted.other.interpolated.ruby",
939
+ "patterns": [
940
+ {
941
+ "include": "#interpolated_ruby"
942
+ },
943
+ {
944
+ "include": "#escaped_char"
945
+ },
946
+ {
947
+ "include": "#nest_curly_i"
948
+ }
949
+ ]
950
+ },
951
+ {
952
+ "begin": "%W([^\\w])",
953
+ "beginCaptures": {
954
+ "0": {
955
+ "name": "punctuation.section.array.begin.ruby"
956
+ }
957
+ },
958
+ "end": "\\1",
959
+ "endCaptures": {
960
+ "0": {
961
+ "name": "punctuation.section.array.end.ruby"
962
+ }
963
+ },
964
+ "name": "string.quoted.other.interpolated.ruby",
965
+ "patterns": [
966
+ {
967
+ "include": "#interpolated_ruby"
968
+ },
969
+ {
970
+ "include": "#escaped_char"
971
+ }
972
+ ]
973
+ },
974
+ {
975
+ "begin": "%w\\[",
976
+ "beginCaptures": {
977
+ "0": {
978
+ "name": "punctuation.section.array.begin.ruby"
979
+ }
980
+ },
981
+ "end": "]",
982
+ "endCaptures": {
983
+ "0": {
984
+ "name": "punctuation.section.array.end.ruby"
985
+ }
986
+ },
987
+ "name": "string.quoted.other.ruby",
988
+ "patterns": [
989
+ {
990
+ "match": "\\\\]|\\\\\\\\",
991
+ "name": "constant.character.escape.ruby"
992
+ },
993
+ {
994
+ "include": "#nest_brackets"
995
+ }
996
+ ]
997
+ },
998
+ {
999
+ "begin": "%w\\(",
1000
+ "beginCaptures": {
1001
+ "0": {
1002
+ "name": "punctuation.section.array.begin.ruby"
1003
+ }
1004
+ },
1005
+ "end": "\\)",
1006
+ "endCaptures": {
1007
+ "0": {
1008
+ "name": "punctuation.section.array.end.ruby"
1009
+ }
1010
+ },
1011
+ "name": "string.quoted.other.ruby",
1012
+ "patterns": [
1013
+ {
1014
+ "match": "\\\\\\)|\\\\\\\\",
1015
+ "name": "constant.character.escape.ruby"
1016
+ },
1017
+ {
1018
+ "include": "#nest_parens"
1019
+ }
1020
+ ]
1021
+ },
1022
+ {
1023
+ "begin": "%w<",
1024
+ "beginCaptures": {
1025
+ "0": {
1026
+ "name": "punctuation.section.array.begin.ruby"
1027
+ }
1028
+ },
1029
+ "end": ">",
1030
+ "endCaptures": {
1031
+ "0": {
1032
+ "name": "punctuation.section.array.end.ruby"
1033
+ }
1034
+ },
1035
+ "name": "string.quoted.other.ruby",
1036
+ "patterns": [
1037
+ {
1038
+ "match": "\\\\>|\\\\\\\\",
1039
+ "name": "constant.character.escape.ruby"
1040
+ },
1041
+ {
1042
+ "include": "#nest_ltgt"
1043
+ }
1044
+ ]
1045
+ },
1046
+ {
1047
+ "begin": "%w{",
1048
+ "beginCaptures": {
1049
+ "0": {
1050
+ "name": "punctuation.section.array.begin.ruby"
1051
+ }
1052
+ },
1053
+ "end": "}",
1054
+ "endCaptures": {
1055
+ "0": {
1056
+ "name": "punctuation.section.array.end.ruby"
1057
+ }
1058
+ },
1059
+ "name": "string.quoted.other.ruby",
1060
+ "patterns": [
1061
+ {
1062
+ "match": "\\\\}|\\\\\\\\",
1063
+ "name": "constant.character.escape.ruby"
1064
+ },
1065
+ {
1066
+ "include": "#nest_curly"
1067
+ }
1068
+ ]
1069
+ },
1070
+ {
1071
+ "begin": "%w([^\\w])",
1072
+ "beginCaptures": {
1073
+ "0": {
1074
+ "name": "punctuation.section.array.begin.ruby"
1075
+ }
1076
+ },
1077
+ "end": "\\1",
1078
+ "endCaptures": {
1079
+ "0": {
1080
+ "name": "punctuation.section.array.end.ruby"
1081
+ }
1082
+ },
1083
+ "name": "string.quoted.other.ruby",
1084
+ "patterns": [
1085
+ {
1086
+ "comment": "Cant be named because its not neccesarily an escape.",
1087
+ "match": "\\\\."
1088
+ }
1089
+ ]
1090
+ },
1091
+ {
1092
+ "begin": "%[Qx]?\\(",
1093
+ "beginCaptures": {
1094
+ "0": {
1095
+ "name": "punctuation.definition.string.begin.ruby"
1096
+ }
1097
+ },
1098
+ "end": "\\)",
1099
+ "endCaptures": {
1100
+ "0": {
1101
+ "name": "punctuation.definition.string.end.ruby"
1102
+ }
1103
+ },
1104
+ "name": "string.quoted.other.interpolated.ruby",
1105
+ "patterns": [
1106
+ {
1107
+ "include": "#interpolated_ruby"
1108
+ },
1109
+ {
1110
+ "include": "#escaped_char"
1111
+ },
1112
+ {
1113
+ "include": "#nest_parens_i"
1114
+ }
1115
+ ]
1116
+ },
1117
+ {
1118
+ "begin": "%[Qx]?\\[",
1119
+ "beginCaptures": {
1120
+ "0": {
1121
+ "name": "punctuation.definition.string.begin.ruby"
1122
+ }
1123
+ },
1124
+ "end": "]",
1125
+ "endCaptures": {
1126
+ "0": {
1127
+ "name": "punctuation.definition.string.end.ruby"
1128
+ }
1129
+ },
1130
+ "name": "string.quoted.other.interpolated.ruby",
1131
+ "patterns": [
1132
+ {
1133
+ "include": "#interpolated_ruby"
1134
+ },
1135
+ {
1136
+ "include": "#escaped_char"
1137
+ },
1138
+ {
1139
+ "include": "#nest_brackets_i"
1140
+ }
1141
+ ]
1142
+ },
1143
+ {
1144
+ "begin": "%[Qx]?{",
1145
+ "beginCaptures": {
1146
+ "0": {
1147
+ "name": "punctuation.definition.string.begin.ruby"
1148
+ }
1149
+ },
1150
+ "end": "}",
1151
+ "endCaptures": {
1152
+ "0": {
1153
+ "name": "punctuation.definition.string.end.ruby"
1154
+ }
1155
+ },
1156
+ "name": "string.quoted.other.interpolated.ruby",
1157
+ "patterns": [
1158
+ {
1159
+ "include": "#interpolated_ruby"
1160
+ },
1161
+ {
1162
+ "include": "#escaped_char"
1163
+ },
1164
+ {
1165
+ "include": "#nest_curly_i"
1166
+ }
1167
+ ]
1168
+ },
1169
+ {
1170
+ "begin": "%[Qx]?<",
1171
+ "beginCaptures": {
1172
+ "0": {
1173
+ "name": "punctuation.definition.string.begin.ruby"
1174
+ }
1175
+ },
1176
+ "end": ">",
1177
+ "endCaptures": {
1178
+ "0": {
1179
+ "name": "punctuation.definition.string.end.ruby"
1180
+ }
1181
+ },
1182
+ "name": "string.quoted.other.interpolated.ruby",
1183
+ "patterns": [
1184
+ {
1185
+ "include": "#interpolated_ruby"
1186
+ },
1187
+ {
1188
+ "include": "#escaped_char"
1189
+ },
1190
+ {
1191
+ "include": "#nest_ltgt_i"
1192
+ }
1193
+ ]
1194
+ },
1195
+ {
1196
+ "begin": "%[Qx]([^\\w])",
1197
+ "beginCaptures": {
1198
+ "0": {
1199
+ "name": "punctuation.definition.string.begin.ruby"
1200
+ }
1201
+ },
1202
+ "end": "\\1",
1203
+ "endCaptures": {
1204
+ "0": {
1205
+ "name": "punctuation.definition.string.end.ruby"
1206
+ }
1207
+ },
1208
+ "name": "string.quoted.other.interpolated.ruby",
1209
+ "patterns": [
1210
+ {
1211
+ "include": "#interpolated_ruby"
1212
+ },
1213
+ {
1214
+ "include": "#escaped_char"
1215
+ }
1216
+ ]
1217
+ },
1218
+ {
1219
+ "begin": "%([^\\w\\s=])",
1220
+ "beginCaptures": {
1221
+ "0": {
1222
+ "name": "punctuation.definition.string.begin.ruby"
1223
+ }
1224
+ },
1225
+ "end": "\\1",
1226
+ "endCaptures": {
1227
+ "0": {
1228
+ "name": "punctuation.definition.string.end.ruby"
1229
+ }
1230
+ },
1231
+ "name": "string.quoted.other.interpolated.ruby",
1232
+ "patterns": [
1233
+ {
1234
+ "include": "#interpolated_ruby"
1235
+ },
1236
+ {
1237
+ "include": "#escaped_char"
1238
+ }
1239
+ ]
1240
+ },
1241
+ {
1242
+ "begin": "%q\\(",
1243
+ "beginCaptures": {
1244
+ "0": {
1245
+ "name": "punctuation.definition.string.begin.ruby"
1246
+ }
1247
+ },
1248
+ "end": "\\)",
739
1249
  "endCaptures": {
740
1250
  "0": {
741
1251
  "name": "punctuation.definition.string.end.ruby"
742
1252
  }
743
1253
  },
744
- "name": "string.quoted.other.literal.upper.ruby",
1254
+ "name": "string.quoted.other.ruby",
745
1255
  "patterns": [
746
1256
  {
747
- "include": "#interpolated_ruby"
748
- },
749
- {
750
- "include": "#escaped_char"
1257
+ "match": "\\\\\\)|\\\\\\\\",
1258
+ "name": "constant.character.escape.ruby"
751
1259
  },
752
1260
  {
753
- "include": "#nest_brackets_i"
1261
+ "include": "#nest_parens"
754
1262
  }
755
1263
  ]
756
1264
  },
757
1265
  {
758
- "begin": "%[QWSR]?\\<",
1266
+ "begin": "%q<",
759
1267
  "beginCaptures": {
760
1268
  "0": {
761
1269
  "name": "punctuation.definition.string.begin.ruby"
762
1270
  }
763
1271
  },
764
- "comment": "literal capable of interpolation <>",
765
- "end": "\\>",
1272
+ "end": ">",
766
1273
  "endCaptures": {
767
1274
  "0": {
768
1275
  "name": "punctuation.definition.string.end.ruby"
769
1276
  }
770
1277
  },
771
- "name": "string.quoted.other.literal.upper.ruby",
1278
+ "name": "string.quoted.other.ruby",
772
1279
  "patterns": [
773
1280
  {
774
- "include": "#interpolated_ruby"
775
- },
776
- {
777
- "include": "#escaped_char"
1281
+ "match": "\\\\>|\\\\\\\\",
1282
+ "name": "constant.character.escape.ruby"
778
1283
  },
779
1284
  {
780
- "include": "#nest_ltgt_i"
1285
+ "include": "#nest_ltgt"
781
1286
  }
782
1287
  ]
783
1288
  },
784
1289
  {
785
- "begin": "%[QWSR]?\\{",
1290
+ "begin": "%q\\[",
786
1291
  "beginCaptures": {
787
1292
  "0": {
788
1293
  "name": "punctuation.definition.string.begin.ruby"
789
1294
  }
790
1295
  },
791
- "comment": "literal capable of interpolation -- {}",
792
- "end": "\\}",
1296
+ "end": "]",
793
1297
  "endCaptures": {
794
1298
  "0": {
795
1299
  "name": "punctuation.definition.string.end.ruby"
796
1300
  }
797
1301
  },
798
- "name": "string.quoted.double.ruby.mod",
1302
+ "name": "string.quoted.other.ruby",
799
1303
  "patterns": [
800
1304
  {
801
- "include": "#interpolated_ruby"
802
- },
803
- {
804
- "include": "#escaped_char"
1305
+ "match": "\\\\]|\\\\\\\\",
1306
+ "name": "constant.character.escape.ruby"
805
1307
  },
806
1308
  {
807
- "include": "#nest_curly_i"
1309
+ "include": "#nest_brackets"
808
1310
  }
809
1311
  ]
810
1312
  },
811
1313
  {
812
- "begin": "%[QWSR]([\\W_])",
1314
+ "begin": "%q{",
813
1315
  "beginCaptures": {
814
1316
  "0": {
815
1317
  "name": "punctuation.definition.string.begin.ruby"
816
1318
  }
817
1319
  },
818
- "comment": "literal capable of interpolation -- wildcard",
819
- "end": "\\1",
1320
+ "end": "}",
820
1321
  "endCaptures": {
821
1322
  "0": {
822
1323
  "name": "punctuation.definition.string.end.ruby"
823
1324
  }
824
1325
  },
825
- "name": "string.quoted.other.literal.upper.ruby",
1326
+ "name": "string.quoted.other.ruby",
826
1327
  "patterns": [
827
1328
  {
828
- "include": "#interpolated_ruby"
1329
+ "match": "\\\\}|\\\\\\\\",
1330
+ "name": "constant.character.escape.ruby"
829
1331
  },
830
1332
  {
831
- "include": "#escaped_char"
1333
+ "include": "#nest_curly"
832
1334
  }
833
1335
  ]
834
1336
  },
835
1337
  {
836
- "begin": "%([^\\w\\s=])",
1338
+ "begin": "%q([^\\w])",
837
1339
  "beginCaptures": {
838
1340
  "0": {
839
1341
  "name": "punctuation.definition.string.begin.ruby"
840
1342
  }
841
1343
  },
842
- "comment": "literal capable of interpolation -- wildcard",
843
1344
  "end": "\\1",
844
1345
  "endCaptures": {
845
1346
  "0": {
846
1347
  "name": "punctuation.definition.string.end.ruby"
847
1348
  }
848
1349
  },
849
- "name": "string.quoted.other.literal.other.ruby",
1350
+ "name": "string.quoted.other.ruby",
850
1351
  "patterns": [
851
1352
  {
852
- "include": "#interpolated_ruby"
853
- },
854
- {
855
- "include": "#escaped_char"
1353
+ "comment": "Cant be named because its not neccesarily an escape.",
1354
+ "match": "\\\\."
856
1355
  }
857
1356
  ]
858
1357
  },
859
1358
  {
860
- "begin": "%[qws]\\(",
1359
+ "begin": "%s\\(",
861
1360
  "beginCaptures": {
862
1361
  "0": {
863
- "name": "punctuation.definition.string.begin.ruby"
1362
+ "name": "punctuation.definition.symbol.begin.ruby"
864
1363
  }
865
1364
  },
866
- "comment": "literal incapable of interpolation -- ()",
867
1365
  "end": "\\)",
868
1366
  "endCaptures": {
869
1367
  "0": {
870
- "name": "punctuation.definition.string.end.ruby"
1368
+ "name": "punctuation.definition.symbol.end.ruby"
871
1369
  }
872
1370
  },
873
- "name": "string.quoted.other.literal.lower.ruby",
1371
+ "name": "constant.other.symbol.ruby",
874
1372
  "patterns": [
875
1373
  {
876
1374
  "match": "\\\\\\)|\\\\\\\\",
@@ -882,23 +1380,22 @@
882
1380
  ]
883
1381
  },
884
1382
  {
885
- "begin": "%[qws]\\<",
1383
+ "begin": "%s<",
886
1384
  "beginCaptures": {
887
1385
  "0": {
888
- "name": "punctuation.definition.string.begin.ruby"
1386
+ "name": "punctuation.definition.symbol.begin.ruby"
889
1387
  }
890
1388
  },
891
- "comment": "literal incapable of interpolation -- <>",
892
- "end": "\\>",
1389
+ "end": ">",
893
1390
  "endCaptures": {
894
1391
  "0": {
895
- "name": "punctuation.definition.string.end.ruby"
1392
+ "name": "punctuation.definition.symbol.end.ruby"
896
1393
  }
897
1394
  },
898
- "name": "string.quoted.other.literal.lower.ruby",
1395
+ "name": "constant.other.symbol.ruby",
899
1396
  "patterns": [
900
1397
  {
901
- "match": "\\\\\\>|\\\\\\\\",
1398
+ "match": "\\\\>|\\\\\\\\",
902
1399
  "name": "constant.character.escape.ruby"
903
1400
  },
904
1401
  {
@@ -907,23 +1404,22 @@
907
1404
  ]
908
1405
  },
909
1406
  {
910
- "begin": "%[qws]\\[",
1407
+ "begin": "%s\\[",
911
1408
  "beginCaptures": {
912
1409
  "0": {
913
- "name": "punctuation.definition.string.begin.ruby"
1410
+ "name": "punctuation.definition.symbol.begin.ruby"
914
1411
  }
915
1412
  },
916
- "comment": "literal incapable of interpolation -- []",
917
- "end": "\\]",
1413
+ "end": "]",
918
1414
  "endCaptures": {
919
1415
  "0": {
920
- "name": "punctuation.definition.string.end.ruby"
1416
+ "name": "punctuation.definition.symbol.end.ruby"
921
1417
  }
922
1418
  },
923
- "name": "string.quoted.other.literal.lower.ruby",
1419
+ "name": "constant.other.symbol.ruby",
924
1420
  "patterns": [
925
1421
  {
926
- "match": "\\\\\\]|\\\\\\\\",
1422
+ "match": "\\\\]|\\\\\\\\",
927
1423
  "name": "constant.character.escape.ruby"
928
1424
  },
929
1425
  {
@@ -932,23 +1428,22 @@
932
1428
  ]
933
1429
  },
934
1430
  {
935
- "begin": "%[qws]\\{",
1431
+ "begin": "%s{",
936
1432
  "beginCaptures": {
937
1433
  "0": {
938
- "name": "punctuation.definition.string.begin.ruby"
1434
+ "name": "punctuation.definition.symbol.begin.ruby"
939
1435
  }
940
1436
  },
941
- "comment": "literal incapable of interpolation -- {}",
942
- "end": "\\}",
1437
+ "end": "}",
943
1438
  "endCaptures": {
944
1439
  "0": {
945
- "name": "punctuation.definition.string.end.ruby"
1440
+ "name": "punctuation.definition.symbol.end.ruby"
946
1441
  }
947
1442
  },
948
- "name": "string.quoted.other.literal.lower.ruby",
1443
+ "name": "constant.other.symbol.ruby",
949
1444
  "patterns": [
950
1445
  {
951
- "match": "\\\\\\}|\\\\\\\\",
1446
+ "match": "\\\\}|\\\\\\\\",
952
1447
  "name": "constant.character.escape.ruby"
953
1448
  },
954
1449
  {
@@ -957,20 +1452,19 @@
957
1452
  ]
958
1453
  },
959
1454
  {
960
- "begin": "%[qws]([\\W_])",
1455
+ "begin": "%s([^\\w])",
961
1456
  "beginCaptures": {
962
1457
  "0": {
963
- "name": "punctuation.definition.string.begin.ruby"
1458
+ "name": "punctuation.definition.symbol.begin.ruby"
964
1459
  }
965
1460
  },
966
- "comment": "literal incapable of interpolation -- wildcard",
967
1461
  "end": "\\1",
968
1462
  "endCaptures": {
969
1463
  "0": {
970
- "name": "punctuation.definition.string.end.ruby"
1464
+ "name": "punctuation.definition.symbol.end.ruby"
971
1465
  }
972
1466
  },
973
- "name": "string.quoted.other.literal.lower.ruby",
1467
+ "name": "constant.other.symbol.ruby",
974
1468
  "patterns": [
975
1469
  {
976
1470
  "comment": "Cant be named because its not neccesarily an escape.",
@@ -985,7 +1479,7 @@
985
1479
  }
986
1480
  },
987
1481
  "comment": "symbols",
988
- "match": "(?<!:)(:)(?>[a-zA-Z_]\\w*(?>[?!]|=(?![>=]))?|===?|>[>=]?|<[<=]?|<=>|[%&`/\\|]|\\*\\*?|=?~|[-+]@?|\\[\\]=?|@@?[a-zA-Z_]\\w*)",
1482
+ "match": "(?x)\n(?<!:)(:)\n(?>\n [$a-zA-Z_]\\w*(?>[?!]|=(?![>=]))?\n |\n ===?|<=>|>[>=]?|<[<=]?|[%&`/\\|]|\\*\\*?|=?~|[-+]@?|\\[]=?\n |\n @@?[a-zA-Z_]\\w*\n)",
989
1483
  "name": "constant.other.symbol.ruby"
990
1484
  },
991
1485
  {
@@ -1016,7 +1510,12 @@
1016
1510
  }
1017
1511
  },
1018
1512
  "end": "\\n",
1019
- "name": "comment.line.number-sign.ruby"
1513
+ "name": "comment.line.number-sign.ruby",
1514
+ "patterns": [
1515
+ {
1516
+ "include": "#yard"
1517
+ }
1518
+ ]
1020
1519
  }
1021
1520
  ]
1022
1521
  },
@@ -1049,20 +1548,20 @@
1049
1548
  ]
1050
1549
  },
1051
1550
  {
1052
- "begin": "(?=(?><<-(\"?)((?:[_\\w]+_|)HTML)\\b\\1))",
1551
+ "begin": "(?=(?><<[-~](\"?)((?:[_\\w]+_|)HTML)\\b\\1))",
1053
1552
  "comment": "Heredoc with embedded html",
1054
1553
  "end": "(?!\\G)",
1055
1554
  "name": "meta.embedded.block.html",
1056
1555
  "patterns": [
1057
1556
  {
1058
- "begin": "(?><<-(\"?)((?:[_\\w]+_|)HTML)\\b\\1)",
1557
+ "begin": "(?><<[-~](\"?)((?:[_\\w]+_|)HTML)\\b\\1)",
1059
1558
  "beginCaptures": {
1060
1559
  "0": {
1061
1560
  "name": "punctuation.definition.string.begin.ruby"
1062
1561
  }
1063
1562
  },
1064
1563
  "contentName": "text.html",
1065
- "end": "\\s*\\2$\\n?",
1564
+ "end": "^\\s*\\2$\\n?",
1066
1565
  "endCaptures": {
1067
1566
  "0": {
1068
1567
  "name": "punctuation.definition.string.end.ruby"
@@ -1087,20 +1586,58 @@
1087
1586
  ]
1088
1587
  },
1089
1588
  {
1090
- "begin": "(?=(?><<-(\"?)((?:[_\\w]+_|)SQL)\\b\\1))",
1589
+ "begin": "(?=(?><<[-~](\"?)((?:[_\\w]+_|)XML)\\b\\1))",
1590
+ "comment": "Heredoc with embedded xml",
1591
+ "end": "(?!\\G)",
1592
+ "name": "meta.embedded.block.xml",
1593
+ "patterns": [
1594
+ {
1595
+ "begin": "(?><<[-~](\"?)((?:[_\\w]+_|)XML)\\b\\1)",
1596
+ "beginCaptures": {
1597
+ "0": {
1598
+ "name": "punctuation.definition.string.begin.ruby"
1599
+ }
1600
+ },
1601
+ "contentName": "text.xml",
1602
+ "end": "^\\s*\\2$\\n?",
1603
+ "endCaptures": {
1604
+ "0": {
1605
+ "name": "punctuation.definition.string.end.ruby"
1606
+ }
1607
+ },
1608
+ "name": "string.unquoted.heredoc.ruby",
1609
+ "patterns": [
1610
+ {
1611
+ "include": "#heredoc"
1612
+ },
1613
+ {
1614
+ "include": "#interpolated_ruby"
1615
+ },
1616
+ {
1617
+ "include": "text.xml"
1618
+ },
1619
+ {
1620
+ "include": "#escaped_char"
1621
+ }
1622
+ ]
1623
+ }
1624
+ ]
1625
+ },
1626
+ {
1627
+ "begin": "(?=(?><<[-~](\"?)((?:[_\\w]+_|)SQL)\\b\\1))",
1091
1628
  "comment": "Heredoc with embedded sql",
1092
1629
  "end": "(?!\\G)",
1093
1630
  "name": "meta.embedded.block.sql",
1094
1631
  "patterns": [
1095
1632
  {
1096
- "begin": "(?><<-(\"?)((?:[_\\w]+_|)SQL)\\b\\1)",
1633
+ "begin": "(?><<[-~](\"?)((?:[_\\w]+_|)SQL)\\b\\1)",
1097
1634
  "beginCaptures": {
1098
1635
  "0": {
1099
1636
  "name": "punctuation.definition.string.begin.ruby"
1100
1637
  }
1101
1638
  },
1102
1639
  "contentName": "source.sql",
1103
- "end": "\\s*\\2$\\n?",
1640
+ "end": "^\\s*\\2$\\n?",
1104
1641
  "endCaptures": {
1105
1642
  "0": {
1106
1643
  "name": "punctuation.definition.string.end.ruby"
@@ -1125,20 +1662,20 @@
1125
1662
  ]
1126
1663
  },
1127
1664
  {
1128
- "begin": "(?=(?><<-(\"?)((?:[_\\w]+_|)CSS)\\b\\1))",
1129
- "comment": "Heredoc with embedded css",
1665
+ "begin": "(?=(?><<[-~](\"?)((?:[_\\w]+_|)GRAPHQL)\\b\\1))",
1666
+ "comment": "Heredoc with embedded GraphQL",
1130
1667
  "end": "(?!\\G)",
1131
- "name": "meta.embedded.block.css",
1668
+ "name": "meta.embedded.block.graphql",
1132
1669
  "patterns": [
1133
1670
  {
1134
- "begin": "(?><<-(\"?)((?:[_\\w]+_|)CSS)\\b\\1)",
1671
+ "begin": "(?><<[-~](\"?)((?:[_\\w]+_|)GRAPHQL)\\b\\1)",
1135
1672
  "beginCaptures": {
1136
1673
  "0": {
1137
1674
  "name": "punctuation.definition.string.begin.ruby"
1138
1675
  }
1139
1676
  },
1140
- "contentName": "source.css",
1141
- "end": "\\s*\\2$\\n?",
1677
+ "contentName": "source.graphql",
1678
+ "end": "^\\s*\\2$\\n?",
1142
1679
  "endCaptures": {
1143
1680
  "0": {
1144
1681
  "name": "punctuation.definition.string.end.ruby"
@@ -1153,7 +1690,7 @@
1153
1690
  "include": "#interpolated_ruby"
1154
1691
  },
1155
1692
  {
1156
- "include": "source.css"
1693
+ "include": "source.graphql"
1157
1694
  },
1158
1695
  {
1159
1696
  "include": "#escaped_char"
@@ -1163,20 +1700,20 @@
1163
1700
  ]
1164
1701
  },
1165
1702
  {
1166
- "begin": "(?=(?><<-(\"?)((?:[_\\w]+_|)CPP)\\b\\1))",
1167
- "comment": "Heredoc with embedded c++",
1703
+ "begin": "(?=(?><<[-~](\"?)((?:[_\\w]+_|)CSS)\\b\\1))",
1704
+ "comment": "Heredoc with embedded css",
1168
1705
  "end": "(?!\\G)",
1169
- "name": "meta.embedded.block.c++",
1706
+ "name": "meta.embedded.block.css",
1170
1707
  "patterns": [
1171
1708
  {
1172
- "begin": "(?><<-(\"?)((?:[_\\w]+_|)CPP)\\b\\1)",
1709
+ "begin": "(?><<[-~](\"?)((?:[_\\w]+_|)CSS)\\b\\1)",
1173
1710
  "beginCaptures": {
1174
1711
  "0": {
1175
1712
  "name": "punctuation.definition.string.begin.ruby"
1176
1713
  }
1177
1714
  },
1178
- "contentName": "source.c++",
1179
- "end": "\\s*\\2$\\n?",
1715
+ "contentName": "source.css",
1716
+ "end": "^\\s*\\2$\\n?",
1180
1717
  "endCaptures": {
1181
1718
  "0": {
1182
1719
  "name": "punctuation.definition.string.end.ruby"
@@ -1191,7 +1728,7 @@
1191
1728
  "include": "#interpolated_ruby"
1192
1729
  },
1193
1730
  {
1194
- "include": "source.c++"
1731
+ "include": "source.css"
1195
1732
  },
1196
1733
  {
1197
1734
  "include": "#escaped_char"
@@ -1201,20 +1738,20 @@
1201
1738
  ]
1202
1739
  },
1203
1740
  {
1204
- "begin": "(?=(?><<-(\"?)((?:[_\\w]+_|)C)\\b\\1))",
1205
- "comment": "Heredoc with embedded c",
1741
+ "begin": "(?=(?><<[-~](\"?)((?:[_\\w]+_|)CPP)\\b\\1))",
1742
+ "comment": "Heredoc with embedded c++",
1206
1743
  "end": "(?!\\G)",
1207
- "name": "meta.embedded.block.c",
1744
+ "name": "meta.embedded.block.cpp",
1208
1745
  "patterns": [
1209
1746
  {
1210
- "begin": "(?><<-(\"?)((?:[_\\w]+_|)C)\\b\\1)",
1747
+ "begin": "(?><<[-~](\"?)((?:[_\\w]+_|)CPP)\\b\\1)",
1211
1748
  "beginCaptures": {
1212
1749
  "0": {
1213
1750
  "name": "punctuation.definition.string.begin.ruby"
1214
1751
  }
1215
1752
  },
1216
- "contentName": "source.c",
1217
- "end": "\\s*\\2$\\n?",
1753
+ "contentName": "source.cpp",
1754
+ "end": "^\\s*\\2$\\n?",
1218
1755
  "endCaptures": {
1219
1756
  "0": {
1220
1757
  "name": "punctuation.definition.string.end.ruby"
@@ -1229,7 +1766,7 @@
1229
1766
  "include": "#interpolated_ruby"
1230
1767
  },
1231
1768
  {
1232
- "include": "source.c"
1769
+ "include": "source.cpp"
1233
1770
  },
1234
1771
  {
1235
1772
  "include": "#escaped_char"
@@ -1239,20 +1776,20 @@
1239
1776
  ]
1240
1777
  },
1241
1778
  {
1242
- "begin": "(?=(?><<-(\"?)((?:[_\\w]+_|)(?:JS|JAVASCRIPT))\\b\\1))",
1243
- "comment": "Heredoc with embedded javascript",
1779
+ "begin": "(?=(?><<[-~](\"?)((?:[_\\w]+_|)C)\\b\\1))",
1780
+ "comment": "Heredoc with embedded c",
1244
1781
  "end": "(?!\\G)",
1245
- "name": "meta.embedded.block.js",
1782
+ "name": "meta.embedded.block.c",
1246
1783
  "patterns": [
1247
1784
  {
1248
- "begin": "(?><<-(\"?)((?:[_\\w]+_|)(?:JS|JAVASCRIPT))\\b\\1)",
1785
+ "begin": "(?><<[-~](\"?)((?:[_\\w]+_|)C)\\b\\1)",
1249
1786
  "beginCaptures": {
1250
1787
  "0": {
1251
1788
  "name": "punctuation.definition.string.begin.ruby"
1252
1789
  }
1253
1790
  },
1254
- "contentName": "source.js",
1255
- "end": "\\s*\\2$\\n?",
1791
+ "contentName": "source.c",
1792
+ "end": "^\\s*\\2$\\n?",
1256
1793
  "endCaptures": {
1257
1794
  "0": {
1258
1795
  "name": "punctuation.definition.string.end.ruby"
@@ -1267,7 +1804,7 @@
1267
1804
  "include": "#interpolated_ruby"
1268
1805
  },
1269
1806
  {
1270
- "include": "source.js"
1807
+ "include": "source.c"
1271
1808
  },
1272
1809
  {
1273
1810
  "include": "#escaped_char"
@@ -1277,20 +1814,20 @@
1277
1814
  ]
1278
1815
  },
1279
1816
  {
1280
- "begin": "(?=(?><<-(\"?)((?:[_\\w]+_|)JQUERY)\\b\\1))",
1281
- "comment": "Heredoc with embedded jQuery javascript",
1817
+ "begin": "(?=(?><<[-~](\"?)((?:[_\\w]+_|)(?:JS|JAVASCRIPT))\\b\\1))",
1818
+ "comment": "Heredoc with embedded javascript",
1282
1819
  "end": "(?!\\G)",
1283
- "name": "meta.embedded.block.js.jquery",
1820
+ "name": "meta.embedded.block.js",
1284
1821
  "patterns": [
1285
1822
  {
1286
- "begin": "(?><<-(\"?)((?:[_\\w]+_|)JQUERY)\\b\\1)",
1823
+ "begin": "(?><<[-~](\"?)((?:[_\\w]+_|)(?:JS|JAVASCRIPT))\\b\\1)",
1287
1824
  "beginCaptures": {
1288
1825
  "0": {
1289
1826
  "name": "punctuation.definition.string.begin.ruby"
1290
1827
  }
1291
1828
  },
1292
- "contentName": "source.js.jquery",
1293
- "end": "\\s*\\2$\\n?",
1829
+ "contentName": "source.js",
1830
+ "end": "^\\s*\\2$\\n?",
1294
1831
  "endCaptures": {
1295
1832
  "0": {
1296
1833
  "name": "punctuation.definition.string.end.ruby"
@@ -1305,7 +1842,7 @@
1305
1842
  "include": "#interpolated_ruby"
1306
1843
  },
1307
1844
  {
1308
- "include": "source.js.jquery"
1845
+ "include": "source.js"
1309
1846
  },
1310
1847
  {
1311
1848
  "include": "#escaped_char"
@@ -1315,20 +1852,20 @@
1315
1852
  ]
1316
1853
  },
1317
1854
  {
1318
- "begin": "(?=(?><<-(\"?)((?:[_\\w]+_|)(?:SH|SHELL))\\b\\1))",
1319
- "comment": "Heredoc with embedded shell",
1855
+ "begin": "(?=(?><<[-~](\"?)((?:[_\\w]+_|)JQUERY)\\b\\1))",
1856
+ "comment": "Heredoc with embedded jQuery javascript",
1320
1857
  "end": "(?!\\G)",
1321
- "name": "meta.embedded.block.shell",
1858
+ "name": "meta.embedded.block.js.jquery",
1322
1859
  "patterns": [
1323
1860
  {
1324
- "begin": "(?><<-(\"?)((?:[_\\w]+_|)(?:SH|SHELL))\\b\\1)",
1861
+ "begin": "(?><<[-~](\"?)((?:[_\\w]+_|)JQUERY)\\b\\1)",
1325
1862
  "beginCaptures": {
1326
1863
  "0": {
1327
1864
  "name": "punctuation.definition.string.begin.ruby"
1328
1865
  }
1329
1866
  },
1330
- "contentName": "source.shell",
1331
- "end": "\\s*\\2$\\n?",
1867
+ "contentName": "source.js.jquery",
1868
+ "end": "^\\s*\\2$\\n?",
1332
1869
  "endCaptures": {
1333
1870
  "0": {
1334
1871
  "name": "punctuation.definition.string.end.ruby"
@@ -1343,7 +1880,7 @@
1343
1880
  "include": "#interpolated_ruby"
1344
1881
  },
1345
1882
  {
1346
- "include": "source.shell"
1883
+ "include": "source.js.jquery"
1347
1884
  },
1348
1885
  {
1349
1886
  "include": "#escaped_char"
@@ -1353,20 +1890,20 @@
1353
1890
  ]
1354
1891
  },
1355
1892
  {
1356
- "begin": "(?=(?><<-(\"?)((?:[_\\w]+_|)LUA)\\b\\1))",
1357
- "comment": "Heredoc with embedded lua",
1893
+ "begin": "(?=(?><<[-~](\"?)((?:[_\\w]+_|)(?:SH|SHELL))\\b\\1))",
1894
+ "comment": "Heredoc with embedded shell",
1358
1895
  "end": "(?!\\G)",
1359
- "name": "meta.embedded.block.lua",
1896
+ "name": "meta.embedded.block.shell",
1360
1897
  "patterns": [
1361
1898
  {
1362
- "begin": "(?><<-(\"?)((?:[_\\w]+_|)LUA)\\b\\1)",
1899
+ "begin": "(?><<[-~](\"?)((?:[_\\w]+_|)(?:SH|SHELL))\\b\\1)",
1363
1900
  "beginCaptures": {
1364
1901
  "0": {
1365
1902
  "name": "punctuation.definition.string.begin.ruby"
1366
1903
  }
1367
1904
  },
1368
- "contentName": "source.lua",
1369
- "end": "\\s*\\2$\\n?",
1905
+ "contentName": "source.shell",
1906
+ "end": "^\\s*\\2$\\n?",
1370
1907
  "endCaptures": {
1371
1908
  "0": {
1372
1909
  "name": "punctuation.definition.string.end.ruby"
@@ -1381,7 +1918,7 @@
1381
1918
  "include": "#interpolated_ruby"
1382
1919
  },
1383
1920
  {
1384
- "include": "source.lua"
1921
+ "include": "source.shell"
1385
1922
  },
1386
1923
  {
1387
1924
  "include": "#escaped_char"
@@ -1391,20 +1928,20 @@
1391
1928
  ]
1392
1929
  },
1393
1930
  {
1394
- "begin": "(?=(?><<-(\"?)((?:[_\\w]+_|)RUBY)\\b\\1))",
1395
- "comment": "Heredoc with embedded ruby",
1931
+ "begin": "(?=(?><<[-~](\"?)((?:[_\\w]+_|)LUA)\\b\\1))",
1932
+ "comment": "Heredoc with embedded lua",
1396
1933
  "end": "(?!\\G)",
1397
- "name": "meta.embedded.block.ruby",
1934
+ "name": "meta.embedded.block.lua",
1398
1935
  "patterns": [
1399
1936
  {
1400
- "begin": "(?><<-(\"?)((?:[_\\w]+_|)RUBY)\\b\\1)",
1937
+ "begin": "(?><<[-~](\"?)((?:[_\\w]+_|)LUA)\\b\\1)",
1401
1938
  "beginCaptures": {
1402
1939
  "0": {
1403
1940
  "name": "punctuation.definition.string.begin.ruby"
1404
1941
  }
1405
1942
  },
1406
- "contentName": "source.ruby",
1407
- "end": "\\s*\\2$\\n?",
1943
+ "contentName": "source.lua",
1944
+ "end": "^\\s*\\2$\\n?",
1408
1945
  "endCaptures": {
1409
1946
  "0": {
1410
1947
  "name": "punctuation.definition.string.end.ruby"
@@ -1419,7 +1956,7 @@
1419
1956
  "include": "#interpolated_ruby"
1420
1957
  },
1421
1958
  {
1422
- "include": "source.ruby"
1959
+ "include": "source.lua"
1423
1960
  },
1424
1961
  {
1425
1962
  "include": "#escaped_char"
@@ -1429,20 +1966,20 @@
1429
1966
  ]
1430
1967
  },
1431
1968
  {
1432
- "begin": "(?=(?><<-(\"?)((?:[_\\w]+_|)GRAPHQL)\\b\\1))",
1433
- "comment": "Heredoc with embedded GraphQL",
1969
+ "begin": "(?=(?><<[-~](\"?)((?:[_\\w]+_|)RUBY)\\b\\1))",
1970
+ "comment": "Heredoc with embedded ruby",
1434
1971
  "end": "(?!\\G)",
1435
- "name": "meta.embedded.block.graphql",
1972
+ "name": "meta.embedded.block.ruby",
1436
1973
  "patterns": [
1437
1974
  {
1438
- "begin": "(?><<-(\"?)((?:[_\\w]+_|)GRAPHQL)\\b\\1)",
1975
+ "begin": "(?><<[-~](\"?)((?:[_\\w]+_|)RUBY)\\b\\1)",
1439
1976
  "beginCaptures": {
1440
1977
  "0": {
1441
1978
  "name": "punctuation.definition.string.begin.ruby"
1442
1979
  }
1443
1980
  },
1444
- "contentName": "source.graphql",
1445
- "end": "\\s*\\2$\\n?",
1981
+ "contentName": "source.ruby",
1982
+ "end": "^\\s*\\2$\\n?",
1446
1983
  "endCaptures": {
1447
1984
  "0": {
1448
1985
  "name": "punctuation.definition.string.end.ruby"
@@ -1457,7 +1994,7 @@
1457
1994
  "include": "#interpolated_ruby"
1458
1995
  },
1459
1996
  {
1460
- "include": "source.graphql"
1997
+ "include": "source.ruby"
1461
1998
  },
1462
1999
  {
1463
2000
  "include": "#escaped_char"
@@ -1467,7 +2004,7 @@
1467
2004
  ]
1468
2005
  },
1469
2006
  {
1470
- "begin": "(?>[=,]\\s*<<(\\w+))",
2007
+ "begin": "(?>=\\s*<<(\\w+))",
1471
2008
  "beginCaptures": {
1472
2009
  "0": {
1473
2010
  "name": "punctuation.definition.string.begin.ruby"
@@ -1493,14 +2030,14 @@
1493
2030
  ]
1494
2031
  },
1495
2032
  {
1496
- "begin": "(?><<-(\\w+))",
2033
+ "begin": "(?>((<<[-~](\\w+),\\s?)*<<[-~](\\w+)))",
1497
2034
  "beginCaptures": {
1498
2035
  "0": {
1499
2036
  "name": "punctuation.definition.string.begin.ruby"
1500
2037
  }
1501
2038
  },
1502
- "comment": "heredoc with indented terminator",
1503
- "end": "\\s*\\1$",
2039
+ "comment": "heredoc with multiple inputs and indented terminator",
2040
+ "end": "^\\s*\\4$",
1504
2041
  "endCaptures": {
1505
2042
  "0": {
1506
2043
  "name": "punctuation.definition.string.end.ruby"
@@ -1520,14 +2057,17 @@
1520
2057
  ]
1521
2058
  },
1522
2059
  {
1523
- "begin": "(?<=\\{|do|\\{\\s|do\\s)(\\|)",
2060
+ "begin": "(?<={|{\\s|[^A-Za-z0-9_]do|^do|[^A-Za-z0-9_]do\\s|^do\\s)(\\|)",
1524
2061
  "captures": {
1525
2062
  "1": {
1526
2063
  "name": "punctuation.separator.variable.ruby"
1527
2064
  }
1528
2065
  },
1529
- "end": "(\\|)",
2066
+ "end": "(?<!\\|)(\\|)(?!\\|)",
1530
2067
  "patterns": [
2068
+ {
2069
+ "include": "source.ruby"
2070
+ },
1531
2071
  {
1532
2072
  "match": "[_a-zA-Z][_a-zA-Z0-9]*",
1533
2073
  "name": "variable.other.block.ruby"
@@ -1543,7 +2083,11 @@
1543
2083
  "name": "punctuation.separator.key-value"
1544
2084
  },
1545
2085
  {
1546
- "match": "<<=|%=|&=|\\*=|\\*\\*=|/=|\\+=|\\-=|\\^=|\\|{1,2}=|<<",
2086
+ "match": "->",
2087
+ "name": "support.function.kernel.ruby"
2088
+ },
2089
+ {
2090
+ "match": "<<=|%=|&{1,2}=|\\*=|\\*\\*=|\\+=|-=|\\^=|\\|{1,2}=|<<",
1547
2091
  "name": "keyword.operator.assignment.augmented.ruby"
1548
2092
  },
1549
2093
  {
@@ -1551,11 +2095,24 @@
1551
2095
  "name": "keyword.operator.comparison.ruby"
1552
2096
  },
1553
2097
  {
1554
- "match": "(?<=[ \\t])!+|\\bnot\\b|&&|\\band\\b|\\|\\||\\bor\\b|\\^",
2098
+ "match": "(?<!\\.)\\b(and|not|or)\\b(?![?!])",
2099
+ "name": "keyword.operator.logical.ruby"
2100
+ },
2101
+ {
2102
+ "match": "(?<=^|[ \\t])!|&&|\\|\\||\\^",
1555
2103
  "name": "keyword.operator.logical.ruby"
1556
2104
  },
1557
2105
  {
1558
- "match": "(%|&|\\*\\*|\\*|\\+|\\-|/)",
2106
+ "comment": "Safe navigation operator",
2107
+ "match": "(&\\.)\\s*(?![A-Z])",
2108
+ "captures": {
2109
+ "1": {
2110
+ "name": "punctuation.separator.method.ruby"
2111
+ }
2112
+ }
2113
+ },
2114
+ {
2115
+ "match": "(%|&|\\*\\*|\\*|\\+|-|/)",
1559
2116
  "name": "keyword.operator.arithmetic.ruby"
1560
2117
  },
1561
2118
  {
@@ -1567,11 +2124,7 @@
1567
2124
  "name": "keyword.operator.other.ruby"
1568
2125
  },
1569
2126
  {
1570
- "match": ":",
1571
- "name": "punctuation.separator.other.ruby"
1572
- },
1573
- {
1574
- "match": "\\;",
2127
+ "match": ";",
1575
2128
  "name": "punctuation.separator.statement.ruby"
1576
2129
  },
1577
2130
  {
@@ -1579,15 +2132,34 @@
1579
2132
  "name": "punctuation.separator.object.ruby"
1580
2133
  },
1581
2134
  {
1582
- "match": "\\.|::",
1583
- "name": "punctuation.separator.method.ruby"
2135
+ "comment": "Mark as namespace separator if double colons followed by capital letter",
2136
+ "match": "(::)\\s*(?=[A-Z])",
2137
+ "captures": {
2138
+ "1": {
2139
+ "name": "punctuation.separator.namespace.ruby"
2140
+ }
2141
+ }
2142
+ },
2143
+ {
2144
+ "comment": "Mark as method separator if double colons not followed by capital letter",
2145
+ "match": "(\\.|::)\\s*(?![A-Z])",
2146
+ "captures": {
2147
+ "1": {
2148
+ "name": "punctuation.separator.method.ruby"
2149
+ }
2150
+ }
2151
+ },
2152
+ {
2153
+ "comment": "Must come after method and constant separators to prefer double colons",
2154
+ "match": ":",
2155
+ "name": "punctuation.separator.other.ruby"
1584
2156
  },
1585
2157
  {
1586
- "match": "\\{",
2158
+ "match": "{",
1587
2159
  "name": "punctuation.section.scope.begin.ruby"
1588
2160
  },
1589
2161
  {
1590
- "match": "\\}",
2162
+ "match": "}",
1591
2163
  "name": "punctuation.section.scope.end.ruby"
1592
2164
  },
1593
2165
  {
@@ -1595,7 +2167,7 @@
1595
2167
  "name": "punctuation.section.array.begin.ruby"
1596
2168
  },
1597
2169
  {
1598
- "match": "\\]",
2170
+ "match": "]",
1599
2171
  "name": "punctuation.section.array.end.ruby"
1600
2172
  },
1601
2173
  {
@@ -1609,7 +2181,7 @@
1609
2181
  "name": "constant.character.escape.ruby"
1610
2182
  },
1611
2183
  "heredoc": {
1612
- "begin": "^<<-?\\w+",
2184
+ "begin": "^<<[-~]?\\w+",
1613
2185
  "end": "$",
1614
2186
  "patterns": [
1615
2187
  {
@@ -1620,20 +2192,17 @@
1620
2192
  "interpolated_ruby": {
1621
2193
  "patterns": [
1622
2194
  {
1623
- "begin": "#\\{",
2195
+ "begin": "#{",
1624
2196
  "beginCaptures": {
1625
2197
  "0": {
1626
2198
  "name": "punctuation.section.embedded.begin.ruby"
1627
2199
  }
1628
2200
  },
1629
2201
  "contentName": "source.ruby",
1630
- "end": "(\\})",
2202
+ "end": "}",
1631
2203
  "endCaptures": {
1632
2204
  "0": {
1633
2205
  "name": "punctuation.section.embedded.end.ruby"
1634
- },
1635
- "1": {
1636
- "name": "source.ruby"
1637
2206
  }
1638
2207
  },
1639
2208
  "name": "meta.embedded.line.ruby",
@@ -1682,7 +2251,7 @@
1682
2251
  "name": "punctuation.section.scope.ruby"
1683
2252
  }
1684
2253
  },
1685
- "end": "\\]",
2254
+ "end": "]",
1686
2255
  "patterns": [
1687
2256
  {
1688
2257
  "include": "#nest_brackets"
@@ -1696,7 +2265,7 @@
1696
2265
  "name": "punctuation.section.scope.ruby"
1697
2266
  }
1698
2267
  },
1699
- "end": "\\]",
2268
+ "end": "]",
1700
2269
  "patterns": [
1701
2270
  {
1702
2271
  "include": "#interpolated_ruby"
@@ -1716,7 +2285,7 @@
1716
2285
  "name": "punctuation.section.scope.ruby"
1717
2286
  }
1718
2287
  },
1719
- "end": "\\]",
2288
+ "end": "]",
1720
2289
  "patterns": [
1721
2290
  {
1722
2291
  "include": "#regex_sub"
@@ -1727,13 +2296,13 @@
1727
2296
  ]
1728
2297
  },
1729
2298
  "nest_curly": {
1730
- "begin": "\\{",
2299
+ "begin": "{",
1731
2300
  "captures": {
1732
2301
  "0": {
1733
2302
  "name": "punctuation.section.scope.ruby"
1734
2303
  }
1735
2304
  },
1736
- "end": "\\}",
2305
+ "end": "}",
1737
2306
  "patterns": [
1738
2307
  {
1739
2308
  "include": "#nest_curly"
@@ -1743,13 +2312,13 @@
1743
2312
  "nest_curly_and_self": {
1744
2313
  "patterns": [
1745
2314
  {
1746
- "begin": "\\{",
2315
+ "begin": "{",
1747
2316
  "captures": {
1748
2317
  "0": {
1749
2318
  "name": "punctuation.section.scope.ruby"
1750
2319
  }
1751
2320
  },
1752
- "end": "\\}",
2321
+ "end": "}",
1753
2322
  "patterns": [
1754
2323
  {
1755
2324
  "include": "#nest_curly_and_self"
@@ -1762,13 +2331,13 @@
1762
2331
  ]
1763
2332
  },
1764
2333
  "nest_curly_i": {
1765
- "begin": "\\{",
2334
+ "begin": "{",
1766
2335
  "captures": {
1767
2336
  "0": {
1768
2337
  "name": "punctuation.section.scope.ruby"
1769
2338
  }
1770
2339
  },
1771
- "end": "\\}",
2340
+ "end": "}",
1772
2341
  "patterns": [
1773
2342
  {
1774
2343
  "include": "#interpolated_ruby"
@@ -1782,13 +2351,13 @@
1782
2351
  ]
1783
2352
  },
1784
2353
  "nest_curly_r": {
1785
- "begin": "\\{",
2354
+ "begin": "{",
1786
2355
  "captures": {
1787
2356
  "0": {
1788
2357
  "name": "punctuation.section.scope.ruby"
1789
2358
  }
1790
2359
  },
1791
- "end": "\\}",
2360
+ "end": "}",
1792
2361
  "patterns": [
1793
2362
  {
1794
2363
  "include": "#regex_sub"
@@ -1799,13 +2368,13 @@
1799
2368
  ]
1800
2369
  },
1801
2370
  "nest_ltgt": {
1802
- "begin": "\\<",
2371
+ "begin": "<",
1803
2372
  "captures": {
1804
2373
  "0": {
1805
2374
  "name": "punctuation.section.scope.ruby"
1806
2375
  }
1807
2376
  },
1808
- "end": "\\>",
2377
+ "end": ">",
1809
2378
  "patterns": [
1810
2379
  {
1811
2380
  "include": "#nest_ltgt"
@@ -1813,13 +2382,13 @@
1813
2382
  ]
1814
2383
  },
1815
2384
  "nest_ltgt_i": {
1816
- "begin": "\\<",
2385
+ "begin": "<",
1817
2386
  "captures": {
1818
2387
  "0": {
1819
2388
  "name": "punctuation.section.scope.ruby"
1820
2389
  }
1821
2390
  },
1822
- "end": "\\>",
2391
+ "end": ">",
1823
2392
  "patterns": [
1824
2393
  {
1825
2394
  "include": "#interpolated_ruby"
@@ -1833,13 +2402,13 @@
1833
2402
  ]
1834
2403
  },
1835
2404
  "nest_ltgt_r": {
1836
- "begin": "\\<",
2405
+ "begin": "<",
1837
2406
  "captures": {
1838
2407
  "0": {
1839
2408
  "name": "punctuation.section.scope.ruby"
1840
2409
  }
1841
2410
  },
1842
- "end": "\\>",
2411
+ "end": ">",
1843
2412
  "patterns": [
1844
2413
  {
1845
2414
  "include": "#regex_sub"
@@ -1911,23 +2480,23 @@
1911
2480
  {
1912
2481
  "captures": {
1913
2482
  "1": {
1914
- "name": "punctuation.definition.arbitrary-repitition.ruby"
2483
+ "name": "punctuation.definition.arbitrary-repetition.ruby"
1915
2484
  },
1916
2485
  "3": {
1917
- "name": "punctuation.definition.arbitrary-repitition.ruby"
2486
+ "name": "punctuation.definition.arbitrary-repetition.ruby"
1918
2487
  }
1919
2488
  },
1920
- "match": "(\\{)\\d+(,\\d+)?(\\})",
1921
- "name": "string.regexp.arbitrary-repitition.ruby"
2489
+ "match": "({)\\d+(,\\d+)?(})",
2490
+ "name": "string.regexp.arbitrary-repetition.ruby"
1922
2491
  },
1923
2492
  {
1924
- "begin": "\\[(?:\\^?\\])?",
2493
+ "begin": "\\[(?:\\^?])?",
1925
2494
  "captures": {
1926
2495
  "0": {
1927
2496
  "name": "punctuation.definition.character-class.ruby"
1928
2497
  }
1929
2498
  },
1930
- "end": "\\]",
2499
+ "end": "]",
1931
2500
  "name": "string.regexp.character-class.ruby",
1932
2501
  "patterns": [
1933
2502
  {
@@ -1987,8 +2556,140 @@
1987
2556
  "name": "comment.line.number-sign.ruby"
1988
2557
  }
1989
2558
  ]
2559
+ },
2560
+ "yard": {
2561
+ "name": "comment.line.yard.ruby",
2562
+ "patterns": [
2563
+ {
2564
+ "include": "#yard_comment"
2565
+ },
2566
+ {
2567
+ "include": "#yard_name_types"
2568
+ },
2569
+ {
2570
+ "include": "#yard_tag"
2571
+ },
2572
+ {
2573
+ "include": "#yard_types"
2574
+ },
2575
+ {
2576
+ "include": "#yard_directive"
2577
+ }
2578
+ ]
2579
+ },
2580
+ "yard_comment": {
2581
+ "comment": "For YARD tags that follow the tag-comment pattern",
2582
+ "match": "(@)(abstract|api|author|deprecated|example|note|overload|since|todo|version)(?=\\s)(.*)$",
2583
+ "captures": {
2584
+ "1": {
2585
+ "name": "comment.line.keyword.punctuation.yard.ruby"
2586
+ },
2587
+ "2": {
2588
+ "name": "comment.line.keyword.yard.ruby"
2589
+ },
2590
+ "3": {
2591
+ "name": "comment.line.string.yard.ruby"
2592
+ }
2593
+ }
2594
+ },
2595
+ "yard_name_types": {
2596
+ "comment": "For YARD tags that follow the tag-name-types-comment pattern",
2597
+ "match": "(@)(attr|attr_reader|attr_writer|option|param|see|yieldparam)(?=\\s)(\\s+([a-z_][a-zA-Z_]*))?(\\s+((\\[).+(])))?(.*)$",
2598
+ "captures": {
2599
+ "1": {
2600
+ "name": "comment.line.keyword.punctuation.yard.ruby"
2601
+ },
2602
+ "2": {
2603
+ "name": "comment.line.keyword.yard.ruby"
2604
+ },
2605
+ "3": {
2606
+ "name": "comment.line.yard.ruby"
2607
+ },
2608
+ "4": {
2609
+ "name": "comment.line.parameter.yard.ruby"
2610
+ },
2611
+ "5": {
2612
+ "name": "comment.line.yard.ruby"
2613
+ },
2614
+ "6": {
2615
+ "name": "comment.line.type.yard.ruby"
2616
+ },
2617
+ "7": {
2618
+ "name": "comment.line.punctuation.yard.ruby"
2619
+ },
2620
+ "8": {
2621
+ "name": "comment.line.punctuation.yard.ruby"
2622
+ },
2623
+ "9": {
2624
+ "name": "comment.line.string.yard.ruby"
2625
+ }
2626
+ }
2627
+ },
2628
+ "yard_tag": {
2629
+ "comment": "For YARD tags that are just the tag",
2630
+ "match": "(@)(private)$",
2631
+ "captures": {
2632
+ "1": {
2633
+ "name": "comment.line.keyword.punctuation.yard.ruby"
2634
+ },
2635
+ "2": {
2636
+ "name": "comment.line.keyword.yard.ruby"
2637
+ }
2638
+ }
2639
+ },
2640
+ "yard_types": {
2641
+ "comment": "For YARD tags that follow the tag-types-comment pattern",
2642
+ "match": "(@)(raise|return|yield(?:return)?)(?=\\s)(\\s+((\\[).+(])))?(.*)$",
2643
+ "captures": {
2644
+ "1": {
2645
+ "name": "comment.line.keyword.punctuation.yard.ruby"
2646
+ },
2647
+ "2": {
2648
+ "name": "comment.line.keyword.yard.ruby"
2649
+ },
2650
+ "3": {
2651
+ "name": "comment.line.yard.ruby"
2652
+ },
2653
+ "4": {
2654
+ "name": "comment.line.type.yard.ruby"
2655
+ },
2656
+ "5": {
2657
+ "name": "comment.line.punctuation.yard.ruby"
2658
+ },
2659
+ "6": {
2660
+ "name": "comment.line.punctuation.yard.ruby"
2661
+ },
2662
+ "7": {
2663
+ "name": "comment.line.string.yard.ruby"
2664
+ }
2665
+ }
2666
+ },
2667
+ "yard_directive": {
2668
+ "comment": "For YARD directives",
2669
+ "match": "(@!)(attribute|endgroup|group|macro|method|parse|scope|visibility)(\\s+((\\[).+(])))?(?=\\s)(.*)$",
2670
+ "captures": {
2671
+ "1": {
2672
+ "name": "comment.line.keyword.punctuation.yard.ruby"
2673
+ },
2674
+ "2": {
2675
+ "name": "comment.line.keyword.yard.ruby"
2676
+ },
2677
+ "3": {
2678
+ "name": "comment.line.yard.ruby"
2679
+ },
2680
+ "4": {
2681
+ "name": "comment.line.type.yard.ruby"
2682
+ },
2683
+ "5": {
2684
+ "name": "comment.line.punctuation.yard.ruby"
2685
+ },
2686
+ "6": {
2687
+ "name": "comment.line.punctuation.yard.ruby"
2688
+ },
2689
+ "7": {
2690
+ "name": "comment.line.string.yard.ruby"
2691
+ }
2692
+ }
1990
2693
  }
1991
- },
1992
- "scopeName": "source.ruby",
1993
- "uuid": "E00B62AC-6B1C-11D9-9B1F-000D93589AF6"
2694
+ }
1994
2695
  }