@codingame/monaco-vscode-java-default-extension 1.81.8-next.1

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.
@@ -0,0 +1,1883 @@
1
+ {
2
+ "information_for_contributors": [
3
+ "This file has been converted from https://github.com/redhat-developer/vscode-java/blob/master/language-support/java/java.tmLanguage.json",
4
+ "If you want to provide a fix or improvement, please create a pull request against the original repository.",
5
+ "Once accepted there, we are happy to receive an update request."
6
+ ],
7
+ "version": "https://github.com/redhat-developer/vscode-java/commit/7a770ab6750b4b09173d98de14eb9792e3432b36",
8
+ "name": "Java",
9
+ "scopeName": "source.java",
10
+ "patterns": [
11
+ {
12
+ "begin": "\\b(package)\\b\\s*",
13
+ "beginCaptures": {
14
+ "1": {
15
+ "name": "keyword.other.package.java"
16
+ }
17
+ },
18
+ "end": "\\s*(;)",
19
+ "endCaptures": {
20
+ "1": {
21
+ "name": "punctuation.terminator.java"
22
+ }
23
+ },
24
+ "name": "meta.package.java",
25
+ "contentName": "storage.modifier.package.java",
26
+ "patterns": [
27
+ {
28
+ "include": "#comments"
29
+ },
30
+ {
31
+ "match": "(?<=\\.)\\s*\\.|\\.(?=\\s*;)",
32
+ "name": "invalid.illegal.character_not_allowed_here.java"
33
+ },
34
+ {
35
+ "match": "(?<!_)_(?=\\s*(\\.|;))|\\b\\d+|-+",
36
+ "name": "invalid.illegal.character_not_allowed_here.java"
37
+ },
38
+ {
39
+ "match": "[A-Z]+",
40
+ "name": "invalid.deprecated.package_name_not_lowercase.java"
41
+ },
42
+ {
43
+ "match": "(?x)\\b(?<!\\$)\n(abstract|assert|boolean|break|byte|case|catch|char|class|\nconst|continue|default|do|double|else|enum|extends|final|\nfinally|float|for|goto|if|implements|import|instanceof|int|\ninterface|long|native|new|non-sealed|package|permits|private|protected|public|\nreturn|sealed|short|static|strictfp|super|switch|syncronized|this|\nthrow|throws|transient|try|void|volatile|while|yield|\ntrue|false|null)\\b",
44
+ "name": "invalid.illegal.character_not_allowed_here.java"
45
+ },
46
+ {
47
+ "match": "\\.",
48
+ "name": "punctuation.separator.java"
49
+ }
50
+ ]
51
+ },
52
+ {
53
+ "begin": "\\b(import)\\b\\s*\\b(static)?\\b\\s",
54
+ "beginCaptures": {
55
+ "1": {
56
+ "name": "keyword.other.import.java"
57
+ },
58
+ "2": {
59
+ "name": "storage.modifier.java"
60
+ }
61
+ },
62
+ "end": "\\s*(;)",
63
+ "endCaptures": {
64
+ "1": {
65
+ "name": "punctuation.terminator.java"
66
+ }
67
+ },
68
+ "name": "meta.import.java",
69
+ "contentName": "storage.modifier.import.java",
70
+ "patterns": [
71
+ {
72
+ "include": "#comments"
73
+ },
74
+ {
75
+ "match": "(?<=\\.)\\s*\\.|\\.(?=\\s*;)",
76
+ "name": "invalid.illegal.character_not_allowed_here.java"
77
+ },
78
+ {
79
+ "match": "(?<!\\.)\\s*\\*",
80
+ "name": "invalid.illegal.character_not_allowed_here.java"
81
+ },
82
+ {
83
+ "match": "(?<!_)_(?=\\s*(\\.|;))|\\b\\d+|-+",
84
+ "name": "invalid.illegal.character_not_allowed_here.java"
85
+ },
86
+ {
87
+ "match": "(?x)\\b(?<!\\$)\n(abstract|assert|boolean|break|byte|case|catch|char|class|\nconst|continue|default|do|double|else|enum|extends|final|\nfinally|float|for|goto|if|implements|import|instanceof|int|\ninterface|long|native|new|non-sealed|package|permits|private|protected|public|\nreturn|sealed|short|static|strictfp|super|switch|syncronized|this|\nthrow|throws|transient|try|void|volatile|while|yield|\ntrue|false|null)\\b",
88
+ "name": "invalid.illegal.character_not_allowed_here.java"
89
+ },
90
+ {
91
+ "match": "\\.",
92
+ "name": "punctuation.separator.java"
93
+ },
94
+ {
95
+ "match": "\\*",
96
+ "name": "variable.language.wildcard.java"
97
+ }
98
+ ]
99
+ },
100
+ {
101
+ "include": "#comments-javadoc"
102
+ },
103
+ {
104
+ "include": "#code"
105
+ },
106
+ {
107
+ "include": "#module"
108
+ }
109
+ ],
110
+ "repository": {
111
+ "all-types": {
112
+ "patterns": [
113
+ {
114
+ "include": "#primitive-arrays"
115
+ },
116
+ {
117
+ "include": "#primitive-types"
118
+ },
119
+ {
120
+ "include": "#object-types"
121
+ }
122
+ ]
123
+ },
124
+ "annotations": {
125
+ "patterns": [
126
+ {
127
+ "begin": "((@)\\s*([^\\s(]+))(\\()",
128
+ "beginCaptures": {
129
+ "2": {
130
+ "name": "punctuation.definition.annotation.java"
131
+ },
132
+ "3": {
133
+ "name": "storage.type.annotation.java"
134
+ },
135
+ "4": {
136
+ "name": "punctuation.definition.annotation-arguments.begin.bracket.round.java"
137
+ }
138
+ },
139
+ "end": "\\)",
140
+ "endCaptures": {
141
+ "0": {
142
+ "name": "punctuation.definition.annotation-arguments.end.bracket.round.java"
143
+ }
144
+ },
145
+ "name": "meta.declaration.annotation.java",
146
+ "patterns": [
147
+ {
148
+ "captures": {
149
+ "1": {
150
+ "name": "constant.other.key.java"
151
+ },
152
+ "2": {
153
+ "name": "keyword.operator.assignment.java"
154
+ }
155
+ },
156
+ "match": "(\\w*)\\s*(=)"
157
+ },
158
+ {
159
+ "include": "#code"
160
+ }
161
+ ]
162
+ },
163
+ {
164
+ "match": "(@)(interface)\\s+(\\w*)|((@)\\s*(\\w+))",
165
+ "name": "meta.declaration.annotation.java",
166
+ "captures": {
167
+ "1": {
168
+ "name": "punctuation.definition.annotation.java"
169
+ },
170
+ "2": {
171
+ "name": "storage.modifier.java"
172
+ },
173
+ "3": {
174
+ "name": "storage.type.annotation.java"
175
+ },
176
+ "5": {
177
+ "name": "punctuation.definition.annotation.java"
178
+ },
179
+ "6": {
180
+ "name": "storage.type.annotation.java"
181
+ }
182
+ }
183
+ }
184
+ ]
185
+ },
186
+ "anonymous-block-and-instance-initializer": {
187
+ "begin": "{",
188
+ "beginCaptures": {
189
+ "0": {
190
+ "name": "punctuation.section.block.begin.bracket.curly.java"
191
+ }
192
+ },
193
+ "end": "}",
194
+ "endCaptures": {
195
+ "0": {
196
+ "name": "punctuation.section.block.end.bracket.curly.java"
197
+ }
198
+ },
199
+ "patterns": [
200
+ {
201
+ "include": "#code"
202
+ }
203
+ ]
204
+ },
205
+ "anonymous-classes-and-new": {
206
+ "begin": "\\bnew\\b",
207
+ "beginCaptures": {
208
+ "0": {
209
+ "name": "keyword.control.new.java"
210
+ }
211
+ },
212
+ "end": "(?=;|\\)|\\]|\\.|,|\\?|:|}|\\+|\\-|\\*|\\/(?!\\/|\\*)|%|!|&|\\||\\^|=)",
213
+ "patterns": [
214
+ {
215
+ "include": "#comments"
216
+ },
217
+ {
218
+ "include": "#function-call"
219
+ },
220
+ {
221
+ "include": "#all-types"
222
+ },
223
+ {
224
+ "begin": "(?<=\\))",
225
+ "end": "(?=;|\\)|\\]|\\.|,|\\?|:|}|\\+|\\-|\\*|\\/(?!\\/|\\*)|%|!|&|\\||\\^|=)",
226
+ "patterns": [
227
+ {
228
+ "include": "#comments"
229
+ },
230
+ {
231
+ "begin": "{",
232
+ "beginCaptures": {
233
+ "0": {
234
+ "name": "punctuation.section.inner-class.begin.bracket.curly.java"
235
+ }
236
+ },
237
+ "end": "}",
238
+ "endCaptures": {
239
+ "0": {
240
+ "name": "punctuation.section.inner-class.end.bracket.curly.java"
241
+ }
242
+ },
243
+ "name": "meta.inner-class.java",
244
+ "patterns": [
245
+ {
246
+ "include": "#class-body"
247
+ }
248
+ ]
249
+ }
250
+ ]
251
+ },
252
+ {
253
+ "begin": "(?<=\\])",
254
+ "end": "(?=;|\\)|\\]|\\.|,|\\?|:|}|\\+|\\-|\\*|\\/(?!\\/|\\*)|%|!|&|\\||\\^|=)",
255
+ "patterns": [
256
+ {
257
+ "include": "#comments"
258
+ },
259
+ {
260
+ "begin": "{",
261
+ "beginCaptures": {
262
+ "0": {
263
+ "name": "punctuation.section.array-initializer.begin.bracket.curly.java"
264
+ }
265
+ },
266
+ "end": "}",
267
+ "endCaptures": {
268
+ "0": {
269
+ "name": "punctuation.section.array-initializer.end.bracket.curly.java"
270
+ }
271
+ },
272
+ "name": "meta.array-initializer.java",
273
+ "patterns": [
274
+ {
275
+ "include": "#code"
276
+ }
277
+ ]
278
+ }
279
+ ]
280
+ },
281
+ {
282
+ "include": "#parens"
283
+ }
284
+ ]
285
+ },
286
+ "assertions": {
287
+ "patterns": [
288
+ {
289
+ "begin": "\\b(assert)\\s",
290
+ "beginCaptures": {
291
+ "1": {
292
+ "name": "keyword.control.assert.java"
293
+ }
294
+ },
295
+ "end": "$",
296
+ "name": "meta.declaration.assertion.java",
297
+ "patterns": [
298
+ {
299
+ "match": ":",
300
+ "name": "keyword.operator.assert.expression-separator.java"
301
+ },
302
+ {
303
+ "include": "#code"
304
+ }
305
+ ]
306
+ }
307
+ ]
308
+ },
309
+ "class": {
310
+ "begin": "(?=\\w?[\\w\\s-]*\\b(?:class|(?<!@)interface|enum)\\s+[\\w$]+)",
311
+ "end": "}",
312
+ "endCaptures": {
313
+ "0": {
314
+ "name": "punctuation.section.class.end.bracket.curly.java"
315
+ }
316
+ },
317
+ "name": "meta.class.java",
318
+ "patterns": [
319
+ {
320
+ "include": "#storage-modifiers"
321
+ },
322
+ {
323
+ "include": "#generics"
324
+ },
325
+ {
326
+ "include": "#comments"
327
+ },
328
+ {
329
+ "captures": {
330
+ "1": {
331
+ "name": "storage.modifier.java"
332
+ },
333
+ "2": {
334
+ "name": "entity.name.type.class.java"
335
+ }
336
+ },
337
+ "match": "(class|(?<!@)interface|enum)\\s+([\\w$]+)",
338
+ "name": "meta.class.identifier.java"
339
+ },
340
+ {
341
+ "begin": "extends",
342
+ "beginCaptures": {
343
+ "0": {
344
+ "name": "storage.modifier.extends.java"
345
+ }
346
+ },
347
+ "end": "(?={|implements|permits)",
348
+ "name": "meta.definition.class.inherited.classes.java",
349
+ "patterns": [
350
+ {
351
+ "include": "#object-types-inherited"
352
+ },
353
+ {
354
+ "include": "#comments"
355
+ }
356
+ ]
357
+ },
358
+ {
359
+ "begin": "(implements)\\s",
360
+ "beginCaptures": {
361
+ "1": {
362
+ "name": "storage.modifier.implements.java"
363
+ }
364
+ },
365
+ "end": "(?=\\s*extends|permits|\\{)",
366
+ "name": "meta.definition.class.implemented.interfaces.java",
367
+ "patterns": [
368
+ {
369
+ "include": "#object-types-inherited"
370
+ },
371
+ {
372
+ "include": "#comments"
373
+ }
374
+ ]
375
+ },
376
+ {
377
+ "begin": "(permits)\\s",
378
+ "beginCaptures": {
379
+ "1": {
380
+ "name": "storage.modifier.permits.java"
381
+ }
382
+ },
383
+ "end": "(?=\\s*extends|implements|\\{)",
384
+ "name": "meta.definition.class.permits.classes.java",
385
+ "patterns": [
386
+ {
387
+ "include": "#object-types-inherited"
388
+ },
389
+ {
390
+ "include": "#comments"
391
+ }
392
+ ]
393
+ },
394
+ {
395
+ "begin": "{",
396
+ "beginCaptures": {
397
+ "0": {
398
+ "name": "punctuation.section.class.begin.bracket.curly.java"
399
+ }
400
+ },
401
+ "end": "(?=})",
402
+ "contentName": "meta.class.body.java",
403
+ "patterns": [
404
+ {
405
+ "include": "#class-body"
406
+ }
407
+ ]
408
+ }
409
+ ]
410
+ },
411
+ "class-body": {
412
+ "patterns": [
413
+ {
414
+ "include": "#comments-javadoc"
415
+ },
416
+ {
417
+ "include": "#comments"
418
+ },
419
+ {
420
+ "include": "#enums"
421
+ },
422
+ {
423
+ "include": "#class"
424
+ },
425
+ {
426
+ "include": "#generics"
427
+ },
428
+ {
429
+ "include": "#static-initializer"
430
+ },
431
+ {
432
+ "include": "#class-fields-and-methods"
433
+ },
434
+ {
435
+ "include": "#annotations"
436
+ },
437
+ {
438
+ "include": "#storage-modifiers"
439
+ },
440
+ {
441
+ "include": "#member-variables"
442
+ },
443
+ {
444
+ "include": "#code"
445
+ }
446
+ ]
447
+ },
448
+ "class-fields-and-methods": {
449
+ "patterns": [
450
+ {
451
+ "begin": "(?=\\=)",
452
+ "end": "(?=;)",
453
+ "patterns": [
454
+ {
455
+ "include": "#code"
456
+ }
457
+ ]
458
+ },
459
+ {
460
+ "include": "#methods"
461
+ }
462
+ ]
463
+ },
464
+ "code": {
465
+ "patterns": [
466
+ {
467
+ "include": "#annotations"
468
+ },
469
+ {
470
+ "include": "#comments"
471
+ },
472
+ {
473
+ "include": "#enums"
474
+ },
475
+ {
476
+ "include": "#class"
477
+ },
478
+ {
479
+ "include": "#record"
480
+ },
481
+ {
482
+ "include": "#anonymous-block-and-instance-initializer"
483
+ },
484
+ {
485
+ "include": "#try-catch-finally"
486
+ },
487
+ {
488
+ "include": "#assertions"
489
+ },
490
+ {
491
+ "include": "#parens"
492
+ },
493
+ {
494
+ "include": "#constants-and-special-vars"
495
+ },
496
+ {
497
+ "include": "#numbers"
498
+ },
499
+ {
500
+ "include": "#anonymous-classes-and-new"
501
+ },
502
+ {
503
+ "include": "#lambda-expression"
504
+ },
505
+ {
506
+ "include": "#keywords"
507
+ },
508
+ {
509
+ "include": "#storage-modifiers"
510
+ },
511
+ {
512
+ "include": "#method-call"
513
+ },
514
+ {
515
+ "include": "#function-call"
516
+ },
517
+ {
518
+ "include": "#variables"
519
+ },
520
+ {
521
+ "include": "#variables-local"
522
+ },
523
+ {
524
+ "include": "#objects"
525
+ },
526
+ {
527
+ "include": "#properties"
528
+ },
529
+ {
530
+ "include": "#strings"
531
+ },
532
+ {
533
+ "include": "#all-types"
534
+ },
535
+ {
536
+ "match": ",",
537
+ "name": "punctuation.separator.delimiter.java"
538
+ },
539
+ {
540
+ "match": "\\.",
541
+ "name": "punctuation.separator.period.java"
542
+ },
543
+ {
544
+ "match": ";",
545
+ "name": "punctuation.terminator.java"
546
+ }
547
+ ]
548
+ },
549
+ "comments": {
550
+ "patterns": [
551
+ {
552
+ "captures": {
553
+ "0": {
554
+ "name": "punctuation.definition.comment.java"
555
+ }
556
+ },
557
+ "match": "/\\*\\*/",
558
+ "name": "comment.block.empty.java"
559
+ },
560
+ {
561
+ "include": "#comments-inline"
562
+ }
563
+ ]
564
+ },
565
+ "comments-inline": {
566
+ "patterns": [
567
+ {
568
+ "begin": "/\\*",
569
+ "captures": {
570
+ "0": {
571
+ "name": "punctuation.definition.comment.java"
572
+ }
573
+ },
574
+ "end": "\\*/",
575
+ "name": "comment.block.java"
576
+ },
577
+ {
578
+ "begin": "(^[ \\t]+)?(?=//)",
579
+ "beginCaptures": {
580
+ "1": {
581
+ "name": "punctuation.whitespace.comment.leading.java"
582
+ }
583
+ },
584
+ "end": "(?!\\G)",
585
+ "patterns": [
586
+ {
587
+ "begin": "//",
588
+ "beginCaptures": {
589
+ "0": {
590
+ "name": "punctuation.definition.comment.java"
591
+ }
592
+ },
593
+ "end": "\\n",
594
+ "name": "comment.line.double-slash.java"
595
+ }
596
+ ]
597
+ }
598
+ ]
599
+ },
600
+ "comments-javadoc": {
601
+ "patterns": [
602
+ {
603
+ "begin": "^\\s*(/\\*\\*)(?!/)",
604
+ "beginCaptures": {
605
+ "1": {
606
+ "name": "punctuation.definition.comment.java"
607
+ }
608
+ },
609
+ "end": "\\*/",
610
+ "endCaptures": {
611
+ "0": {
612
+ "name": "punctuation.definition.comment.java"
613
+ }
614
+ },
615
+ "name": "comment.block.javadoc.java",
616
+ "patterns": [
617
+ {
618
+ "match": "@(author|deprecated|return|see|serial|since|version)\\b",
619
+ "name": "keyword.other.documentation.javadoc.java"
620
+ },
621
+ {
622
+ "match": "(@param)\\s+(\\S+)",
623
+ "captures": {
624
+ "1": {
625
+ "name": "keyword.other.documentation.javadoc.java"
626
+ },
627
+ "2": {
628
+ "name": "variable.parameter.java"
629
+ }
630
+ }
631
+ },
632
+ {
633
+ "match": "(@(?:exception|throws))\\s+(\\S+)",
634
+ "captures": {
635
+ "1": {
636
+ "name": "keyword.other.documentation.javadoc.java"
637
+ },
638
+ "2": {
639
+ "name": "entity.name.type.class.java"
640
+ }
641
+ }
642
+ },
643
+ {
644
+ "match": "{(@link)\\s+(\\S+)?#([\\w$]+\\s*\\([^\\(\\)]*\\)).*?}",
645
+ "captures": {
646
+ "1": {
647
+ "name": "keyword.other.documentation.javadoc.java"
648
+ },
649
+ "2": {
650
+ "name": "entity.name.type.class.java"
651
+ },
652
+ "3": {
653
+ "name": "variable.parameter.java"
654
+ }
655
+ }
656
+ }
657
+ ]
658
+ }
659
+ ]
660
+ },
661
+ "constants-and-special-vars": {
662
+ "patterns": [
663
+ {
664
+ "match": "\\b(true|false|null)\\b",
665
+ "name": "constant.language.java"
666
+ },
667
+ {
668
+ "match": "\\bthis\\b",
669
+ "name": "variable.language.this.java"
670
+ },
671
+ {
672
+ "match": "\\bsuper\\b",
673
+ "name": "variable.language.java"
674
+ }
675
+ ]
676
+ },
677
+ "enums": {
678
+ "begin": "^\\s*([\\w\\s]*)(enum)\\s+(\\w+)",
679
+ "beginCaptures": {
680
+ "1": {
681
+ "patterns": [
682
+ {
683
+ "include": "#storage-modifiers"
684
+ }
685
+ ]
686
+ },
687
+ "2": {
688
+ "name": "storage.modifier.java"
689
+ },
690
+ "3": {
691
+ "name": "entity.name.type.enum.java"
692
+ }
693
+ },
694
+ "end": "}",
695
+ "endCaptures": {
696
+ "0": {
697
+ "name": "punctuation.section.enum.end.bracket.curly.java"
698
+ }
699
+ },
700
+ "name": "meta.enum.java",
701
+ "patterns": [
702
+ {
703
+ "begin": "\\b(extends)\\b",
704
+ "beginCaptures": {
705
+ "1": {
706
+ "name": "storage.modifier.extends.java"
707
+ }
708
+ },
709
+ "end": "(?={|\\bimplements\\b)",
710
+ "name": "meta.definition.class.inherited.classes.java",
711
+ "patterns": [
712
+ {
713
+ "include": "#object-types-inherited"
714
+ },
715
+ {
716
+ "include": "#comments"
717
+ }
718
+ ]
719
+ },
720
+ {
721
+ "begin": "\\b(implements)\\b",
722
+ "beginCaptures": {
723
+ "1": {
724
+ "name": "storage.modifier.implements.java"
725
+ }
726
+ },
727
+ "end": "(?={|\\bextends\\b)",
728
+ "name": "meta.definition.class.implemented.interfaces.java",
729
+ "patterns": [
730
+ {
731
+ "include": "#object-types-inherited"
732
+ },
733
+ {
734
+ "include": "#comments"
735
+ }
736
+ ]
737
+ },
738
+ {
739
+ "begin": "{",
740
+ "beginCaptures": {
741
+ "0": {
742
+ "name": "punctuation.section.enum.begin.bracket.curly.java"
743
+ }
744
+ },
745
+ "end": "(?=})",
746
+ "patterns": [
747
+ {
748
+ "begin": "(?<={)",
749
+ "end": "(?=;|})",
750
+ "patterns": [
751
+ {
752
+ "include": "#comments-javadoc"
753
+ },
754
+ {
755
+ "include": "#comments"
756
+ },
757
+ {
758
+ "begin": "\\b(\\w+)\\b",
759
+ "beginCaptures": {
760
+ "1": {
761
+ "name": "constant.other.enum.java"
762
+ }
763
+ },
764
+ "end": "(,)|(?=;|})",
765
+ "endCaptures": {
766
+ "1": {
767
+ "name": "punctuation.separator.delimiter.java"
768
+ }
769
+ },
770
+ "patterns": [
771
+ {
772
+ "include": "#comments-javadoc"
773
+ },
774
+ {
775
+ "include": "#comments"
776
+ },
777
+ {
778
+ "begin": "\\(",
779
+ "beginCaptures": {
780
+ "0": {
781
+ "name": "punctuation.bracket.round.java"
782
+ }
783
+ },
784
+ "end": "\\)",
785
+ "endCaptures": {
786
+ "0": {
787
+ "name": "punctuation.bracket.round.java"
788
+ }
789
+ },
790
+ "patterns": [
791
+ {
792
+ "include": "#code"
793
+ }
794
+ ]
795
+ },
796
+ {
797
+ "begin": "{",
798
+ "beginCaptures": {
799
+ "0": {
800
+ "name": "punctuation.bracket.curly.java"
801
+ }
802
+ },
803
+ "end": "}",
804
+ "endCaptures": {
805
+ "0": {
806
+ "name": "punctuation.bracket.curly.java"
807
+ }
808
+ },
809
+ "patterns": [
810
+ {
811
+ "include": "#class-body"
812
+ }
813
+ ]
814
+ }
815
+ ]
816
+ }
817
+ ]
818
+ },
819
+ {
820
+ "include": "#class-body"
821
+ }
822
+ ]
823
+ }
824
+ ]
825
+ },
826
+ "function-call": {
827
+ "begin": "([A-Za-z_$][\\w$]*)\\s*(\\()",
828
+ "beginCaptures": {
829
+ "1": {
830
+ "name": "entity.name.function.java"
831
+ },
832
+ "2": {
833
+ "name": "punctuation.definition.parameters.begin.bracket.round.java"
834
+ }
835
+ },
836
+ "end": "\\)",
837
+ "endCaptures": {
838
+ "0": {
839
+ "name": "punctuation.definition.parameters.end.bracket.round.java"
840
+ }
841
+ },
842
+ "name": "meta.function-call.java",
843
+ "patterns": [
844
+ {
845
+ "include": "#code"
846
+ }
847
+ ]
848
+ },
849
+ "generics": {
850
+ "begin": "<",
851
+ "beginCaptures": {
852
+ "0": {
853
+ "name": "punctuation.bracket.angle.java"
854
+ }
855
+ },
856
+ "end": ">",
857
+ "endCaptures": {
858
+ "0": {
859
+ "name": "punctuation.bracket.angle.java"
860
+ }
861
+ },
862
+ "patterns": [
863
+ {
864
+ "match": "\\b(extends|super)\\b",
865
+ "name": "storage.modifier.$1.java"
866
+ },
867
+ {
868
+ "match": "(?<!\\.)([a-zA-Z$_][a-zA-Z0-9$_]*)(?=\\s*<)",
869
+ "captures": {
870
+ "1": {
871
+ "name": "storage.type.java"
872
+ }
873
+ }
874
+ },
875
+ {
876
+ "include": "#primitive-arrays"
877
+ },
878
+ {
879
+ "match": "[a-zA-Z$_][a-zA-Z0-9$_]*",
880
+ "name": "storage.type.generic.java"
881
+ },
882
+ {
883
+ "match": "\\?",
884
+ "name": "storage.type.generic.wildcard.java"
885
+ },
886
+ {
887
+ "match": "&",
888
+ "name": "punctuation.separator.types.java"
889
+ },
890
+ {
891
+ "match": ",",
892
+ "name": "punctuation.separator.delimiter.java"
893
+ },
894
+ {
895
+ "match": "\\.",
896
+ "name": "punctuation.separator.period.java"
897
+ },
898
+ {
899
+ "include": "#parens"
900
+ },
901
+ {
902
+ "include": "#generics"
903
+ },
904
+ {
905
+ "include": "#comments"
906
+ }
907
+ ]
908
+ },
909
+ "keywords": {
910
+ "patterns": [
911
+ {
912
+ "match": "\\bthrow\\b",
913
+ "name": "keyword.control.throw.java"
914
+ },
915
+ {
916
+ "match": "\\?|:",
917
+ "name": "keyword.control.ternary.java"
918
+ },
919
+ {
920
+ "match": "\\b(return|yield|break|case|continue|default|do|while|for|switch|if|else)\\b",
921
+ "name": "keyword.control.java"
922
+ },
923
+ {
924
+ "match": "\\b(instanceof)\\b",
925
+ "name": "keyword.operator.instanceof.java"
926
+ },
927
+ {
928
+ "match": "(<<|>>>?|~|\\^)",
929
+ "name": "keyword.operator.bitwise.java"
930
+ },
931
+ {
932
+ "match": "((&|\\^|\\||<<|>>>?)=)",
933
+ "name": "keyword.operator.assignment.bitwise.java"
934
+ },
935
+ {
936
+ "match": "(===?|!=|<=|>=|<>|<|>)",
937
+ "name": "keyword.operator.comparison.java"
938
+ },
939
+ {
940
+ "match": "([+*/%-]=)",
941
+ "name": "keyword.operator.assignment.arithmetic.java"
942
+ },
943
+ {
944
+ "match": "(=)",
945
+ "name": "keyword.operator.assignment.java"
946
+ },
947
+ {
948
+ "match": "(\\-\\-|\\+\\+)",
949
+ "name": "keyword.operator.increment-decrement.java"
950
+ },
951
+ {
952
+ "match": "(\\-|\\+|\\*|\\/|%)",
953
+ "name": "keyword.operator.arithmetic.java"
954
+ },
955
+ {
956
+ "match": "(!|&&|\\|\\|)",
957
+ "name": "keyword.operator.logical.java"
958
+ },
959
+ {
960
+ "match": "(\\||&)",
961
+ "name": "keyword.operator.bitwise.java"
962
+ },
963
+ {
964
+ "match": "\\b(const|goto)\\b",
965
+ "name": "keyword.reserved.java"
966
+ }
967
+ ]
968
+ },
969
+ "lambda-expression": {
970
+ "patterns": [
971
+ {
972
+ "match": "->",
973
+ "name": "storage.type.function.arrow.java"
974
+ }
975
+ ]
976
+ },
977
+ "member-variables": {
978
+ "begin": "(?=private|protected|public|native|synchronized|abstract|threadsafe|transient|static|final)",
979
+ "end": "(?=\\=|;)",
980
+ "patterns": [
981
+ {
982
+ "include": "#storage-modifiers"
983
+ },
984
+ {
985
+ "include": "#variables"
986
+ },
987
+ {
988
+ "include": "#primitive-arrays"
989
+ },
990
+ {
991
+ "include": "#object-types"
992
+ }
993
+ ]
994
+ },
995
+ "method-call": {
996
+ "begin": "(\\.)\\s*([A-Za-z_$][\\w$]*)\\s*(\\()",
997
+ "beginCaptures": {
998
+ "1": {
999
+ "name": "punctuation.separator.period.java"
1000
+ },
1001
+ "2": {
1002
+ "name": "entity.name.function.java"
1003
+ },
1004
+ "3": {
1005
+ "name": "punctuation.definition.parameters.begin.bracket.round.java"
1006
+ }
1007
+ },
1008
+ "end": "\\)",
1009
+ "endCaptures": {
1010
+ "0": {
1011
+ "name": "punctuation.definition.parameters.end.bracket.round.java"
1012
+ }
1013
+ },
1014
+ "name": "meta.method-call.java",
1015
+ "patterns": [
1016
+ {
1017
+ "include": "#code"
1018
+ }
1019
+ ]
1020
+ },
1021
+ "methods": {
1022
+ "begin": "(?!new)(?=[\\w<].*\\s+)(?=([^=/]|/(?!/))+\\()",
1023
+ "end": "(})|(?=;)",
1024
+ "endCaptures": {
1025
+ "1": {
1026
+ "name": "punctuation.section.method.end.bracket.curly.java"
1027
+ }
1028
+ },
1029
+ "name": "meta.method.java",
1030
+ "patterns": [
1031
+ {
1032
+ "include": "#storage-modifiers"
1033
+ },
1034
+ {
1035
+ "begin": "(\\w+)\\s*(\\()",
1036
+ "beginCaptures": {
1037
+ "1": {
1038
+ "name": "entity.name.function.java"
1039
+ },
1040
+ "2": {
1041
+ "name": "punctuation.definition.parameters.begin.bracket.round.java"
1042
+ }
1043
+ },
1044
+ "end": "\\)",
1045
+ "endCaptures": {
1046
+ "0": {
1047
+ "name": "punctuation.definition.parameters.end.bracket.round.java"
1048
+ }
1049
+ },
1050
+ "name": "meta.method.identifier.java",
1051
+ "patterns": [
1052
+ {
1053
+ "include": "#parameters"
1054
+ },
1055
+ {
1056
+ "include": "#parens"
1057
+ },
1058
+ {
1059
+ "include": "#comments"
1060
+ }
1061
+ ]
1062
+ },
1063
+ {
1064
+ "include": "#generics"
1065
+ },
1066
+ {
1067
+ "begin": "(?=\\w.*\\s+\\w+\\s*\\()",
1068
+ "end": "(?=\\s+\\w+\\s*\\()",
1069
+ "name": "meta.method.return-type.java",
1070
+ "patterns": [
1071
+ {
1072
+ "include": "#all-types"
1073
+ },
1074
+ {
1075
+ "include": "#parens"
1076
+ },
1077
+ {
1078
+ "include": "#comments"
1079
+ }
1080
+ ]
1081
+ },
1082
+ {
1083
+ "include": "#throws"
1084
+ },
1085
+ {
1086
+ "begin": "{",
1087
+ "beginCaptures": {
1088
+ "0": {
1089
+ "name": "punctuation.section.method.begin.bracket.curly.java"
1090
+ }
1091
+ },
1092
+ "end": "(?=})",
1093
+ "contentName": "meta.method.body.java",
1094
+ "patterns": [
1095
+ {
1096
+ "include": "#code"
1097
+ }
1098
+ ]
1099
+ },
1100
+ {
1101
+ "include": "#comments"
1102
+ }
1103
+ ]
1104
+ },
1105
+ "module": {
1106
+ "begin": "((open)\\s)?(module)\\s+(\\w+)",
1107
+ "end": "}",
1108
+ "beginCaptures": {
1109
+ "1": {
1110
+ "name": "storage.modifier.java"
1111
+ },
1112
+ "3": {
1113
+ "name": "storage.modifier.java"
1114
+ },
1115
+ "4": {
1116
+ "name": "entity.name.type.module.java"
1117
+ }
1118
+ },
1119
+ "endCaptures": {
1120
+ "0": {
1121
+ "name": "punctuation.section.module.end.bracket.curly.java"
1122
+ }
1123
+ },
1124
+ "name": "meta.module.java",
1125
+ "patterns": [
1126
+ {
1127
+ "begin": "{",
1128
+ "beginCaptures": {
1129
+ "0": {
1130
+ "name": "punctuation.section.module.begin.bracket.curly.java"
1131
+ }
1132
+ },
1133
+ "end": "(?=})",
1134
+ "contentName": "meta.module.body.java",
1135
+ "patterns": [
1136
+ {
1137
+ "include": "#comments"
1138
+ },
1139
+ {
1140
+ "include": "#comments-javadoc"
1141
+ },
1142
+ {
1143
+ "match": "\\b(requires|transitive|exports|opens|to|uses|provides|with)\\b",
1144
+ "name": "keyword.module.java"
1145
+ }
1146
+ ]
1147
+ }
1148
+ ]
1149
+ },
1150
+ "numbers": {
1151
+ "patterns": [
1152
+ {
1153
+ "match": "(?x)\n\\b(?<!\\$)\n0(x|X)\n(\n (?<!\\.)[0-9a-fA-F]([0-9a-fA-F_]*[0-9a-fA-F])?[Ll]?(?!\\.)\n |\n (\n [0-9a-fA-F]([0-9a-fA-F_]*[0-9a-fA-F])?\\.?\n |\n ([0-9a-fA-F]([0-9a-fA-F_]*[0-9a-fA-F])?)?\\.[0-9a-fA-F]([0-9a-fA-F_]*[0-9a-fA-F])?\n )\n [Pp][+-]?[0-9]([0-9_]*[0-9])?[FfDd]?\n)\n\\b(?!\\$)",
1154
+ "name": "constant.numeric.hex.java"
1155
+ },
1156
+ {
1157
+ "match": "\\b(?<!\\$)0(b|B)[01]([01_]*[01])?[Ll]?\\b(?!\\$)",
1158
+ "name": "constant.numeric.binary.java"
1159
+ },
1160
+ {
1161
+ "match": "\\b(?<!\\$)0[0-7]([0-7_]*[0-7])?[Ll]?\\b(?!\\$)",
1162
+ "name": "constant.numeric.octal.java"
1163
+ },
1164
+ {
1165
+ "match": "(?x)\n(?<!\\$)\n(\n \\b[0-9]([0-9_]*[0-9])?\\.\\B(?!\\.)\n |\n \\b[0-9]([0-9_]*[0-9])?\\.([Ee][+-]?[0-9]([0-9_]*[0-9])?)[FfDd]?\\b\n |\n \\b[0-9]([0-9_]*[0-9])?\\.([Ee][+-]?[0-9]([0-9_]*[0-9])?)?[FfDd]\\b\n |\n \\b[0-9]([0-9_]*[0-9])?\\.([0-9]([0-9_]*[0-9])?)([Ee][+-]?[0-9]([0-9_]*[0-9])?)?[FfDd]?\\b\n |\n (?<!\\.)\\B\\.[0-9]([0-9_]*[0-9])?([Ee][+-]?[0-9]([0-9_]*[0-9])?)?[FfDd]?\\b\n |\n \\b[0-9]([0-9_]*[0-9])?([Ee][+-]?[0-9]([0-9_]*[0-9])?)[FfDd]?\\b\n |\n \\b[0-9]([0-9_]*[0-9])?([Ee][+-]?[0-9]([0-9_]*[0-9])?)?[FfDd]\\b\n |\n \\b(0|[1-9]([0-9_]*[0-9])?)(?!\\.)[Ll]?\\b\n)\n(?!\\$)",
1166
+ "name": "constant.numeric.decimal.java"
1167
+ }
1168
+ ]
1169
+ },
1170
+ "object-types": {
1171
+ "patterns": [
1172
+ {
1173
+ "include": "#generics"
1174
+ },
1175
+ {
1176
+ "begin": "\\b((?:[A-Za-z_]\\w*\\s*\\.\\s*)*)([A-Z_]\\w*)\\s*(?=\\[)",
1177
+ "beginCaptures": {
1178
+ "1": {
1179
+ "patterns": [
1180
+ {
1181
+ "match": "[A-Za-z_]\\w*",
1182
+ "name": "storage.type.java"
1183
+ },
1184
+ {
1185
+ "match": "\\.",
1186
+ "name": "punctuation.separator.period.java"
1187
+ }
1188
+ ]
1189
+ },
1190
+ "2": {
1191
+ "name": "storage.type.object.array.java"
1192
+ }
1193
+ },
1194
+ "end": "(?!\\s*\\[)",
1195
+ "patterns": [
1196
+ {
1197
+ "include": "#comments"
1198
+ },
1199
+ {
1200
+ "include": "#parens"
1201
+ }
1202
+ ]
1203
+ },
1204
+ {
1205
+ "match": "\\b((?:[A-Za-z_]\\w*\\s*\\.\\s*)*[A-Z_]\\w*)\\s*(?=<)",
1206
+ "captures": {
1207
+ "1": {
1208
+ "patterns": [
1209
+ {
1210
+ "match": "[A-Za-z_]\\w*",
1211
+ "name": "storage.type.java"
1212
+ },
1213
+ {
1214
+ "match": "\\.",
1215
+ "name": "punctuation.separator.period.java"
1216
+ }
1217
+ ]
1218
+ }
1219
+ }
1220
+ },
1221
+ {
1222
+ "match": "\\b((?:[A-Za-z_]\\w*\\s*\\.\\s*)*[A-Z_]\\w*)\\b((?=\\s*[A-Za-z$_\\n])|(?=\\s*\\.\\.\\.))",
1223
+ "captures": {
1224
+ "1": {
1225
+ "patterns": [
1226
+ {
1227
+ "match": "[A-Za-z_]\\w*",
1228
+ "name": "storage.type.java"
1229
+ },
1230
+ {
1231
+ "match": "\\.",
1232
+ "name": "punctuation.separator.period.java"
1233
+ }
1234
+ ]
1235
+ }
1236
+ }
1237
+ }
1238
+ ]
1239
+ },
1240
+ "object-types-inherited": {
1241
+ "patterns": [
1242
+ {
1243
+ "include": "#generics"
1244
+ },
1245
+ {
1246
+ "match": "\\b(?:[A-Z]\\w*\\s*(\\.)\\s*)*[A-Z]\\w*\\b",
1247
+ "name": "entity.other.inherited-class.java",
1248
+ "captures": {
1249
+ "1": {
1250
+ "name": "punctuation.separator.period.java"
1251
+ }
1252
+ }
1253
+ },
1254
+ {
1255
+ "match": ",",
1256
+ "name": "punctuation.separator.delimiter.java"
1257
+ }
1258
+ ]
1259
+ },
1260
+ "objects": {
1261
+ "match": "(?<![\\w$])[a-zA-Z_$][\\w$]*(?=\\s*\\.\\s*[\\w$]+)",
1262
+ "name": "variable.other.object.java"
1263
+ },
1264
+ "parameters": {
1265
+ "patterns": [
1266
+ {
1267
+ "match": "\\bfinal\\b",
1268
+ "name": "storage.modifier.java"
1269
+ },
1270
+ {
1271
+ "include": "#annotations"
1272
+ },
1273
+ {
1274
+ "include": "#all-types"
1275
+ },
1276
+ {
1277
+ "include": "#strings"
1278
+ },
1279
+ {
1280
+ "match": "\\w+",
1281
+ "name": "variable.parameter.java"
1282
+ },
1283
+ {
1284
+ "match": ",",
1285
+ "name": "punctuation.separator.delimiter.java"
1286
+ },
1287
+ {
1288
+ "match": "\\.\\.\\.",
1289
+ "name": "punctuation.definition.parameters.varargs.java"
1290
+ }
1291
+ ]
1292
+ },
1293
+ "parens": {
1294
+ "patterns": [
1295
+ {
1296
+ "begin": "\\(",
1297
+ "beginCaptures": {
1298
+ "0": {
1299
+ "name": "punctuation.bracket.round.java"
1300
+ }
1301
+ },
1302
+ "end": "\\)",
1303
+ "endCaptures": {
1304
+ "0": {
1305
+ "name": "punctuation.bracket.round.java"
1306
+ }
1307
+ },
1308
+ "patterns": [
1309
+ {
1310
+ "include": "#code"
1311
+ }
1312
+ ]
1313
+ },
1314
+ {
1315
+ "begin": "\\[",
1316
+ "beginCaptures": {
1317
+ "0": {
1318
+ "name": "punctuation.bracket.square.java"
1319
+ }
1320
+ },
1321
+ "end": "\\]",
1322
+ "endCaptures": {
1323
+ "0": {
1324
+ "name": "punctuation.bracket.square.java"
1325
+ }
1326
+ },
1327
+ "patterns": [
1328
+ {
1329
+ "include": "#code"
1330
+ }
1331
+ ]
1332
+ },
1333
+ {
1334
+ "begin": "{",
1335
+ "beginCaptures": {
1336
+ "0": {
1337
+ "name": "punctuation.bracket.curly.java"
1338
+ }
1339
+ },
1340
+ "end": "}",
1341
+ "endCaptures": {
1342
+ "0": {
1343
+ "name": "punctuation.bracket.curly.java"
1344
+ }
1345
+ },
1346
+ "patterns": [
1347
+ {
1348
+ "include": "#code"
1349
+ }
1350
+ ]
1351
+ }
1352
+ ]
1353
+ },
1354
+ "primitive-arrays": {
1355
+ "patterns": [
1356
+ {
1357
+ "begin": "\\b(void|boolean|byte|char|short|int|float|long|double)\\b\\s*(?=\\[)",
1358
+ "beginCaptures": {
1359
+ "1": {
1360
+ "name": "storage.type.primitive.array.java"
1361
+ }
1362
+ },
1363
+ "end": "(?!\\s*\\[)",
1364
+ "patterns": [
1365
+ {
1366
+ "include": "#comments"
1367
+ },
1368
+ {
1369
+ "include": "#parens"
1370
+ }
1371
+ ]
1372
+ }
1373
+ ]
1374
+ },
1375
+ "primitive-types": {
1376
+ "match": "\\b(void|boolean|byte|char|short|int|float|long|double)\\b",
1377
+ "name": "storage.type.primitive.java"
1378
+ },
1379
+ "properties": {
1380
+ "patterns": [
1381
+ {
1382
+ "match": "(\\.)\\s*([a-zA-Z_$][\\w$]*)(?=\\s*\\.\\s*[a-zA-Z_$][\\w$]*)",
1383
+ "captures": {
1384
+ "1": {
1385
+ "name": "punctuation.separator.period.java"
1386
+ },
1387
+ "2": {
1388
+ "name": "variable.other.object.property.java"
1389
+ }
1390
+ }
1391
+ },
1392
+ {
1393
+ "match": "(\\.)\\s*([a-zA-Z_$][\\w$]*)",
1394
+ "captures": {
1395
+ "1": {
1396
+ "name": "punctuation.separator.period.java"
1397
+ },
1398
+ "2": {
1399
+ "name": "variable.other.object.property.java"
1400
+ }
1401
+ }
1402
+ },
1403
+ {
1404
+ "match": "(\\.)\\s*([0-9][\\w$]*)",
1405
+ "captures": {
1406
+ "1": {
1407
+ "name": "punctuation.separator.period.java"
1408
+ },
1409
+ "2": {
1410
+ "name": "invalid.illegal.identifier.java"
1411
+ }
1412
+ }
1413
+ }
1414
+ ]
1415
+ },
1416
+ "record": {
1417
+ "begin": "(?=\\w?[\\w\\s]*\\b(?:record)\\s+[\\w$]+)",
1418
+ "end": "}",
1419
+ "endCaptures": {
1420
+ "0": {
1421
+ "name": "punctuation.section.class.end.bracket.curly.java"
1422
+ }
1423
+ },
1424
+ "name": "meta.record.java",
1425
+ "patterns": [
1426
+ {
1427
+ "include": "#storage-modifiers"
1428
+ },
1429
+ {
1430
+ "include": "#generics"
1431
+ },
1432
+ {
1433
+ "include": "#comments"
1434
+ },
1435
+ {
1436
+ "begin": "(record)\\s+([\\w$]+)(<[\\w$]+>)?(\\()",
1437
+ "beginCaptures": {
1438
+ "1": {
1439
+ "name": "storage.modifier.java"
1440
+ },
1441
+ "2": {
1442
+ "name": "entity.name.type.record.java"
1443
+ },
1444
+ "3": {
1445
+ "patterns": [
1446
+ {
1447
+ "include": "#generics"
1448
+ }
1449
+ ]
1450
+ },
1451
+ "4": {
1452
+ "name": "punctuation.definition.parameters.begin.bracket.round.java"
1453
+ }
1454
+ },
1455
+ "end": "\\)",
1456
+ "endCaptures": {
1457
+ "0": {
1458
+ "name": "punctuation.definition.parameters.end.bracket.round.java"
1459
+ }
1460
+ },
1461
+ "name": "meta.record.identifier.java",
1462
+ "patterns": [
1463
+ {
1464
+ "include": "#code"
1465
+ }
1466
+ ]
1467
+ },
1468
+ {
1469
+ "begin": "(implements)\\s",
1470
+ "beginCaptures": {
1471
+ "1": {
1472
+ "name": "storage.modifier.implements.java"
1473
+ }
1474
+ },
1475
+ "end": "(?=\\s*\\{)",
1476
+ "name": "meta.definition.class.implemented.interfaces.java",
1477
+ "patterns": [
1478
+ {
1479
+ "include": "#object-types-inherited"
1480
+ },
1481
+ {
1482
+ "include": "#comments"
1483
+ }
1484
+ ]
1485
+ },
1486
+ {
1487
+ "include": "#record-body"
1488
+ }
1489
+ ]
1490
+ },
1491
+ "record-body": {
1492
+ "begin": "{",
1493
+ "beginCaptures": {
1494
+ "0": {
1495
+ "name": "punctuation.section.class.begin.bracket.curly.java"
1496
+ }
1497
+ },
1498
+ "end": "(?=})",
1499
+ "name": "meta.record.body.java",
1500
+ "patterns": [
1501
+ {
1502
+ "include": "#record-constructor"
1503
+ },
1504
+ {
1505
+ "include": "#class-body"
1506
+ }
1507
+ ]
1508
+ },
1509
+ "record-constructor": {
1510
+ "begin": "(?!new)(?=[\\w<].*\\s+)(?=([^\\(=/]|/(?!/))+(?={))",
1511
+ "end": "(})|(?=;)",
1512
+ "endCaptures": {
1513
+ "1": {
1514
+ "name": "punctuation.section.method.end.bracket.curly.java"
1515
+ }
1516
+ },
1517
+ "name": "meta.method.java",
1518
+ "patterns": [
1519
+ {
1520
+ "include": "#storage-modifiers"
1521
+ },
1522
+ {
1523
+ "begin": "(\\w+)",
1524
+ "beginCaptures": {
1525
+ "1": {
1526
+ "name": "entity.name.function.java"
1527
+ }
1528
+ },
1529
+ "end": "(?=\\s*{)",
1530
+ "name": "meta.method.identifier.java",
1531
+ "patterns": [
1532
+ {
1533
+ "include": "#comments"
1534
+ }
1535
+ ]
1536
+ },
1537
+ {
1538
+ "include": "#comments"
1539
+ },
1540
+ {
1541
+ "begin": "{",
1542
+ "beginCaptures": {
1543
+ "0": {
1544
+ "name": "punctuation.section.method.begin.bracket.curly.java"
1545
+ }
1546
+ },
1547
+ "end": "(?=})",
1548
+ "contentName": "meta.method.body.java",
1549
+ "patterns": [
1550
+ {
1551
+ "include": "#code"
1552
+ }
1553
+ ]
1554
+ }
1555
+ ]
1556
+ },
1557
+ "static-initializer": {
1558
+ "patterns": [
1559
+ {
1560
+ "include": "#anonymous-block-and-instance-initializer"
1561
+ },
1562
+ {
1563
+ "match": "static",
1564
+ "name": "storage.modifier.java"
1565
+ }
1566
+ ]
1567
+ },
1568
+ "storage-modifiers": {
1569
+ "match": "\\b(public|private|protected|static|final|native|synchronized|abstract|threadsafe|transient|volatile|default|strictfp|sealed|non-sealed)\\b",
1570
+ "name": "storage.modifier.java"
1571
+ },
1572
+ "strings": {
1573
+ "patterns": [
1574
+ {
1575
+ "begin": "\"\"\"",
1576
+ "beginCaptures": {
1577
+ "0": {
1578
+ "name": "punctuation.definition.string.begin.java"
1579
+ }
1580
+ },
1581
+ "end": "\"\"\"",
1582
+ "endCaptures": {
1583
+ "0": {
1584
+ "name": "punctuation.definition.string.end.java"
1585
+ }
1586
+ },
1587
+ "name": "string.quoted.triple.java",
1588
+ "patterns": [
1589
+ {
1590
+ "match": "\\\\\"\"\"",
1591
+ "name": "constant.character.escape.java"
1592
+ },
1593
+ {
1594
+ "match": "\\\\.",
1595
+ "name": "constant.character.escape.java"
1596
+ }
1597
+ ]
1598
+ },
1599
+ {
1600
+ "begin": "\"",
1601
+ "beginCaptures": {
1602
+ "0": {
1603
+ "name": "punctuation.definition.string.begin.java"
1604
+ }
1605
+ },
1606
+ "end": "\"",
1607
+ "endCaptures": {
1608
+ "0": {
1609
+ "name": "punctuation.definition.string.end.java"
1610
+ }
1611
+ },
1612
+ "name": "string.quoted.double.java",
1613
+ "patterns": [
1614
+ {
1615
+ "match": "\\\\.",
1616
+ "name": "constant.character.escape.java"
1617
+ }
1618
+ ]
1619
+ },
1620
+ {
1621
+ "begin": "'",
1622
+ "beginCaptures": {
1623
+ "0": {
1624
+ "name": "punctuation.definition.string.begin.java"
1625
+ }
1626
+ },
1627
+ "end": "'",
1628
+ "endCaptures": {
1629
+ "0": {
1630
+ "name": "punctuation.definition.string.end.java"
1631
+ }
1632
+ },
1633
+ "name": "string.quoted.single.java",
1634
+ "patterns": [
1635
+ {
1636
+ "match": "\\\\.",
1637
+ "name": "constant.character.escape.java"
1638
+ }
1639
+ ]
1640
+ }
1641
+ ]
1642
+ },
1643
+ "throws": {
1644
+ "begin": "throws",
1645
+ "beginCaptures": {
1646
+ "0": {
1647
+ "name": "storage.modifier.java"
1648
+ }
1649
+ },
1650
+ "end": "(?={|;)",
1651
+ "name": "meta.throwables.java",
1652
+ "patterns": [
1653
+ {
1654
+ "match": ",",
1655
+ "name": "punctuation.separator.delimiter.java"
1656
+ },
1657
+ {
1658
+ "match": "[a-zA-Z$_][\\.a-zA-Z0-9$_]*",
1659
+ "name": "storage.type.java"
1660
+ },
1661
+ {
1662
+ "include": "#comments"
1663
+ }
1664
+ ]
1665
+ },
1666
+ "try-catch-finally": {
1667
+ "patterns": [
1668
+ {
1669
+ "begin": "\\btry\\b",
1670
+ "beginCaptures": {
1671
+ "0": {
1672
+ "name": "keyword.control.try.java"
1673
+ }
1674
+ },
1675
+ "end": "}",
1676
+ "endCaptures": {
1677
+ "0": {
1678
+ "name": "punctuation.section.try.end.bracket.curly.java"
1679
+ }
1680
+ },
1681
+ "name": "meta.try.java",
1682
+ "patterns": [
1683
+ {
1684
+ "begin": "\\(",
1685
+ "beginCaptures": {
1686
+ "0": {
1687
+ "name": "punctuation.section.try.resources.begin.bracket.round.java"
1688
+ }
1689
+ },
1690
+ "end": "\\)",
1691
+ "endCaptures": {
1692
+ "0": {
1693
+ "name": "punctuation.section.try.resources.end.bracket.round.java"
1694
+ }
1695
+ },
1696
+ "name": "meta.try.resources.java",
1697
+ "patterns": [
1698
+ {
1699
+ "include": "#code"
1700
+ }
1701
+ ]
1702
+ },
1703
+ {
1704
+ "begin": "{",
1705
+ "beginCaptures": {
1706
+ "0": {
1707
+ "name": "punctuation.section.try.begin.bracket.curly.java"
1708
+ }
1709
+ },
1710
+ "end": "(?=})",
1711
+ "contentName": "meta.try.body.java",
1712
+ "patterns": [
1713
+ {
1714
+ "include": "#code"
1715
+ }
1716
+ ]
1717
+ }
1718
+ ]
1719
+ },
1720
+ {
1721
+ "begin": "\\b(catch)\\b",
1722
+ "beginCaptures": {
1723
+ "1": {
1724
+ "name": "keyword.control.catch.java"
1725
+ }
1726
+ },
1727
+ "end": "}",
1728
+ "endCaptures": {
1729
+ "0": {
1730
+ "name": "punctuation.section.catch.end.bracket.curly.java"
1731
+ }
1732
+ },
1733
+ "name": "meta.catch.java",
1734
+ "patterns": [
1735
+ {
1736
+ "include": "#comments"
1737
+ },
1738
+ {
1739
+ "begin": "\\(",
1740
+ "beginCaptures": {
1741
+ "0": {
1742
+ "name": "punctuation.definition.parameters.begin.bracket.round.java"
1743
+ }
1744
+ },
1745
+ "end": "\\)",
1746
+ "endCaptures": {
1747
+ "0": {
1748
+ "name": "punctuation.definition.parameters.end.bracket.round.java"
1749
+ }
1750
+ },
1751
+ "contentName": "meta.catch.parameters.java",
1752
+ "patterns": [
1753
+ {
1754
+ "include": "#comments"
1755
+ },
1756
+ {
1757
+ "include": "#storage-modifiers"
1758
+ },
1759
+ {
1760
+ "begin": "[a-zA-Z$_][\\.a-zA-Z0-9$_]*",
1761
+ "beginCaptures": {
1762
+ "0": {
1763
+ "name": "storage.type.java"
1764
+ }
1765
+ },
1766
+ "end": "(\\|)|(?=\\))",
1767
+ "endCaptures": {
1768
+ "1": {
1769
+ "name": "punctuation.catch.separator.java"
1770
+ }
1771
+ },
1772
+ "patterns": [
1773
+ {
1774
+ "include": "#comments"
1775
+ },
1776
+ {
1777
+ "match": "\\w+",
1778
+ "captures": {
1779
+ "0": {
1780
+ "name": "variable.parameter.java"
1781
+ }
1782
+ }
1783
+ }
1784
+ ]
1785
+ }
1786
+ ]
1787
+ },
1788
+ {
1789
+ "begin": "{",
1790
+ "beginCaptures": {
1791
+ "0": {
1792
+ "name": "punctuation.section.catch.begin.bracket.curly.java"
1793
+ }
1794
+ },
1795
+ "end": "(?=})",
1796
+ "contentName": "meta.catch.body.java",
1797
+ "patterns": [
1798
+ {
1799
+ "include": "#code"
1800
+ }
1801
+ ]
1802
+ }
1803
+ ]
1804
+ },
1805
+ {
1806
+ "begin": "\\bfinally\\b",
1807
+ "beginCaptures": {
1808
+ "0": {
1809
+ "name": "keyword.control.finally.java"
1810
+ }
1811
+ },
1812
+ "end": "}",
1813
+ "endCaptures": {
1814
+ "0": {
1815
+ "name": "punctuation.section.finally.end.bracket.curly.java"
1816
+ }
1817
+ },
1818
+ "name": "meta.finally.java",
1819
+ "patterns": [
1820
+ {
1821
+ "begin": "{",
1822
+ "beginCaptures": {
1823
+ "0": {
1824
+ "name": "punctuation.section.finally.begin.bracket.curly.java"
1825
+ }
1826
+ },
1827
+ "end": "(?=})",
1828
+ "contentName": "meta.finally.body.java",
1829
+ "patterns": [
1830
+ {
1831
+ "include": "#code"
1832
+ }
1833
+ ]
1834
+ }
1835
+ ]
1836
+ }
1837
+ ]
1838
+ },
1839
+ "variables": {
1840
+ "begin": "(?x)\n(?=\n \\b\n (\n (void|boolean|byte|char|short|int|float|long|double)\n |\n (?>(\\w+\\.)*[A-Z_]+\\w*) # e.g. `javax.ws.rs.Response`, or `String`\n )\n \\b\n \\s*\n (\n <[\\w<>,\\.?\\s\\[\\]]*> # e.g. `HashMap<Integer, String>`, or `List<java.lang.String>`\n )?\n \\s*\n (\n (\\[\\])* # int[][]\n )?\n \\s+\n [A-Za-z_$][\\w$]* # At least one identifier after space\n ([\\w\\[\\],$][\\w\\[\\],\\s]*)? # possibly primitive array or additional identifiers\n \\s*(=|:|;)\n)",
1841
+ "end": "(?=\\=|:|;)",
1842
+ "name": "meta.definition.variable.java",
1843
+ "patterns": [
1844
+ {
1845
+ "match": "([A-Za-z$_][\\w$]*)(?=\\s*(\\[\\])*\\s*(;|:|=|,))",
1846
+ "captures": {
1847
+ "1": {
1848
+ "name": "variable.other.definition.java"
1849
+ }
1850
+ }
1851
+ },
1852
+ {
1853
+ "include": "#all-types"
1854
+ },
1855
+ {
1856
+ "include": "#code"
1857
+ }
1858
+ ]
1859
+ },
1860
+ "variables-local": {
1861
+ "begin": "(?=\\b(var)\\b\\s+[A-Za-z_$][\\w$]*\\s*(=|:|;))",
1862
+ "end": "(?=\\=|:|;)",
1863
+ "name": "meta.definition.variable.local.java",
1864
+ "patterns": [
1865
+ {
1866
+ "match": "\\bvar\\b",
1867
+ "name": "storage.type.local.java"
1868
+ },
1869
+ {
1870
+ "match": "([A-Za-z$_][\\w$]*)(?=\\s*(\\[\\])*\\s*(=|:|;))",
1871
+ "captures": {
1872
+ "1": {
1873
+ "name": "variable.other.definition.java"
1874
+ }
1875
+ }
1876
+ },
1877
+ {
1878
+ "include": "#code"
1879
+ }
1880
+ ]
1881
+ }
1882
+ }
1883
+ }