italian-ruby 1.5.16 → 1.6.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,2019 @@
1
+ {
2
+ "name": "Italian Ruby",
3
+ "scopeName": "source.italianruby",
4
+ "patterns": [
5
+ {
6
+ "captures": {
7
+ "1": {
8
+ "name": "keyword.control.class.ruby"
9
+ },
10
+ "2": {
11
+ "name": "entity.name.type.class.ruby"
12
+ },
13
+ "3": {
14
+ "name": "keyword.operator.other.ruby"
15
+ },
16
+ "4": {
17
+ "name": "entity.other.inherited-class.ruby"
18
+ },
19
+ "5": {
20
+ "name": "keyword.operator.other.ruby"
21
+ },
22
+ "6": {
23
+ "name": "variable.other.object.ruby"
24
+ }
25
+ },
26
+ "match": "^\\s*(classe)\\s+(?:([.a-zA-Z0-9_:]+)(?:\\s*(<)\\s*([.a-zA-Z0-9_:]+))?|(<<)\\s*([.a-zA-Z0-9_:]+))",
27
+ "name": "meta.class.ruby"
28
+ },
29
+ {
30
+ "captures": {
31
+ "1": {
32
+ "name": "keyword.control.module.ruby"
33
+ },
34
+ "2": {
35
+ "name": "entity.name.type.module.ruby"
36
+ },
37
+ "3": {
38
+ "name": "entity.other.inherited-class.module.first.ruby"
39
+ },
40
+ "4": {
41
+ "name": "punctuation.separator.inheritance.ruby"
42
+ },
43
+ "5": {
44
+ "name": "entity.other.inherited-class.module.second.ruby"
45
+ },
46
+ "6": {
47
+ "name": "punctuation.separator.inheritance.ruby"
48
+ },
49
+ "7": {
50
+ "name": "entity.other.inherited-class.module.third.ruby"
51
+ },
52
+ "8": {
53
+ "name": "punctuation.separator.inheritance.ruby"
54
+ }
55
+ },
56
+ "match": "^\\s*(module)\\s+(([A-Z]\\w*(::))?([A-Z]\\w*(::))?([A-Z]\\w*(::))*[A-Z]\\w*)",
57
+ "name": "meta.module.ruby"
58
+ },
59
+ {
60
+ "comment": "everything being a reserved word, not a value and needing a 'end' is a..",
61
+ "match": "(?<!\\.)\\b(INIZIA|inizia|considera|classe|altrimenti|altrimenti_se|FINE|fine|assicura|per|se|in|modulo|recupera|allora|a_meno_che|finché|quando|mentre)\\b(?![?!])",
62
+ "name": "keyword.control.ruby"
63
+ },
64
+ {
65
+ "match": "\\b[A-Z]\\w*(?=((\\.|::)[A-Za-z]|\\[))",
66
+ "name": "support.class.ruby"
67
+ },
68
+ {
69
+ "match": "\\b[A-Z]\\w*\\b",
70
+ "name": "support.class.ruby"
71
+ },
72
+ {
73
+ "begin": "(?x)\n\t\t\t (?=def|definisci\\b) # an optimization to help Oniguruma fail fast\n\t\t\t (?<=^|\\s)(def|definisci)\\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 ",
74
+ "beginCaptures": {
75
+ "1": {
76
+ "name": "keyword.control.def.ruby"
77
+ },
78
+ "2": {
79
+ "name": "entity.name.function.ruby"
80
+ },
81
+ "3": {
82
+ "name": "punctuation.definition.parameters.ruby"
83
+ }
84
+ },
85
+ "comment": "the method pattern comes from the symbol pattern, see there for a explaination",
86
+ "end": "\\)",
87
+ "endCaptures": {
88
+ "0": {
89
+ "name": "punctuation.definition.parameters.ruby"
90
+ }
91
+ },
92
+ "name": "meta.function.method.with-arguments.ruby",
93
+ "patterns": [
94
+ {
95
+ "begin": "(?=[&*_a-zA-Z])",
96
+ "end": "(?=[,)])",
97
+ "patterns": [
98
+ {
99
+ "captures": {
100
+ "1": {
101
+ "name": "storage.type.variable.ruby"
102
+ },
103
+ "2": {
104
+ "name": "constant.other.symbol.hashkey.parameter.function.ruby"
105
+ },
106
+ "3": {
107
+ "name": "punctuation.definition.constant.ruby"
108
+ },
109
+ "4": {
110
+ "name": "variable.parameter.function.ruby"
111
+ }
112
+ },
113
+ "match": "\\G([&*]?)(?:([_a-zA-Z]\\w*(:))|([_a-zA-Z]\\w*))"
114
+ },
115
+ {
116
+ "include": "#parens"
117
+ },
118
+ {
119
+ "include": "#braces"
120
+ },
121
+ {
122
+ "include": "$self"
123
+ }
124
+ ]
125
+ }
126
+ ],
127
+ "repository": {
128
+ "braces": {
129
+ "begin": "\\{",
130
+ "beginCaptures": {
131
+ "0": {
132
+ "name": "punctuation.section.function.begin.ruby"
133
+ }
134
+ },
135
+ "end": "\\}",
136
+ "endCaptures": {
137
+ "0": {
138
+ "name": "punctuation.section.function.end.ruby"
139
+ }
140
+ },
141
+ "patterns": [
142
+ {
143
+ "include": "#parens"
144
+ },
145
+ {
146
+ "include": "#braces"
147
+ },
148
+ {
149
+ "include": "$self"
150
+ }
151
+ ]
152
+ },
153
+ "parens": {
154
+ "begin": "\\(",
155
+ "beginCaptures": {
156
+ "0": {
157
+ "name": "punctuation.section.function.begin.ruby"
158
+ }
159
+ },
160
+ "end": "\\)",
161
+ "endCaptures": {
162
+ "0": {
163
+ "name": "punctuation.section.function.end.ruby"
164
+ }
165
+ },
166
+ "patterns": [
167
+ {
168
+ "include": "#parens"
169
+ },
170
+ {
171
+ "include": "#braces"
172
+ },
173
+ {
174
+ "include": "$self"
175
+ }
176
+ ]
177
+ }
178
+ }
179
+ },
180
+ {
181
+ "begin": "(?x)\n\t\t\t (?=def|definisci\\b) # an optimization to help Oniguruma fail fast\n\t\t\t (?<=^|\\s)(def|definisci)\\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 ",
182
+ "beginCaptures": {
183
+ "1": {
184
+ "name": "keyword.control.def.ruby"
185
+ },
186
+ "2": {
187
+ "name": "entity.name.function.ruby"
188
+ }
189
+ },
190
+ "comment": "same as the previous rule, but without parentheses around the arguments",
191
+ "end": "$",
192
+ "name": "meta.function.method.with-arguments.ruby",
193
+ "patterns": [
194
+ {
195
+ "begin": "(?![\\s,])",
196
+ "end": "(?=,|$)",
197
+ "patterns": [
198
+ {
199
+ "captures": {
200
+ "1": {
201
+ "name": "storage.type.variable.ruby"
202
+ },
203
+ "2": {
204
+ "name": "constant.other.symbol.hashkey.parameter.function.ruby"
205
+ },
206
+ "3": {
207
+ "name": "punctuation.definition.constant.ruby"
208
+ },
209
+ "4": {
210
+ "name": "variable.parameter.function.ruby"
211
+ }
212
+ },
213
+ "match": "\\G([&*]?)(?:([_a-zA-Z]\\w*(:))|([_a-zA-Z]\\w*))",
214
+ "name": "variable.parameter.function.ruby"
215
+ },
216
+ {
217
+ "include": "$self"
218
+ }
219
+ ]
220
+ }
221
+ ]
222
+ },
223
+ {
224
+ "captures": {
225
+ "1": {
226
+ "name": "keyword.control.def.ruby"
227
+ },
228
+ "3": {
229
+ "name": "entity.name.function.ruby"
230
+ }
231
+ },
232
+ "comment": " the optional name is just to catch the def also without a method-name",
233
+ "match": "(?x)\n\t\t\t (?=def|definisci\\b) # an optimization to help Oniguruma fail fast\n\t\t\t (?<=^|\\s)(def|definisci)\\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 ",
234
+ "name": "meta.function.method.without-arguments.ruby"
235
+ },
236
+ {
237
+ "begin": "(?<=\\{|esegui|\\{\\s|esegui\\s)(\\|)",
238
+ "captures": {
239
+ "1": {
240
+ "name": "punctuation.separator.arguments.ruby"
241
+ }
242
+ },
243
+ "end": "(?<!\\|)(\\|)(?!\\|)",
244
+ "patterns": [
245
+ {
246
+ "include": "$self"
247
+ },
248
+ {
249
+ "match": "[_a-zA-Z][\\w]*",
250
+ "name": "variable.other.block.ruby"
251
+ },
252
+ {
253
+ "match": ",",
254
+ "name": "punctuation.separator.variable.ruby"
255
+ }
256
+ ]
257
+ },
258
+ {
259
+ "begin": "(?<=\\{|fai|\\{\\s|fai\\s)(\\|)",
260
+ "captures": {
261
+ "1": {
262
+ "name": "punctuation.separator.arguments.ruby"
263
+ }
264
+ },
265
+ "end": "(?<!\\|)(\\|)(?!\\|)",
266
+ "patterns": [
267
+ {
268
+ "include": "$self"
269
+ },
270
+ {
271
+ "match": "[_a-zA-Z][\\w]*",
272
+ "name": "variable.other.block.ruby"
273
+ },
274
+ {
275
+ "match": ",",
276
+ "name": "punctuation.separator.variable.ruby"
277
+ }
278
+ ]
279
+ },
280
+ {
281
+ "comment": "contextual smart pair support for block parameters",
282
+ "match": "(?<!\\.)\\b(fai|esegui)\\b",
283
+ "name": "keyword.control.start-block.ruby"
284
+ },
285
+ {
286
+ "comment": "contextual smart pair support",
287
+ "match": "(?<=\\{)(\\s+)",
288
+ "name": "meta.syntax.ruby.start-block"
289
+ },
290
+ {
291
+ "match": "\\b(abort|at_exit|autoload[?]?|binding|callcc|caller|caller_locations|chomp|chop|eval|exec|exit|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|(?<=[?!]))(?![?!])",
292
+ "name": "support.function.kernel.ruby"
293
+ },
294
+ {
295
+ "comment": " everything being a method but having a special function is a..",
296
+ "match": "\\b(inizializzatore|nuovo|nuova|cicla|includi|estendi|preponi|fallisci|alza|accessore|accessore_di_classe|attr_reader|attr_writer|attr_accessor|attr|cattura|lancia|privati|private_class_method|module_function|pubblici|public_class_method|protetti|refine|using)\\b(?![?!])",
297
+ "name": "keyword.other.special-method.ruby"
298
+ },
299
+ {
300
+ "match": "(?<!\\.)\\b(alias|alias_method|blocco_dato[?]|esci|definito[?]|definita[?]|iterator[?]|prossima|prossimo|rifai|riesegui|riprova|ritorna|super|undef|rilascia)(\\b|(?<=[?]))(?![?!])",
301
+ "name": "keyword.control.pseudo-method.ruby"
302
+ },
303
+ {
304
+ "match": "\\b(nullo|nulla|si|no|vero|falso)\\b(?![?!])",
305
+ "name": "constant.language.ruby"
306
+ },
307
+ {
308
+ "match": "\\b(__(dir|FILE|LINE)__)\\b(?![?!])",
309
+ "name": "variable.language.ruby"
310
+ },
311
+ {
312
+ "match": "\\b(istanza|se_stesso|se_stessa)\\b(?![?!])",
313
+ "name": "variable.language.self.ruby"
314
+ },
315
+ {
316
+ "begin": "\\b(?<!\\.|::)(require|require_relative|richiedi|richiedi_relativo|richiedi_tutti)\\b",
317
+ "captures": {
318
+ "1": {
319
+ "name": "keyword.other.special-method.ruby"
320
+ }
321
+ },
322
+ "end": "$|(?=#|\\})",
323
+ "name": "meta.require.ruby",
324
+ "patterns": [
325
+ {
326
+ "include": "$self"
327
+ }
328
+ ]
329
+ },
330
+ {
331
+ "captures": {
332
+ "1": {
333
+ "name": "punctuation.definition.variable.ruby"
334
+ }
335
+ },
336
+ "match": "(@)[a-zA-Z_]\\w*",
337
+ "name": "variable.other.readwrite.instance.ruby"
338
+ },
339
+ {
340
+ "captures": {
341
+ "1": {
342
+ "name": "punctuation.definition.variable.ruby"
343
+ }
344
+ },
345
+ "match": "(@@)[a-zA-Z_]\\w*",
346
+ "name": "variable.other.readwrite.class.ruby"
347
+ },
348
+ {
349
+ "captures": {
350
+ "1": {
351
+ "name": "punctuation.definition.variable.ruby"
352
+ }
353
+ },
354
+ "match": "(\\$)[a-zA-Z_]\\w*",
355
+ "name": "variable.other.readwrite.global.ruby"
356
+ },
357
+ {
358
+ "captures": {
359
+ "1": {
360
+ "name": "variable.other.readwrite.ruby"
361
+ },
362
+ "2": {
363
+ "name": "other"
364
+ }
365
+ },
366
+ "match": "\\b([a-zA-Z_][\\w]*)([\\s]*=)",
367
+ "name": "other"
368
+ },
369
+ {
370
+ "captures": {
371
+ "1": {
372
+ "name": "variable.other.readwrite.ruby"
373
+ },
374
+ "2": {
375
+ "name": "entity.name.function.ruby"
376
+ }
377
+ },
378
+ "match": "\\b([a-zA-Z_][\\w]*)\\.([a-zA-Z_][\\w\\?\\!]*)",
379
+ "name": "other"
380
+ },
381
+ {
382
+ "captures": {
383
+ "1": {
384
+ "name": "punctuation.definition.constant.ruby"
385
+ }
386
+ },
387
+ "comment": "symbols as hash key (1.9 syntax)",
388
+ "match": "(?>[a-zA-Z_]\\w*(?>[?!])?)(:)(?!:)",
389
+ "name": "constant.language.symbol.hashkey.ruby"
390
+ },
391
+ {
392
+ "captures": {
393
+ "1": {
394
+ "name": "punctuation.definition.constant.ruby"
395
+ }
396
+ },
397
+ "comment": "symbols",
398
+ "match": "(?<!:)(:)(?>[a-zA-Z_]\\w*(?>[?!])?)(?=\\s*)",
399
+ "name": "constant.language.symbol.hashkey.ruby"
400
+ },
401
+ {
402
+ "captures": {
403
+ "1": {
404
+ "name": "punctuation.definition.constant.ruby"
405
+ }
406
+ },
407
+ "comment": "symbols as hash key (1.8 syntax)",
408
+ "match": "(?<!:)(:)(?>[a-zA-Z_]\\w*(?>[?!])?)(?=\\s*=>)",
409
+ "name": "constant.language.symbol.hashkey.ruby"
410
+ },
411
+ {
412
+ "match": "\\b\\d(?>_?\\d)*(?=\\.\\d|[eE])(\\.\\d(?>_?\\d)*)?([eE][-+]?\\d(?>_?\\d)*)?r?i?\\b",
413
+ "name": "constant.numeric.float.ruby"
414
+ },
415
+ {
416
+ "match": "\\b(0|(0[dD]\\d|[1-9])(?>_?\\d)*)r?i?\\b",
417
+ "name": "constant.numeric.integer.ruby"
418
+ },
419
+ {
420
+ "match": "\\b0[xX]\\h(?>_?\\h)*r?i?\\b",
421
+ "name": "constant.numeric.hex.ruby"
422
+ },
423
+ {
424
+ "match": "\\b0[bB][01](?>_?[01])*r?i?\\b",
425
+ "name": "constant.numeric.binary.ruby"
426
+ },
427
+ {
428
+ "match": "\\b0([oO]?[0-7](?>_?[0-7])*)?r?i?\\b",
429
+ "name": "constant.numeric.octal.ruby"
430
+ },
431
+ {
432
+ "begin": "'",
433
+ "beginCaptures": {
434
+ "0": {
435
+ "name": "punctuation.definition.string.begin.ruby"
436
+ }
437
+ },
438
+ "comment": "single quoted string (does not allow interpolation)",
439
+ "end": "'",
440
+ "endCaptures": {
441
+ "0": {
442
+ "name": "punctuation.definition.string.end.ruby"
443
+ }
444
+ },
445
+ "name": "string.quoted.single.ruby",
446
+ "patterns": [
447
+ {
448
+ "match": "\\\\'|\\\\\\\\",
449
+ "name": "constant.character.escape.ruby"
450
+ }
451
+ ]
452
+ },
453
+ {
454
+ "begin": "\"",
455
+ "beginCaptures": {
456
+ "0": {
457
+ "name": "punctuation.definition.string.begin.ruby"
458
+ }
459
+ },
460
+ "comment": "double quoted string (allows for interpolation)",
461
+ "end": "\"",
462
+ "endCaptures": {
463
+ "0": {
464
+ "name": "punctuation.definition.string.end.ruby"
465
+ }
466
+ },
467
+ "name": "string.quoted.double.ruby",
468
+ "patterns": [
469
+ {
470
+ "include": "#interpolated_ruby"
471
+ },
472
+ {
473
+ "include": "#escaped_char"
474
+ }
475
+ ]
476
+ },
477
+ {
478
+ "begin": "`",
479
+ "beginCaptures": {
480
+ "0": {
481
+ "name": "punctuation.definition.string.begin.ruby"
482
+ }
483
+ },
484
+ "comment": "execute string (allows for interpolation)",
485
+ "end": "`",
486
+ "endCaptures": {
487
+ "0": {
488
+ "name": "punctuation.definition.string.end.ruby"
489
+ }
490
+ },
491
+ "name": "string.interpolated.ruby",
492
+ "patterns": [
493
+ {
494
+ "include": "#interpolated_ruby"
495
+ },
496
+ {
497
+ "include": "#escaped_char"
498
+ }
499
+ ]
500
+ },
501
+ {
502
+ "include": "#percent_literals"
503
+ },
504
+ {
505
+ "begin": "(^[ \\t]+)?(?=#)",
506
+ "beginCaptures": {
507
+ "1": {
508
+ "name": "punctuation.whitespace.comment.leading.ruby"
509
+ }
510
+ },
511
+ "end": "(?!\\G)",
512
+ "patterns": [
513
+ {
514
+ "begin": "#",
515
+ "beginCaptures": {
516
+ "0": {
517
+ "name": "punctuation.definition.comment.ruby"
518
+ }
519
+ },
520
+ "end": "\\n",
521
+ "name": "comment.line.number-sign.ruby"
522
+ }
523
+ ]
524
+ }
525
+ ],
526
+ "repository": {
527
+ "interpolated_ruby": {
528
+ "patterns": [
529
+ {
530
+ "begin": "#\\{",
531
+ "beginCaptures": {
532
+ "0": {
533
+ "name": "punctuation.section.embedded.begin.ruby"
534
+ }
535
+ },
536
+ "contentName": "source.ruby",
537
+ "end": "(\\})",
538
+ "endCaptures": {
539
+ "0": {
540
+ "name": "punctuation.section.embedded.end.ruby"
541
+ },
542
+ "1": {
543
+ "name": "source.ruby"
544
+ }
545
+ },
546
+ "name": "meta.embedded.line.ruby",
547
+ "patterns": [
548
+ {
549
+ "include": "#nest_curly_and_self"
550
+ },
551
+ {
552
+ "include": "$self"
553
+ }
554
+ ],
555
+ "repository": {
556
+ "nest_curly_and_self": {
557
+ "patterns": [
558
+ {
559
+ "begin": "\\{",
560
+ "captures": {
561
+ "0": {
562
+ "name": "punctuation.section.scope.ruby"
563
+ }
564
+ },
565
+ "end": "\\}",
566
+ "patterns": [
567
+ {
568
+ "include": "#nest_curly_and_self"
569
+ }
570
+ ]
571
+ },
572
+ {
573
+ "include": "$self"
574
+ }
575
+ ]
576
+ }
577
+ }
578
+ },
579
+ {
580
+ "captures": {
581
+ "1": {
582
+ "name": "punctuation.definition.variable.ruby"
583
+ }
584
+ },
585
+ "match": "(#@)[a-zA-Z_]\\w*",
586
+ "name": "variable.other.readwrite.instance.ruby"
587
+ },
588
+ {
589
+ "captures": {
590
+ "1": {
591
+ "name": "punctuation.definition.variable.ruby"
592
+ }
593
+ },
594
+ "match": "(#@@)[a-zA-Z_]\\w*",
595
+ "name": "variable.other.readwrite.class.ruby"
596
+ },
597
+ {
598
+ "captures": {
599
+ "1": {
600
+ "name": "punctuation.definition.variable.ruby"
601
+ }
602
+ },
603
+ "match": "(#\\$)[a-zA-Z_]\\w*",
604
+ "name": "variable.other.readwrite.global.ruby"
605
+ }
606
+ ]
607
+ },
608
+ "percent_literals": {
609
+ "patterns": [
610
+ {
611
+ "begin": "%i(?:([(\\[{<])|([^\\w\\s]|_))",
612
+ "beginCaptures": {
613
+ "0": {
614
+ "name": "punctuation.section.array.begin.ruby"
615
+ }
616
+ },
617
+ "end": "[)\\]}>]\\2|\\1\\2",
618
+ "endCaptures": {
619
+ "0": {
620
+ "name": "punctuation.section.array.end.ruby"
621
+ }
622
+ },
623
+ "name": "meta.array.symbol.ruby",
624
+ "patterns": [
625
+ {
626
+ "begin": "\\G(?<=\\()(?!\\))",
627
+ "end": "(?=\\))",
628
+ "patterns": [
629
+ {
630
+ "include": "#parens"
631
+ },
632
+ {
633
+ "include": "#symbol"
634
+ }
635
+ ]
636
+ },
637
+ {
638
+ "begin": "\\G(?<=\\[)(?!\\])",
639
+ "end": "(?=\\])",
640
+ "patterns": [
641
+ {
642
+ "include": "#brackets"
643
+ },
644
+ {
645
+ "include": "#symbol"
646
+ }
647
+ ]
648
+ },
649
+ {
650
+ "begin": "\\G(?<=\\{)(?!\\})",
651
+ "end": "(?=\\})",
652
+ "patterns": [
653
+ {
654
+ "include": "#braces"
655
+ },
656
+ {
657
+ "include": "#symbol"
658
+ }
659
+ ]
660
+ },
661
+ {
662
+ "begin": "\\G(?<=<)(?!>)",
663
+ "end": "(?=>)",
664
+ "patterns": [
665
+ {
666
+ "include": "#angles"
667
+ },
668
+ {
669
+ "include": "#symbol"
670
+ }
671
+ ]
672
+ },
673
+ {
674
+ "include": "#symbol"
675
+ }
676
+ ],
677
+ "repository": {
678
+ "angles": {
679
+ "patterns": [
680
+ {
681
+ "captures": {
682
+ "0": {
683
+ "name": "constant.character.escape.ruby"
684
+ }
685
+ },
686
+ "match": "\\\\<|\\\\>",
687
+ "name": "constant.other.symbol.ruby"
688
+ },
689
+ {
690
+ "begin": "<",
691
+ "captures": {
692
+ "0": {
693
+ "name": "constant.other.symbol.ruby"
694
+ }
695
+ },
696
+ "end": ">",
697
+ "patterns": [
698
+ {
699
+ "include": "#angles"
700
+ },
701
+ {
702
+ "include": "#symbol"
703
+ }
704
+ ]
705
+ }
706
+ ]
707
+ },
708
+ "braces": {
709
+ "patterns": [
710
+ {
711
+ "captures": {
712
+ "0": {
713
+ "name": "constant.character.escape.ruby"
714
+ }
715
+ },
716
+ "match": "\\\\\\{|\\\\\\}",
717
+ "name": "constant.other.symbol.ruby"
718
+ },
719
+ {
720
+ "begin": "\\{",
721
+ "captures": {
722
+ "0": {
723
+ "name": "constant.other.symbol.ruby"
724
+ }
725
+ },
726
+ "end": "\\}",
727
+ "patterns": [
728
+ {
729
+ "include": "#braces"
730
+ },
731
+ {
732
+ "include": "#symbol"
733
+ }
734
+ ]
735
+ }
736
+ ]
737
+ },
738
+ "brackets": {
739
+ "patterns": [
740
+ {
741
+ "captures": {
742
+ "0": {
743
+ "name": "constant.character.escape.ruby"
744
+ }
745
+ },
746
+ "match": "\\\\\\[|\\\\\\]",
747
+ "name": "constant.other.symbol.ruby"
748
+ },
749
+ {
750
+ "begin": "\\[",
751
+ "captures": {
752
+ "0": {
753
+ "name": "constant.other.symbol.ruby"
754
+ }
755
+ },
756
+ "end": "\\]",
757
+ "patterns": [
758
+ {
759
+ "include": "#brackets"
760
+ },
761
+ {
762
+ "include": "#symbol"
763
+ }
764
+ ]
765
+ }
766
+ ]
767
+ },
768
+ "parens": {
769
+ "patterns": [
770
+ {
771
+ "captures": {
772
+ "0": {
773
+ "name": "constant.character.escape.ruby"
774
+ }
775
+ },
776
+ "match": "\\\\\\(|\\\\\\)",
777
+ "name": "constant.other.symbol.ruby"
778
+ },
779
+ {
780
+ "begin": "\\(",
781
+ "captures": {
782
+ "0": {
783
+ "name": "constant.other.symbol.ruby"
784
+ }
785
+ },
786
+ "end": "\\)",
787
+ "patterns": [
788
+ {
789
+ "include": "#parens"
790
+ },
791
+ {
792
+ "include": "#symbol"
793
+ }
794
+ ]
795
+ }
796
+ ]
797
+ },
798
+ "symbol": {
799
+ "patterns": [
800
+ {
801
+ "captures": {
802
+ "0": {
803
+ "name": "constant.character.escape.ruby"
804
+ }
805
+ },
806
+ "match": "\\\\\\\\|\\\\[ ]",
807
+ "name": "constant.other.symbol.ruby"
808
+ },
809
+ {
810
+ "match": "\\S\\w*",
811
+ "name": "constant.other.symbol.ruby"
812
+ }
813
+ ]
814
+ }
815
+ }
816
+ },
817
+ {
818
+ "begin": "%I(?:([(\\[{<])|([^\\w\\s]|_))",
819
+ "beginCaptures": {
820
+ "0": {
821
+ "name": "punctuation.section.array.begin.ruby"
822
+ }
823
+ },
824
+ "end": "[)\\]}>]\\2|\\1\\2",
825
+ "endCaptures": {
826
+ "0": {
827
+ "name": "punctuation.section.array.end.ruby"
828
+ }
829
+ },
830
+ "name": "meta.array.symbol.interpolated.ruby",
831
+ "patterns": [
832
+ {
833
+ "begin": "\\G(?<=\\()(?!\\))",
834
+ "end": "(?=\\))",
835
+ "patterns": [
836
+ {
837
+ "include": "#parens"
838
+ },
839
+ {
840
+ "include": "#symbol"
841
+ }
842
+ ]
843
+ },
844
+ {
845
+ "begin": "\\G(?<=\\[)(?!\\])",
846
+ "end": "(?=\\])",
847
+ "patterns": [
848
+ {
849
+ "include": "#brackets"
850
+ },
851
+ {
852
+ "include": "#symbol"
853
+ }
854
+ ]
855
+ },
856
+ {
857
+ "begin": "\\G(?<=\\{)(?!\\})",
858
+ "end": "(?=\\})",
859
+ "patterns": [
860
+ {
861
+ "include": "#braces"
862
+ },
863
+ {
864
+ "include": "#symbol"
865
+ }
866
+ ]
867
+ },
868
+ {
869
+ "begin": "\\G(?<=<)(?!>)",
870
+ "end": "(?=>)",
871
+ "patterns": [
872
+ {
873
+ "include": "#angles"
874
+ },
875
+ {
876
+ "include": "#symbol"
877
+ }
878
+ ]
879
+ },
880
+ {
881
+ "include": "#symbol"
882
+ }
883
+ ],
884
+ "repository": {
885
+ "angles": {
886
+ "patterns": [
887
+ {
888
+ "begin": "<",
889
+ "captures": {
890
+ "0": {
891
+ "name": "constant.other.symbol.ruby"
892
+ }
893
+ },
894
+ "end": ">",
895
+ "patterns": [
896
+ {
897
+ "include": "#angles"
898
+ },
899
+ {
900
+ "include": "#symbol"
901
+ }
902
+ ]
903
+ }
904
+ ]
905
+ },
906
+ "braces": {
907
+ "patterns": [
908
+ {
909
+ "begin": "\\{",
910
+ "captures": {
911
+ "0": {
912
+ "name": "constant.other.symbol.ruby"
913
+ }
914
+ },
915
+ "end": "\\}",
916
+ "patterns": [
917
+ {
918
+ "include": "#braces"
919
+ },
920
+ {
921
+ "include": "#symbol"
922
+ }
923
+ ]
924
+ }
925
+ ]
926
+ },
927
+ "brackets": {
928
+ "patterns": [
929
+ {
930
+ "begin": "\\[",
931
+ "captures": {
932
+ "0": {
933
+ "name": "constant.other.symbol.ruby"
934
+ }
935
+ },
936
+ "end": "\\]",
937
+ "patterns": [
938
+ {
939
+ "include": "#brackets"
940
+ },
941
+ {
942
+ "include": "#symbol"
943
+ }
944
+ ]
945
+ }
946
+ ]
947
+ },
948
+ "parens": {
949
+ "patterns": [
950
+ {
951
+ "begin": "\\(",
952
+ "captures": {
953
+ "0": {
954
+ "name": "constant.other.symbol.ruby"
955
+ }
956
+ },
957
+ "end": "\\)",
958
+ "patterns": [
959
+ {
960
+ "include": "#parens"
961
+ },
962
+ {
963
+ "include": "#symbol"
964
+ }
965
+ ]
966
+ }
967
+ ]
968
+ },
969
+ "symbol": {
970
+ "patterns": [
971
+ {
972
+ "begin": "(?=\\\\|#\\{)",
973
+ "end": "(?!\\G)",
974
+ "name": "constant.other.symbol.ruby",
975
+ "patterns": [
976
+ {
977
+ "include": "#escaped_char"
978
+ },
979
+ {
980
+ "include": "#interpolated_ruby"
981
+ }
982
+ ]
983
+ },
984
+ {
985
+ "match": "\\S\\w*",
986
+ "name": "constant.other.symbol.ruby"
987
+ }
988
+ ]
989
+ }
990
+ }
991
+ },
992
+ {
993
+ "begin": "%q(?:([(\\[{<])|([^\\w\\s]|_))",
994
+ "beginCaptures": {
995
+ "0": {
996
+ "name": "punctuation.definition.string.begin.ruby"
997
+ }
998
+ },
999
+ "end": "[)\\]}>]\\2|\\1\\2",
1000
+ "endCaptures": {
1001
+ "0": {
1002
+ "name": "punctuation.definition.string.end.ruby"
1003
+ }
1004
+ },
1005
+ "name": "string.quoted.other.ruby",
1006
+ "patterns": [
1007
+ {
1008
+ "begin": "\\G(?<=\\()(?!\\))",
1009
+ "end": "(?=\\))",
1010
+ "patterns": [
1011
+ {
1012
+ "include": "#parens"
1013
+ }
1014
+ ]
1015
+ },
1016
+ {
1017
+ "begin": "\\G(?<=\\[)(?!\\])",
1018
+ "end": "(?=\\])",
1019
+ "patterns": [
1020
+ {
1021
+ "include": "#brackets"
1022
+ }
1023
+ ]
1024
+ },
1025
+ {
1026
+ "begin": "\\G(?<=\\{)(?!\\})",
1027
+ "end": "(?=\\})",
1028
+ "patterns": [
1029
+ {
1030
+ "include": "#braces"
1031
+ }
1032
+ ]
1033
+ },
1034
+ {
1035
+ "begin": "\\G(?<=<)(?!>)",
1036
+ "end": "(?=>)",
1037
+ "patterns": [
1038
+ {
1039
+ "include": "#angles"
1040
+ }
1041
+ ]
1042
+ }
1043
+ ],
1044
+ "repository": {
1045
+ "angles": {
1046
+ "patterns": [
1047
+ {
1048
+ "match": "\\\\<|\\\\>|\\\\\\\\",
1049
+ "name": "constant.character.escape.ruby"
1050
+ },
1051
+ {
1052
+ "begin": "<",
1053
+ "end": ">",
1054
+ "patterns": [
1055
+ {
1056
+ "include": "#angles"
1057
+ }
1058
+ ]
1059
+ }
1060
+ ]
1061
+ },
1062
+ "braces": {
1063
+ "patterns": [
1064
+ {
1065
+ "match": "\\\\\\{|\\\\\\}|\\\\\\\\",
1066
+ "name": "constant.character.escape.ruby"
1067
+ },
1068
+ {
1069
+ "begin": "\\{",
1070
+ "end": "\\}",
1071
+ "patterns": [
1072
+ {
1073
+ "include": "#braces"
1074
+ }
1075
+ ]
1076
+ }
1077
+ ]
1078
+ },
1079
+ "brackets": {
1080
+ "patterns": [
1081
+ {
1082
+ "match": "\\\\\\[|\\\\\\]|\\\\\\\\",
1083
+ "name": "constant.character.escape.ruby"
1084
+ },
1085
+ {
1086
+ "begin": "\\[",
1087
+ "end": "\\]",
1088
+ "patterns": [
1089
+ {
1090
+ "include": "#brackets"
1091
+ }
1092
+ ]
1093
+ }
1094
+ ]
1095
+ },
1096
+ "parens": {
1097
+ "patterns": [
1098
+ {
1099
+ "match": "\\\\\\(|\\\\\\)|\\\\\\\\",
1100
+ "name": "constant.character.escape.ruby"
1101
+ },
1102
+ {
1103
+ "begin": "\\(",
1104
+ "end": "\\)",
1105
+ "patterns": [
1106
+ {
1107
+ "include": "#parens"
1108
+ }
1109
+ ]
1110
+ }
1111
+ ]
1112
+ }
1113
+ }
1114
+ },
1115
+ {
1116
+ "begin": "%Q?(?:([(\\[{<])|([^\\w\\s=]|_))",
1117
+ "beginCaptures": {
1118
+ "0": {
1119
+ "name": "punctuation.definition.string.begin.ruby"
1120
+ }
1121
+ },
1122
+ "end": "[)\\]}>]\\2|\\1\\2",
1123
+ "endCaptures": {
1124
+ "0": {
1125
+ "name": "punctuation.definition.string.end.ruby"
1126
+ }
1127
+ },
1128
+ "name": "string.quoted.other.interpolated.ruby",
1129
+ "patterns": [
1130
+ {
1131
+ "begin": "\\G(?<=\\()(?!\\))",
1132
+ "end": "(?=\\))",
1133
+ "patterns": [
1134
+ {
1135
+ "include": "#parens"
1136
+ }
1137
+ ]
1138
+ },
1139
+ {
1140
+ "begin": "\\G(?<=\\[)(?!\\])",
1141
+ "end": "(?=\\])",
1142
+ "patterns": [
1143
+ {
1144
+ "include": "#brackets"
1145
+ }
1146
+ ]
1147
+ },
1148
+ {
1149
+ "begin": "\\G(?<=\\{)(?!\\})",
1150
+ "end": "(?=\\})",
1151
+ "patterns": [
1152
+ {
1153
+ "include": "#braces"
1154
+ }
1155
+ ]
1156
+ },
1157
+ {
1158
+ "begin": "\\G(?<=<)(?!>)",
1159
+ "end": "(?=>)",
1160
+ "patterns": [
1161
+ {
1162
+ "include": "#angles"
1163
+ }
1164
+ ]
1165
+ },
1166
+ {
1167
+ "include": "#escaped_char"
1168
+ },
1169
+ {
1170
+ "include": "#interpolated_ruby"
1171
+ }
1172
+ ],
1173
+ "repository": {
1174
+ "angles": {
1175
+ "patterns": [
1176
+ {
1177
+ "include": "#escaped_char"
1178
+ },
1179
+ {
1180
+ "include": "#interpolated_ruby"
1181
+ },
1182
+ {
1183
+ "begin": "<",
1184
+ "end": ">",
1185
+ "patterns": [
1186
+ {
1187
+ "include": "#angles"
1188
+ }
1189
+ ]
1190
+ }
1191
+ ]
1192
+ },
1193
+ "braces": {
1194
+ "patterns": [
1195
+ {
1196
+ "include": "#escaped_char"
1197
+ },
1198
+ {
1199
+ "include": "#interpolated_ruby"
1200
+ },
1201
+ {
1202
+ "begin": "\\{",
1203
+ "end": "\\}",
1204
+ "patterns": [
1205
+ {
1206
+ "include": "#braces"
1207
+ }
1208
+ ]
1209
+ }
1210
+ ]
1211
+ },
1212
+ "brackets": {
1213
+ "patterns": [
1214
+ {
1215
+ "include": "#escaped_char"
1216
+ },
1217
+ {
1218
+ "include": "#interpolated_ruby"
1219
+ },
1220
+ {
1221
+ "begin": "\\[",
1222
+ "end": "\\]",
1223
+ "patterns": [
1224
+ {
1225
+ "include": "#brackets"
1226
+ }
1227
+ ]
1228
+ }
1229
+ ]
1230
+ },
1231
+ "parens": {
1232
+ "patterns": [
1233
+ {
1234
+ "include": "#escaped_char"
1235
+ },
1236
+ {
1237
+ "include": "#interpolated_ruby"
1238
+ },
1239
+ {
1240
+ "begin": "\\(",
1241
+ "end": "\\)",
1242
+ "patterns": [
1243
+ {
1244
+ "include": "#parens"
1245
+ }
1246
+ ]
1247
+ }
1248
+ ]
1249
+ }
1250
+ }
1251
+ },
1252
+ {
1253
+ "begin": "%r(?:([(\\[{<])|([^\\w\\s]|_))",
1254
+ "beginCaptures": {
1255
+ "0": {
1256
+ "name": "punctuation.definition.string.begin.ruby"
1257
+ }
1258
+ },
1259
+ "end": "([)\\]}>]\\2|\\1\\2)[eimnosux]*",
1260
+ "endCaptures": {
1261
+ "0": {
1262
+ "name": "punctuation.definition.string.end.ruby"
1263
+ }
1264
+ },
1265
+ "name": "string.regexp.percent.ruby",
1266
+ "patterns": [
1267
+ {
1268
+ "begin": "\\G(?<=\\()(?!\\))",
1269
+ "end": "(?=\\))",
1270
+ "patterns": [
1271
+ {
1272
+ "include": "#parens"
1273
+ }
1274
+ ]
1275
+ },
1276
+ {
1277
+ "begin": "\\G(?<=\\[)(?!\\])",
1278
+ "end": "(?=\\])",
1279
+ "patterns": [
1280
+ {
1281
+ "include": "#brackets"
1282
+ }
1283
+ ]
1284
+ },
1285
+ {
1286
+ "begin": "\\G(?<=\\{)(?!\\})",
1287
+ "end": "(?=\\})",
1288
+ "patterns": [
1289
+ {
1290
+ "include": "#braces"
1291
+ }
1292
+ ]
1293
+ },
1294
+ {
1295
+ "begin": "\\G(?<=<)(?!>)",
1296
+ "end": "(?=>)",
1297
+ "patterns": [
1298
+ {
1299
+ "include": "#angles"
1300
+ }
1301
+ ]
1302
+ },
1303
+ {
1304
+ "include": "#regex_sub"
1305
+ }
1306
+ ],
1307
+ "repository": {
1308
+ "angles": {
1309
+ "patterns": [
1310
+ {
1311
+ "include": "#regex_sub"
1312
+ },
1313
+ {
1314
+ "begin": "<",
1315
+ "end": ">",
1316
+ "patterns": [
1317
+ {
1318
+ "include": "#angles"
1319
+ }
1320
+ ]
1321
+ }
1322
+ ]
1323
+ },
1324
+ "braces": {
1325
+ "patterns": [
1326
+ {
1327
+ "include": "#regex_sub"
1328
+ },
1329
+ {
1330
+ "begin": "\\{",
1331
+ "end": "\\}",
1332
+ "patterns": [
1333
+ {
1334
+ "include": "#braces"
1335
+ }
1336
+ ]
1337
+ }
1338
+ ]
1339
+ },
1340
+ "brackets": {
1341
+ "patterns": [
1342
+ {
1343
+ "include": "#regex_sub"
1344
+ },
1345
+ {
1346
+ "begin": "\\[",
1347
+ "end": "\\]",
1348
+ "patterns": [
1349
+ {
1350
+ "include": "#brackets"
1351
+ }
1352
+ ]
1353
+ }
1354
+ ]
1355
+ },
1356
+ "parens": {
1357
+ "patterns": [
1358
+ {
1359
+ "include": "#regex_sub"
1360
+ },
1361
+ {
1362
+ "begin": "\\(",
1363
+ "end": "\\)",
1364
+ "patterns": [
1365
+ {
1366
+ "include": "#parens"
1367
+ }
1368
+ ]
1369
+ }
1370
+ ]
1371
+ }
1372
+ }
1373
+ },
1374
+ {
1375
+ "begin": "%s(?:([(\\[{<])|([^\\w\\s]|_))",
1376
+ "beginCaptures": {
1377
+ "0": {
1378
+ "name": "punctuation.definition.constant.begin.ruby"
1379
+ }
1380
+ },
1381
+ "end": "[)\\]}>]\\2|\\1\\2",
1382
+ "endCaptures": {
1383
+ "0": {
1384
+ "name": "punctuation.definition.constant.end.ruby"
1385
+ }
1386
+ },
1387
+ "name": "constant.other.symbol.percent.ruby",
1388
+ "patterns": [
1389
+ {
1390
+ "begin": "\\G(?<=\\()(?!\\))",
1391
+ "end": "(?=\\))",
1392
+ "patterns": [
1393
+ {
1394
+ "include": "#parens"
1395
+ }
1396
+ ]
1397
+ },
1398
+ {
1399
+ "begin": "\\G(?<=\\[)(?!\\])",
1400
+ "end": "(?=\\])",
1401
+ "patterns": [
1402
+ {
1403
+ "include": "#brackets"
1404
+ }
1405
+ ]
1406
+ },
1407
+ {
1408
+ "begin": "\\G(?<=\\{)(?!\\})",
1409
+ "end": "(?=\\})",
1410
+ "patterns": [
1411
+ {
1412
+ "include": "#braces"
1413
+ }
1414
+ ]
1415
+ },
1416
+ {
1417
+ "begin": "\\G(?<=<)(?!>)",
1418
+ "end": "(?=>)",
1419
+ "patterns": [
1420
+ {
1421
+ "include": "#angles"
1422
+ }
1423
+ ]
1424
+ }
1425
+ ],
1426
+ "repository": {
1427
+ "angles": {
1428
+ "patterns": [
1429
+ {
1430
+ "match": "\\\\<|\\\\>|\\\\\\\\",
1431
+ "name": "constant.character.escape.ruby"
1432
+ },
1433
+ {
1434
+ "begin": "<",
1435
+ "end": ">",
1436
+ "patterns": [
1437
+ {
1438
+ "include": "#angles"
1439
+ }
1440
+ ]
1441
+ }
1442
+ ]
1443
+ },
1444
+ "braces": {
1445
+ "patterns": [
1446
+ {
1447
+ "match": "\\\\\\{|\\\\\\}|\\\\\\\\",
1448
+ "name": "constant.character.escape.ruby"
1449
+ },
1450
+ {
1451
+ "begin": "\\{",
1452
+ "end": "\\}",
1453
+ "patterns": [
1454
+ {
1455
+ "include": "#braces"
1456
+ }
1457
+ ]
1458
+ }
1459
+ ]
1460
+ },
1461
+ "brackets": {
1462
+ "patterns": [
1463
+ {
1464
+ "match": "\\\\\\[|\\\\\\]|\\\\\\\\",
1465
+ "name": "constant.character.escape.ruby"
1466
+ },
1467
+ {
1468
+ "begin": "\\[",
1469
+ "end": "\\]",
1470
+ "patterns": [
1471
+ {
1472
+ "include": "#brackets"
1473
+ }
1474
+ ]
1475
+ }
1476
+ ]
1477
+ },
1478
+ "parens": {
1479
+ "patterns": [
1480
+ {
1481
+ "match": "\\\\\\(|\\\\\\)|\\\\\\\\",
1482
+ "name": "constant.character.escape.ruby"
1483
+ },
1484
+ {
1485
+ "begin": "\\(",
1486
+ "end": "\\)",
1487
+ "patterns": [
1488
+ {
1489
+ "include": "#parens"
1490
+ }
1491
+ ]
1492
+ }
1493
+ ]
1494
+ }
1495
+ }
1496
+ },
1497
+ {
1498
+ "begin": "%w(?:([(\\[{<])|([^\\w\\s]|_))",
1499
+ "beginCaptures": {
1500
+ "0": {
1501
+ "name": "punctuation.section.array.begin.ruby"
1502
+ }
1503
+ },
1504
+ "end": "[)\\]}>]\\2|\\1\\2",
1505
+ "endCaptures": {
1506
+ "0": {
1507
+ "name": "punctuation.section.array.end.ruby"
1508
+ }
1509
+ },
1510
+ "name": "meta.array.string.ruby",
1511
+ "patterns": [
1512
+ {
1513
+ "begin": "\\G(?<=\\()(?!\\))",
1514
+ "end": "(?=\\))",
1515
+ "patterns": [
1516
+ {
1517
+ "include": "#parens"
1518
+ },
1519
+ {
1520
+ "include": "#string"
1521
+ }
1522
+ ]
1523
+ },
1524
+ {
1525
+ "begin": "\\G(?<=\\[)(?!\\])",
1526
+ "end": "(?=\\])",
1527
+ "patterns": [
1528
+ {
1529
+ "include": "#brackets"
1530
+ },
1531
+ {
1532
+ "include": "#string"
1533
+ }
1534
+ ]
1535
+ },
1536
+ {
1537
+ "begin": "\\G(?<=\\{)(?!\\})",
1538
+ "end": "(?=\\})",
1539
+ "patterns": [
1540
+ {
1541
+ "include": "#braces"
1542
+ },
1543
+ {
1544
+ "include": "#string"
1545
+ }
1546
+ ]
1547
+ },
1548
+ {
1549
+ "begin": "\\G(?<=<)(?!>)",
1550
+ "end": "(?=>)",
1551
+ "patterns": [
1552
+ {
1553
+ "include": "#angles"
1554
+ },
1555
+ {
1556
+ "include": "#string"
1557
+ }
1558
+ ]
1559
+ },
1560
+ {
1561
+ "include": "#string"
1562
+ }
1563
+ ],
1564
+ "repository": {
1565
+ "angles": {
1566
+ "patterns": [
1567
+ {
1568
+ "captures": {
1569
+ "0": {
1570
+ "name": "constant.character.escape.ruby"
1571
+ }
1572
+ },
1573
+ "match": "\\\\<|\\\\>",
1574
+ "name": "string.other.ruby"
1575
+ },
1576
+ {
1577
+ "begin": "<",
1578
+ "captures": {
1579
+ "0": {
1580
+ "name": "string.other.ruby"
1581
+ }
1582
+ },
1583
+ "end": ">",
1584
+ "patterns": [
1585
+ {
1586
+ "include": "#angles"
1587
+ },
1588
+ {
1589
+ "include": "#string"
1590
+ }
1591
+ ]
1592
+ }
1593
+ ]
1594
+ },
1595
+ "braces": {
1596
+ "patterns": [
1597
+ {
1598
+ "captures": {
1599
+ "0": {
1600
+ "name": "constant.character.escape.ruby"
1601
+ }
1602
+ },
1603
+ "match": "\\\\\\{|\\\\\\}",
1604
+ "name": "string.other.ruby"
1605
+ },
1606
+ {
1607
+ "begin": "\\{",
1608
+ "captures": {
1609
+ "0": {
1610
+ "name": "string.other.ruby"
1611
+ }
1612
+ },
1613
+ "end": "\\}",
1614
+ "patterns": [
1615
+ {
1616
+ "include": "#braces"
1617
+ },
1618
+ {
1619
+ "include": "#string"
1620
+ }
1621
+ ]
1622
+ }
1623
+ ]
1624
+ },
1625
+ "brackets": {
1626
+ "patterns": [
1627
+ {
1628
+ "captures": {
1629
+ "0": {
1630
+ "name": "constant.character.escape.ruby"
1631
+ }
1632
+ },
1633
+ "match": "\\\\\\[|\\\\\\]",
1634
+ "name": "string.other.ruby"
1635
+ },
1636
+ {
1637
+ "begin": "\\[",
1638
+ "captures": {
1639
+ "0": {
1640
+ "name": "string.other.ruby"
1641
+ }
1642
+ },
1643
+ "end": "\\]",
1644
+ "patterns": [
1645
+ {
1646
+ "include": "#brackets"
1647
+ },
1648
+ {
1649
+ "include": "#string"
1650
+ }
1651
+ ]
1652
+ }
1653
+ ]
1654
+ },
1655
+ "parens": {
1656
+ "patterns": [
1657
+ {
1658
+ "captures": {
1659
+ "0": {
1660
+ "name": "constant.character.escape.ruby"
1661
+ }
1662
+ },
1663
+ "match": "\\\\\\(|\\\\\\)",
1664
+ "name": "string.other.ruby"
1665
+ },
1666
+ {
1667
+ "begin": "\\(",
1668
+ "captures": {
1669
+ "0": {
1670
+ "name": "string.other.ruby"
1671
+ }
1672
+ },
1673
+ "end": "\\)",
1674
+ "patterns": [
1675
+ {
1676
+ "include": "#parens"
1677
+ },
1678
+ {
1679
+ "include": "#string"
1680
+ }
1681
+ ]
1682
+ }
1683
+ ]
1684
+ },
1685
+ "string": {
1686
+ "patterns": [
1687
+ {
1688
+ "captures": {
1689
+ "0": {
1690
+ "name": "constant.character.escape.ruby"
1691
+ }
1692
+ },
1693
+ "match": "\\\\\\\\|\\\\[ ]",
1694
+ "name": "string.other.ruby"
1695
+ },
1696
+ {
1697
+ "match": "\\S\\w*",
1698
+ "name": "string.other.ruby"
1699
+ }
1700
+ ]
1701
+ }
1702
+ }
1703
+ },
1704
+ {
1705
+ "begin": "%W(?:([(\\[{<])|([^\\w\\s]|_))",
1706
+ "beginCaptures": {
1707
+ "0": {
1708
+ "name": "punctuation.section.array.begin.ruby"
1709
+ }
1710
+ },
1711
+ "end": "[)\\]}>]\\2|\\1\\2",
1712
+ "endCaptures": {
1713
+ "0": {
1714
+ "name": "punctuation.section.array.end.ruby"
1715
+ }
1716
+ },
1717
+ "name": "meta.array.string.interpolated.ruby",
1718
+ "patterns": [
1719
+ {
1720
+ "begin": "\\G(?<=\\()(?!\\))",
1721
+ "end": "(?=\\))",
1722
+ "patterns": [
1723
+ {
1724
+ "include": "#parens"
1725
+ },
1726
+ {
1727
+ "include": "#string"
1728
+ }
1729
+ ]
1730
+ },
1731
+ {
1732
+ "begin": "\\G(?<=\\[)(?!\\])",
1733
+ "end": "(?=\\])",
1734
+ "patterns": [
1735
+ {
1736
+ "include": "#brackets"
1737
+ },
1738
+ {
1739
+ "include": "#string"
1740
+ }
1741
+ ]
1742
+ },
1743
+ {
1744
+ "begin": "\\G(?<=\\{)(?!\\})",
1745
+ "end": "(?=\\})",
1746
+ "patterns": [
1747
+ {
1748
+ "include": "#braces"
1749
+ },
1750
+ {
1751
+ "include": "#string"
1752
+ }
1753
+ ]
1754
+ },
1755
+ {
1756
+ "begin": "\\G(?<=<)(?!>)",
1757
+ "end": "(?=>)",
1758
+ "patterns": [
1759
+ {
1760
+ "include": "#angles"
1761
+ },
1762
+ {
1763
+ "include": "#string"
1764
+ }
1765
+ ]
1766
+ },
1767
+ {
1768
+ "include": "#string"
1769
+ }
1770
+ ],
1771
+ "repository": {
1772
+ "angles": {
1773
+ "patterns": [
1774
+ {
1775
+ "begin": "<",
1776
+ "captures": {
1777
+ "0": {
1778
+ "name": "string.other.ruby"
1779
+ }
1780
+ },
1781
+ "end": ">",
1782
+ "patterns": [
1783
+ {
1784
+ "include": "#angles"
1785
+ },
1786
+ {
1787
+ "include": "#string"
1788
+ }
1789
+ ]
1790
+ }
1791
+ ]
1792
+ },
1793
+ "braces": {
1794
+ "patterns": [
1795
+ {
1796
+ "begin": "\\{",
1797
+ "captures": {
1798
+ "0": {
1799
+ "name": "string.other.ruby"
1800
+ }
1801
+ },
1802
+ "end": "\\}",
1803
+ "patterns": [
1804
+ {
1805
+ "include": "#braces"
1806
+ },
1807
+ {
1808
+ "include": "#string"
1809
+ }
1810
+ ]
1811
+ }
1812
+ ]
1813
+ },
1814
+ "brackets": {
1815
+ "patterns": [
1816
+ {
1817
+ "begin": "\\[",
1818
+ "captures": {
1819
+ "0": {
1820
+ "name": "string.other.ruby"
1821
+ }
1822
+ },
1823
+ "end": "\\]",
1824
+ "patterns": [
1825
+ {
1826
+ "include": "#brackets"
1827
+ },
1828
+ {
1829
+ "include": "#string"
1830
+ }
1831
+ ]
1832
+ }
1833
+ ]
1834
+ },
1835
+ "parens": {
1836
+ "patterns": [
1837
+ {
1838
+ "begin": "\\(",
1839
+ "captures": {
1840
+ "0": {
1841
+ "name": "string.other.ruby"
1842
+ }
1843
+ },
1844
+ "end": "\\)",
1845
+ "patterns": [
1846
+ {
1847
+ "include": "#parens"
1848
+ },
1849
+ {
1850
+ "include": "#string"
1851
+ }
1852
+ ]
1853
+ }
1854
+ ]
1855
+ },
1856
+ "string": {
1857
+ "patterns": [
1858
+ {
1859
+ "begin": "(?=\\\\|#\\{)",
1860
+ "end": "(?!\\G)",
1861
+ "name": "string.other.ruby",
1862
+ "patterns": [
1863
+ {
1864
+ "include": "#escaped_char"
1865
+ },
1866
+ {
1867
+ "include": "#interpolated_ruby"
1868
+ }
1869
+ ]
1870
+ },
1871
+ {
1872
+ "match": "\\S\\w*",
1873
+ "name": "string.other.ruby"
1874
+ }
1875
+ ]
1876
+ }
1877
+ }
1878
+ },
1879
+ {
1880
+ "begin": "%x(?:([(\\[{<])|([^\\w\\s]|_))",
1881
+ "beginCaptures": {
1882
+ "0": {
1883
+ "name": "punctuation.definition.string.begin.ruby"
1884
+ }
1885
+ },
1886
+ "end": "[)\\]}>]\\2|\\1\\2",
1887
+ "endCaptures": {
1888
+ "0": {
1889
+ "name": "punctuation.definition.string.end.ruby"
1890
+ }
1891
+ },
1892
+ "name": "string.interpolated.percent.ruby",
1893
+ "patterns": [
1894
+ {
1895
+ "begin": "\\G(?<=\\()(?!\\))",
1896
+ "end": "(?=\\))",
1897
+ "patterns": [
1898
+ {
1899
+ "include": "#parens"
1900
+ }
1901
+ ]
1902
+ },
1903
+ {
1904
+ "begin": "\\G(?<=\\[)(?!\\])",
1905
+ "end": "(?=\\])",
1906
+ "patterns": [
1907
+ {
1908
+ "include": "#brackets"
1909
+ }
1910
+ ]
1911
+ },
1912
+ {
1913
+ "begin": "\\G(?<=\\{)(?!\\})",
1914
+ "end": "(?=\\})",
1915
+ "patterns": [
1916
+ {
1917
+ "include": "#braces"
1918
+ }
1919
+ ]
1920
+ },
1921
+ {
1922
+ "begin": "\\G(?<=<)(?!>)",
1923
+ "end": "(?=>)",
1924
+ "patterns": [
1925
+ {
1926
+ "include": "#angles"
1927
+ }
1928
+ ]
1929
+ },
1930
+ {
1931
+ "include": "#escaped_char"
1932
+ },
1933
+ {
1934
+ "include": "#interpolated_ruby"
1935
+ }
1936
+ ],
1937
+ "repository": {
1938
+ "angles": {
1939
+ "patterns": [
1940
+ {
1941
+ "include": "#escaped_char"
1942
+ },
1943
+ {
1944
+ "include": "#interpolated_ruby"
1945
+ },
1946
+ {
1947
+ "begin": "<",
1948
+ "end": ">",
1949
+ "patterns": [
1950
+ {
1951
+ "include": "#angles"
1952
+ }
1953
+ ]
1954
+ }
1955
+ ]
1956
+ },
1957
+ "braces": {
1958
+ "patterns": [
1959
+ {
1960
+ "include": "#escaped_char"
1961
+ },
1962
+ {
1963
+ "include": "#interpolated_ruby"
1964
+ },
1965
+ {
1966
+ "begin": "\\{",
1967
+ "end": "\\}",
1968
+ "patterns": [
1969
+ {
1970
+ "include": "#braces"
1971
+ }
1972
+ ]
1973
+ }
1974
+ ]
1975
+ },
1976
+ "brackets": {
1977
+ "patterns": [
1978
+ {
1979
+ "include": "#escaped_char"
1980
+ },
1981
+ {
1982
+ "include": "#interpolated_ruby"
1983
+ },
1984
+ {
1985
+ "begin": "\\[",
1986
+ "end": "\\]",
1987
+ "patterns": [
1988
+ {
1989
+ "include": "#brackets"
1990
+ }
1991
+ ]
1992
+ }
1993
+ ]
1994
+ },
1995
+ "parens": {
1996
+ "patterns": [
1997
+ {
1998
+ "include": "#escaped_char"
1999
+ },
2000
+ {
2001
+ "include": "#interpolated_ruby"
2002
+ },
2003
+ {
2004
+ "begin": "\\(",
2005
+ "end": "\\)",
2006
+ "patterns": [
2007
+ {
2008
+ "include": "#parens"
2009
+ }
2010
+ ]
2011
+ }
2012
+ ]
2013
+ }
2014
+ }
2015
+ }
2016
+ ]
2017
+ }
2018
+ }
2019
+ }