github-linguist 7.5.1 → 7.6.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (81) hide show
  1. checksums.yaml +4 -4
  2. data/grammars/annotation.liquidhaskell.haskell.json +122 -24
  3. data/grammars/etc.json +7 -0
  4. data/grammars/hint.haskell.json +122 -24
  5. data/grammars/hint.message.haskell.json +122 -24
  6. data/grammars/hint.type.haskell.json +122 -24
  7. data/grammars/injections.etc.json +48 -10
  8. data/grammars/source.abnf.json +180 -353
  9. data/grammars/source.ballerina.json +205 -50
  10. data/grammars/source.bnf.json +191 -0
  11. data/grammars/source.cabal.json +1 -1
  12. data/grammars/source.ditroff.desc.json +1 -1
  13. data/grammars/source.ebnf.json +157 -147
  14. data/grammars/source.editorconfig.json +30 -5
  15. data/grammars/source.emacs.lisp.json +4 -4
  16. data/grammars/source.gremlin.json +200 -0
  17. data/grammars/source.haproxy-config.json +65 -13
  18. data/grammars/source.haskell.json +122 -24
  19. data/grammars/source.hql.json +1 -1
  20. data/grammars/source.hsig.json +122 -24
  21. data/grammars/source.hx.json +5 -5
  22. data/grammars/source.hxml.json +4 -4
  23. data/grammars/source.ideal.json +4 -4
  24. data/grammars/source.igor.json +325 -0
  25. data/grammars/source.jlex.json +322 -0
  26. data/grammars/source.julia.json +132 -1
  27. data/grammars/source.lean.json +103 -54
  28. data/grammars/source.lex.json +232 -0
  29. data/grammars/source.lex.regexp.json +269 -0
  30. data/grammars/source.logos.json +1 -1
  31. data/grammars/source.meson.json +1 -1
  32. data/grammars/source.mlir.json +389 -0
  33. data/grammars/source.nanorc.json +3 -0
  34. data/grammars/source.pic.json +19 -19
  35. data/grammars/source.plist.json +336 -0
  36. data/grammars/source.powershell.json +2 -2
  37. data/grammars/source.purescript.json +2 -2
  38. data/grammars/source.rascal.json +1 -0
  39. data/grammars/source.regexp.extended.json +544 -6
  40. data/grammars/source.regexp.json +408 -31
  41. data/grammars/source.renpy.json +3 -1
  42. data/grammars/source.scala.json +199 -97
  43. data/grammars/source.smpl.json +314 -0
  44. data/grammars/source.solidity.json +1 -1
  45. data/grammars/source.sourcepawn.json +654 -0
  46. data/grammars/source.sqf.json +5 -1
  47. data/grammars/source.swift.json +56 -11
  48. data/grammars/source.sy.json +800 -0
  49. data/grammars/source.ts.json +64 -47
  50. data/grammars/source.tsx.json +65 -48
  51. data/grammars/source.v.json +1184 -0
  52. data/grammars/source.viml.json +31 -31
  53. data/grammars/source.wollok.json +1 -1
  54. data/grammars/source.xojo.json +2 -2
  55. data/grammars/source.yacc.json +626 -0
  56. data/grammars/source.yara.json +1 -1
  57. data/grammars/source.yasnippet.json +15 -25
  58. data/grammars/source.zeek.json +4 -4
  59. data/grammars/source.zig.json +594 -195
  60. data/grammars/text.eml.basic.json +19 -6
  61. data/grammars/text.html.php.blade.json +3 -3
  62. data/grammars/text.plain.json +18 -0
  63. data/grammars/text.roff.json +926 -437
  64. data/grammars/text.runoff.json +3 -3
  65. data/grammars/text.tex.latex.haskell.json +122 -24
  66. data/grammars/text.texinfo.json +1525 -0
  67. data/grammars/text.xml.plist.json +664 -0
  68. data/grammars/text.xml.svg.json +556 -0
  69. data/grammars/version +1 -1
  70. data/lib/linguist.rb +3 -1
  71. data/lib/linguist/VERSION +1 -1
  72. data/lib/linguist/generated.rb +62 -17
  73. data/lib/linguist/heuristics.yml +13 -0
  74. data/lib/linguist/language.rb +1 -11
  75. data/lib/linguist/languages.json +1 -1
  76. data/lib/linguist/languages.yml +179 -19
  77. data/lib/linguist/samples.json +2778 -732
  78. data/lib/linguist/strategy/manpage.rb +42 -0
  79. metadata +22 -5
  80. data/grammars/source.bison.json +0 -55
  81. data/grammars/source.sp.json +0 -113
@@ -1094,7 +1094,9 @@
1094
1094
  },
1095
1095
  "regular_expressions": {
1096
1096
  "patterns": [
1097
- {}
1097
+ {
1098
+ "include": "source.regexp.python"
1099
+ }
1098
1100
  ]
1099
1101
  },
1100
1102
  "string_quoted_double": {
@@ -7,21 +7,99 @@
7
7
  }
8
8
  ],
9
9
  "repository": {
10
+ "backQuotedVariable": {
11
+ "match": "`[^`]+`"
12
+ },
10
13
  "block-comments": {
11
- "name": "comment.block.scala",
12
- "begin": "/\\*",
13
- "end": "\\*/",
14
14
  "patterns": [
15
15
  {
16
- "include": "#block-comments"
16
+ "name": "comment.block.empty.scala",
17
+ "match": "/\\*\\*/",
18
+ "captures": {
19
+ "0": {
20
+ "name": "punctuation.definition.comment.scala"
21
+ }
22
+ }
23
+ },
24
+ {
25
+ "name": "comment.block.documentation.scala",
26
+ "begin": "^\\s*(/\\*\\*)(?!/)",
27
+ "end": "\\*/",
28
+ "patterns": [
29
+ {
30
+ "match": "(@param)\\s+(\\S+)",
31
+ "captures": {
32
+ "1": {
33
+ "name": "keyword.other.documentation.scaladoc.scala"
34
+ },
35
+ "2": {
36
+ "name": "variable.parameter.scala"
37
+ }
38
+ }
39
+ },
40
+ {
41
+ "match": "(@(?:tparam|throws))\\s+(\\S+)",
42
+ "captures": {
43
+ "1": {
44
+ "name": "keyword.other.documentation.scaladoc.scala"
45
+ },
46
+ "2": {
47
+ "name": "entity.name.class"
48
+ }
49
+ }
50
+ },
51
+ {
52
+ "name": "keyword.other.documentation.scaladoc.scala",
53
+ "match": "@(return|see|note|example|constructor|usecase|author|version|since|todo|deprecated|migration|define|inheritdoc)\\b"
54
+ },
55
+ {
56
+ "match": "(\\[\\[)([^\\]]+)(\\]\\])",
57
+ "captures": {
58
+ "1": {
59
+ "name": "punctuation.definition.documentation.link.scala"
60
+ },
61
+ "2": {
62
+ "name": "string.other.link.title.markdown"
63
+ },
64
+ "3": {
65
+ "name": "punctuation.definition.documentation.link.scala"
66
+ }
67
+ }
68
+ },
69
+ {
70
+ "include": "#block-comments"
71
+ }
72
+ ],
73
+ "beginCaptures": {
74
+ "1": {
75
+ "name": "punctuation.definition.comment.scala"
76
+ }
77
+ },
78
+ "endCaptures": {
79
+ "0": {
80
+ "name": "punctuation.definition.comment.scala"
81
+ }
82
+ }
17
83
  },
18
84
  {
19
- "match": "(?x)\n\t\t\t(?! /\\*)\n\t\t\t(?! \\*/)\n\t\t "
85
+ "name": "comment.block.scala",
86
+ "begin": "/\\*",
87
+ "end": "\\*/",
88
+ "patterns": [
89
+ {
90
+ "include": "#block-comments"
91
+ }
92
+ ],
93
+ "captures": {
94
+ "0": {
95
+ "name": "punctuation.definition.comment.scala"
96
+ }
97
+ }
20
98
  }
21
99
  ]
22
100
  },
23
101
  "char-literal": {
24
- "name": "constant.character.literal.scala",
102
+ "name": "string.quoted.other constant.character.literal.scala",
25
103
  "begin": "'",
26
104
  "end": "'",
27
105
  "patterns": [
@@ -94,9 +172,6 @@
94
172
  {
95
173
  "include": "#scala-quoted"
96
174
  },
97
- {
98
- "include": "#special-identifier"
99
- },
100
175
  {
101
176
  "include": "#char-literal"
102
177
  },
@@ -109,6 +184,9 @@
109
184
  {
110
185
  "include": "#qualifiedClassName"
111
186
  },
187
+ {
188
+ "include": "#backQuotedVariable"
189
+ },
112
190
  {
113
191
  "include": "#meta-brackets"
114
192
  },
@@ -123,80 +201,7 @@
123
201
  "comments": {
124
202
  "patterns": [
125
203
  {
126
- "name": "comment.block.empty.scala",
127
- "match": "/\\*\\*/",
128
- "captures": {
129
- "0": {
130
- "name": "punctuation.definition.comment.scala"
131
- }
132
- }
133
- },
134
- {
135
- "name": "comment.block.documentation.scala",
136
- "begin": "^\\s*(/\\*\\*)(?!/)",
137
- "end": "\\*/",
138
- "patterns": [
139
- {
140
- "match": "(@param)\\s+(\\S+)",
141
- "captures": {
142
- "1": {
143
- "name": "keyword.other.documentation.scaladoc.scala"
144
- },
145
- "2": {
146
- "name": "variable.parameter.scala"
147
- }
148
- }
149
- },
150
- {
151
- "match": "(@(?:tparam|throws))\\s+(\\S+)",
152
- "captures": {
153
- "1": {
154
- "name": "keyword.other.documentation.scaladoc.scala"
155
- },
156
- "2": {
157
- "name": "entity.name.class"
158
- }
159
- }
160
- },
161
- {
162
- "name": "keyword.other.documentation.scaladoc.scala",
163
- "match": "@(return|see|note|example|usecase|author|version|since|todo|deprecated|migration|define|inheritdoc)\\b"
164
- },
165
- {
166
- "match": "(\\[\\[)([^\\]]+)(\\]\\])",
167
- "captures": {
168
- "1": {
169
- "name": "punctuation.definition.documentation.link.scala"
170
- },
171
- "2": {
172
- "name": "entity.other.documentation.link.scala"
173
- },
174
- "3": {
175
- "name": "punctuation.definition.documentation.link.scala"
176
- }
177
- }
178
- }
179
- ],
180
- "beginCaptures": {
181
- "1": {
182
- "name": "punctuation.definition.comment.scala"
183
- }
184
- },
185
- "endCaptures": {
186
- "0": {
187
- "name": "punctuation.definition.comment.scala"
188
- }
189
- }
190
- },
191
- {
192
- "name": "comment.block.scala",
193
- "begin": "/\\*",
194
- "end": "\\*/",
195
- "captures": {
196
- "0": {
197
- "name": "punctuation.definition.comment.scala"
198
- }
199
- }
204
+ "include": "#block-comments"
200
205
  },
201
206
  {
202
207
  "begin": "(^[ \\t]+)?(?=//)",
@@ -248,7 +253,7 @@
248
253
  "declarations": {
249
254
  "patterns": [
250
255
  {
251
- "match": "(?x)\n\t\t\t\t\t\t\\b(def)\\s+\n\t\t\t\t\t\t(`[^`]+`|[_$a-zA-Z][_$a-zA-Z0-9]*(?:_[^\\t .,;()\\[\\]{}'\"`\\w])(?=[(\\t ])|[_$a-zA-Z][_$a-zA-Z0-9]*|[-?~\u003e\u003c^+*%:!#|/@\\\\]+)",
256
+ "match": "(?x)\\b(def)\\s+(`[^`]+`|(?:[A-Z\\p{Lt}\\p{Lu}_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}][A-Z\\p{Lt}\\p{Lu}_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}0-9]*(?:(?\u003c=_)[!#%\u0026*+\\-\\/:\u003c\u003e=?@^|~\\p{Sm}\\p{So}]+)?|[!#%\u0026*+\\-\\/:\u003c\u003e=?@^|~\\p{Sm}\\p{So}]+))",
252
257
  "captures": {
253
258
  "1": {
254
259
  "name": "keyword.declaration.scala"
@@ -284,7 +289,7 @@
284
289
  }
285
290
  },
286
291
  {
287
- "match": "\\b(type)\\s+(`[^`]+`|[_$a-zA-Z][_$a-zA-Z0-9]*(?:_[^\\s])(?=[\\t ])|[_$a-zA-Z][_$a-zA-Z0-9]*|[-?~\u003e\u003c^+*%:!#|/@\\\\]+)",
292
+ "match": "\\b(type)\\s+(`[^`]+`|(?:[A-Z\\p{Lt}\\p{Lu}_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}][A-Z\\p{Lt}\\p{Lu}_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}0-9]*(?:(?\u003c=_)[!#%\u0026*+\\-\\/:\u003c\u003e=?@^|~\\p{Sm}\\p{So}]+)?|[!#%\u0026*+\\-\\/:\u003c\u003e=?@^|~\\p{Sm}\\p{So}]+))",
288
293
  "captures": {
289
294
  "1": {
290
295
  "name": "keyword.declaration.scala"
@@ -295,7 +300,7 @@
295
300
  }
296
301
  },
297
302
  {
298
- "match": "\\b(val)\\s+(?:([A-Z][_a-zA-Z0-9]*))\\b",
303
+ "match": "\\b(val)\\s+([A-Z\\p{Lt}\\p{Lu}][A-Z\\p{Lt}\\p{Lu}_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}0-9]*(?:(?\u003c=_)[!#%\u0026*+\\-\\/:\u003c\u003e=?@^|~\\p{Sm}\\p{So}]+)?)\\b",
299
304
  "captures": {
300
305
  "1": {
301
306
  "name": "keyword.declaration.stable.scala"
@@ -306,7 +311,7 @@
306
311
  }
307
312
  },
308
313
  {
309
- "match": "\\b(?:(val)|(var))\\s+(?:(`[^`]+`|[_$a-zA-Z][_$a-zA-Z0-9]*(?:_[^\\t .,;()\\[\\]{}'\"`\\w])(?=[\\t ])|[_$a-zA-Z][_$a-zA-Z0-9]*|[-?~\u003e\u003c^+*%:!#|/@\\\\]+)|(?=\\())",
314
+ "match": "\\b(?:(val)|(var))\\s+(?:(`[^`]+`|(?:[A-Z\\p{Lt}\\p{Lu}_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}][A-Z\\p{Lt}\\p{Lu}_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}0-9]*(?:(?\u003c=_)[!#%\u0026*+\\-\\/:\u003c\u003e=?@^|~\\p{Sm}\\p{So}]+)?|[!#%\u0026*+\\-\\/:\u003c\u003e=?@^|~\\p{Sm}\\p{So}]+))|(?=\\())",
310
315
  "captures": {
311
316
  "1": {
312
317
  "name": "keyword.declaration.stable.scala"
@@ -343,7 +348,7 @@
343
348
  },
344
349
  {
345
350
  "name": "entity.name.package.scala",
346
- "match": "(`[^`]+`|[_$a-zA-Z][_$a-zA-Z0-9]*)"
351
+ "match": "(`[^`]+`|(?:[A-Z\\p{Lt}\\p{Lu}_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}][A-Z\\p{Lt}\\p{Lu}_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}0-9]*(?:(?\u003c=_)[!#%\u0026*+\\-\\/:\u003c\u003e=?@^|~\\p{Sm}\\p{So}]+)?|[!#%\u0026*+\\-\\/:\u003c\u003e=?@^|~\\p{Sm}\\p{So}]+))"
347
352
  },
348
353
  {
349
354
  "name": "punctuation.definition.package",
@@ -377,7 +382,7 @@
377
382
  },
378
383
  {
379
384
  "name": "entity.name.import.scala",
380
- "match": "(`[^`]+`|[_$a-zA-Z][_$a-zA-Z0-9]*)"
385
+ "match": "(`[^`]+`|(?:[A-Z\\p{Lt}\\p{Lu}_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}][A-Z\\p{Lt}\\p{Lu}_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}0-9]*(?:(?\u003c=_)[!#%\u0026*+\\-\\/:\u003c\u003e=?@^|~\\p{Sm}\\p{So}]+)?|[!#%\u0026*+\\-\\/:\u003c\u003e=?@^|~\\p{Sm}\\p{So}]+))"
381
386
  },
382
387
  {
383
388
  "name": "punctuation.definition.import",
@@ -389,7 +394,7 @@
389
394
  "end": "}",
390
395
  "patterns": [
391
396
  {
392
- "match": "(?x) \\s*\n\t\t\t\t (`[^`]+`|[_$a-zA-Z][_$a-zA-Z0-9]*) \\s*\n\t\t\t\t (=\u003e) \\s*\n\t\t\t\t (`[^`]+`|[_$a-zA-Z][_$a-zA-Z0-9]*) \\s*\n\t\t\t ",
397
+ "match": "(?x)\\s*(`[^`]+`|(?:[A-Z\\p{Lt}\\p{Lu}_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}][A-Z\\p{Lt}\\p{Lu}_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}0-9]*(?:(?\u003c=_)[!#%\u0026*+\\-\\/:\u003c\u003e=?@^|~\\p{Sm}\\p{So}]+)?|[!#%\u0026*+\\-\\/:\u003c\u003e=?@^|~\\p{Sm}\\p{So}]+))\\s*(=\u003e)\\s*(`[^`]+`|(?:[A-Z\\p{Lt}\\p{Lu}_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}][A-Z\\p{Lt}\\p{Lu}_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}0-9]*(?:(?\u003c=_)[!#%\u0026*+\\-\\/:\u003c\u003e=?@^|~\\p{Sm}\\p{So}]+)?|[!#%\u0026*+\\-\\/:\u003c\u003e=?@^|~\\p{Sm}\\p{So}]+))\\s*",
393
398
  "captures": {
394
399
  "1": {
395
400
  "name": "entity.name.import.renamed-from.scala"
@@ -428,7 +433,7 @@
428
433
  "inheritance": {
429
434
  "patterns": [
430
435
  {
431
- "match": "(extends|with)\\s+([^\\s\\{\\(\\[\\]]+)",
436
+ "match": "(extends|with|derives|as)\\s+([^\\s\\{\\(\\[\\]]+)",
432
437
  "captures": {
433
438
  "1": {
434
439
  "name": "keyword.declaration.scala"
@@ -518,7 +523,7 @@
518
523
  "parameter-list": {
519
524
  "patterns": [
520
525
  {
521
- "match": "(?\u003c=[^\\._$a-zA-Z0-9])(`[^`]+`|[_$a-z][_$a-zA-Z0-9]*(?:_[^\\s])(?=[\\t ])|[_$a-z][_$a-zA-Z0-9]*|[-?~\u003e\u003c^+*%:!#|/@\\\\]+)\\s*(:)\\s+",
526
+ "match": "(?\u003c=[^\\._$a-zA-Z0-9])(`[^`]+`|[_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}][A-Z\\p{Lt}\\p{Lu}_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}0-9]*(?:(?\u003c=_)[!#%\u0026*+\\-\\/:\u003c\u003e=?@^|~\\p{Sm}\\p{So}]+)?)\\s*(:)\\s+",
522
527
  "captures": {
523
528
  "1": {
524
529
  "name": "variable.parameter.scala"
@@ -544,7 +549,7 @@
544
549
  },
545
550
  "scala-symbol": {
546
551
  "name": "constant.other.symbol.scala",
547
- "match": "'\\w+(?=[^'\\w]|$)"
552
+ "match": "(?\u003e'(?:[A-Z\\p{Lt}\\p{Lu}_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}][A-Z\\p{Lt}\\p{Lu}_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}0-9]*(?:(?\u003c=_)[!#%\u0026*+\\-\\/:\u003c\u003e=?@^|~\\p{Sm}\\p{So}]+)?|[!#%\u0026*+\\-\\/:\u003c\u003e=?@^|~\\p{Sm}\\p{So}]+))(?!')"
548
553
  },
549
554
  "script-header": {
550
555
  "name": "comment.block.shebang.scala",
@@ -555,9 +560,6 @@
555
560
  }
556
561
  }
557
562
  },
558
- "special-identifier": {
559
- "match": "\\b[_$a-zA-Z][_$a-zA-Z0-9]*(?:_[^\\t .,;()\\[\\]{}'\"`\\w])"
560
- },
561
563
  "storage-modifiers": {
562
564
  "patterns": [
563
565
  {
@@ -566,7 +568,43 @@
566
568
  },
567
569
  {
568
570
  "name": "storage.modifier.other",
569
- "match": "\\b(synchronized|@volatile|abstract|final|lazy|sealed|implicit|override|@transient|@native)\\b"
571
+ "match": "\\b(synchronized|@volatile|abstract|final|lazy|sealed|implicit|given|erased|enum|inline |opaque |override|@transient|@native)\\b"
572
+ }
573
+ ]
574
+ },
575
+ "string-interpolation": {
576
+ "patterns": [
577
+ {
578
+ "name": "constant.character.escape.interpolation.scala",
579
+ "match": "\\$\\$"
580
+ },
581
+ {
582
+ "match": "(\\$)([A-Z\\p{Lt}\\p{Lu}_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}][A-Z\\p{Lt}\\p{Lu}_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}0-9]*)",
583
+ "captures": {
584
+ "1": {
585
+ "name": "punctuation.definition.template-expression.begin.scala"
586
+ }
587
+ }
588
+ },
589
+ {
590
+ "name": "punctuation.definition.template-expression.scala",
591
+ "begin": "\\$\\{",
592
+ "end": "\\}",
593
+ "patterns": [
594
+ {
595
+ "include": "#code"
596
+ }
597
+ ],
598
+ "beginCaptures": {
599
+ "0": {
600
+ "name": "punctuation.definition.template-expression.begin.scala"
601
+ }
602
+ },
603
+ "endCaptures": {
604
+ "0": {
605
+ "name": "punctuation.definition.template-expression.end.scala"
606
+ }
607
+ }
570
608
  }
571
609
  ]
572
610
  },
@@ -593,6 +631,36 @@
593
631
  }
594
632
  }
595
633
  },
634
+ {
635
+ "begin": "\\b([A-Z\\p{Lt}\\p{Lu}_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}]+)(\"\"\")",
636
+ "end": "\"\"\"(?!\")",
637
+ "patterns": [
638
+ {
639
+ "include": "#string-interpolation"
640
+ },
641
+ {
642
+ "name": "constant.character.escape.scala",
643
+ "match": "\\\\\\\\|\\\\u[0-9A-Fa-f]{4}"
644
+ },
645
+ {
646
+ "name": "string.quoted.triple.interpolated.scala",
647
+ "match": "."
648
+ }
649
+ ],
650
+ "beginCaptures": {
651
+ "1": {
652
+ "name": "keyword.interpolation.scala"
653
+ },
654
+ "2": {
655
+ "name": "string.quoted.triple.interpolated.scala punctuation.definition.string.begin.scala"
656
+ }
657
+ },
658
+ "endCaptures": {
659
+ "0": {
660
+ "name": "string.quoted.triple.interpolated.scala punctuation.definition.string.end.scala"
661
+ }
662
+ }
663
+ },
596
664
  {
597
665
  "name": "string.quoted.double.scala",
598
666
  "begin": "\"",
@@ -617,6 +685,40 @@
617
685
  "name": "punctuation.definition.string.end.scala"
618
686
  }
619
687
  }
688
+ },
689
+ {
690
+ "begin": "\\b([A-Z\\p{Lt}\\p{Lu}_a-z\\$\\p{Lo}\\p{Nl}\\p{Ll}]+)(\")",
691
+ "end": "\"",
692
+ "patterns": [
693
+ {
694
+ "include": "#string-interpolation"
695
+ },
696
+ {
697
+ "name": "constant.character.escape.scala",
698
+ "match": "\\\\(?:[btnfr\\\\\"']|[0-7]{1,3}|u[0-9A-Fa-f]{4})"
699
+ },
700
+ {
701
+ "name": "invalid.illegal.unrecognized-string-escape.scala",
702
+ "match": "\\\\."
703
+ },
704
+ {
705
+ "name": "string.quoted.double.interpolated.scala",
706
+ "match": "."
707
+ }
708
+ ],
709
+ "beginCaptures": {
710
+ "1": {
711
+ "name": "keyword.interpolation.scala"
712
+ },
713
+ "2": {
714
+ "name": "string.quoted.double.interpolated.scala punctuation.definition.string.begin.scala"
715
+ }
716
+ },
717
+ "endCaptures": {
718
+ "0": {
719
+ "name": "string.quoted.double.interpolated.scala punctuation.definition.string.end.scala"
720
+ }
721
+ }
620
722
  }
621
723
  ]
622
724
  },
@@ -0,0 +1,314 @@
1
+ {
2
+ "name": "SmPL",
3
+ "scopeName": "source.smpl",
4
+ "patterns": [
5
+ {
6
+ "include": "#main"
7
+ }
8
+ ],
9
+ "repository": {
10
+ "comment": {
11
+ "patterns": [
12
+ {
13
+ "name": "comment.line.triple-slash.smpl",
14
+ "begin": "///",
15
+ "end": "$",
16
+ "beginCaptures": {
17
+ "0": {
18
+ "name": "punctuation.definition.comment.smpl"
19
+ }
20
+ }
21
+ },
22
+ {
23
+ "name": "comment.line.double-slash.smpl",
24
+ "begin": "//",
25
+ "end": "$",
26
+ "beginCaptures": {
27
+ "0": {
28
+ "name": "punctuation.definition.comment.smpl"
29
+ }
30
+ }
31
+ }
32
+ ]
33
+ },
34
+ "control": {
35
+ "patterns": [
36
+ {
37
+ "name": "storage.modifier.required.dots.smpl",
38
+ "match": "\u003c\\+(?=\\.{3})|(?\u003c=\\.{3})\\+\u003e"
39
+ },
40
+ {
41
+ "name": "storage.modifier.optional.dots.smpl",
42
+ "match": "\u003c(?=\\.{3})|(?\u003c=\\.{3})\u003e"
43
+ },
44
+ {
45
+ "name": "keyword.control.flow.dots.smpl",
46
+ "match": "\\.{3}"
47
+ }
48
+ ]
49
+ },
50
+ "include": {
51
+ "name": "meta.preprocessor.$1.smpl",
52
+ "match": "^\\s*(include|using)\\s+(?:(\"[^\"]*\")|(\u003c.*\u003e))",
53
+ "captures": {
54
+ "1": {
55
+ "name": "keyword.control.directive.$1.smpl"
56
+ },
57
+ "2": {
58
+ "patterns": [
59
+ {
60
+ "include": "etc#str"
61
+ }
62
+ ]
63
+ },
64
+ "3": {
65
+ "patterns": [
66
+ {
67
+ "include": "#isoPath"
68
+ }
69
+ ]
70
+ }
71
+ }
72
+ },
73
+ "isoPath": {
74
+ "name": "string.quoted.other.lt-gt.include.smpl",
75
+ "begin": "\u003c",
76
+ "end": "\u003e",
77
+ "beginCaptures": {
78
+ "0": {
79
+ "name": "punctuation.definition.string.begin.smpl"
80
+ }
81
+ },
82
+ "endCaptures": {
83
+ "0": {
84
+ "name": "punctuation.definition.string.end.smpl"
85
+ }
86
+ }
87
+ },
88
+ "lineAdded": {
89
+ "name": "markup.inserted.diff.smpl",
90
+ "match": "^(\\+).*",
91
+ "captures": {
92
+ "1": {
93
+ "name": "punctuation.definition.inserted.diff.smpl"
94
+ }
95
+ }
96
+ },
97
+ "lineDeleted": {
98
+ "name": "markup.deleted.diff.smpl",
99
+ "match": "^(-).*",
100
+ "captures": {
101
+ "1": {
102
+ "name": "punctuation.definition.deleted.diff.smpl"
103
+ }
104
+ }
105
+ },
106
+ "lineMatched": {
107
+ "match": "^(\\*)\\s*(\\S.*)",
108
+ "captures": {
109
+ "1": {
110
+ "name": "keyword.operator.semantic-match.diff.smpl"
111
+ },
112
+ "2": {
113
+ "name": "markup.changed.diff.smpl"
114
+ }
115
+ }
116
+ },
117
+ "main": {
118
+ "patterns": [
119
+ {
120
+ "include": "#comment"
121
+ },
122
+ {
123
+ "include": "#include"
124
+ },
125
+ {
126
+ "include": "#virtual"
127
+ },
128
+ {
129
+ "include": "#control"
130
+ },
131
+ {
132
+ "include": "#scripts"
133
+ },
134
+ {
135
+ "include": "#metavariables"
136
+ },
137
+ {
138
+ "include": "#variables"
139
+ },
140
+ {
141
+ "include": "#lineAdded"
142
+ },
143
+ {
144
+ "include": "#lineDeleted"
145
+ },
146
+ {
147
+ "include": "#lineMatched"
148
+ },
149
+ {
150
+ "include": "#when"
151
+ }
152
+ ]
153
+ },
154
+ "metavariables": {
155
+ "name": "meta.diff.header.metavariables.smpl",
156
+ "begin": "^(@).*(@)\\s*$",
157
+ "end": "^(@@)",
158
+ "beginCaptures": {
159
+ "0": {
160
+ "name": "meta.diff.range.smpl"
161
+ },
162
+ "1": {
163
+ "name": "punctuation.definition.range.diff.begin.smpl"
164
+ },
165
+ "2": {
166
+ "name": "punctuation.definition.range.diff.end.smpl"
167
+ }
168
+ },
169
+ "endCaptures": {
170
+ "0": {
171
+ "name": "meta.diff.range.smpl"
172
+ },
173
+ "1": {
174
+ "name": "punctuation.definition.range.diff.smpl"
175
+ }
176
+ }
177
+ },
178
+ "scripts": {
179
+ "patterns": [
180
+ {
181
+ "begin": "(^(@).*?(?\u003c=\\s|@)(script|initialize|finalize):python(?=\\s|@).*?(@)\\s*$)",
182
+ "end": "^(?=@(?!@\\s*$))",
183
+ "patterns": [
184
+ {
185
+ "name": "meta.diff.header.metavariables.smpl",
186
+ "begin": "^",
187
+ "end": "^(@@)",
188
+ "endCaptures": {
189
+ "0": {
190
+ "name": "meta.diff.range.smpl"
191
+ },
192
+ "1": {
193
+ "name": "punctuation.definition.range.diff.smpl"
194
+ }
195
+ }
196
+ },
197
+ {
198
+ "contentName": "source.embedded.python",
199
+ "begin": "(?\u003c=@@)\\s*$\\n?",
200
+ "end": "^(?=@)",
201
+ "patterns": [
202
+ {
203
+ "include": "#comment"
204
+ },
205
+ {
206
+ "include": "source.python"
207
+ }
208
+ ]
209
+ }
210
+ ],
211
+ "beginCaptures": {
212
+ "0": {
213
+ "name": "meta.diff.header.metavariables.smpl"
214
+ },
215
+ "1": {
216
+ "name": "meta.diff.range.smpl"
217
+ },
218
+ "2": {
219
+ "name": "punctuation.definition.range.diff.begin.smpl"
220
+ },
221
+ "3": {
222
+ "name": "punctuation.definition.range.diff.end.smpl"
223
+ }
224
+ }
225
+ },
226
+ {
227
+ "begin": "(^(@).*?(?\u003c=\\s|@)(script|initialize|finalize):ocaml(?=\\s|@).*?(@)\\s*$)",
228
+ "end": "^(?=@(?!@\\s*$))",
229
+ "patterns": [
230
+ {
231
+ "name": "meta.diff.header.metavariables.smpl",
232
+ "begin": "^",
233
+ "end": "^(@@)",
234
+ "endCaptures": {
235
+ "0": {
236
+ "name": "meta.diff.range.smpl"
237
+ },
238
+ "1": {
239
+ "name": "punctuation.definition.range.diff.smpl"
240
+ }
241
+ }
242
+ },
243
+ {
244
+ "contentName": "source.embedded.ocaml",
245
+ "begin": "(?\u003c=@@)\\s*$\\n?",
246
+ "end": "^(?=@)",
247
+ "patterns": [
248
+ {
249
+ "include": "#comment"
250
+ },
251
+ {
252
+ "include": "source.ocaml"
253
+ }
254
+ ]
255
+ }
256
+ ],
257
+ "beginCaptures": {
258
+ "0": {
259
+ "name": "meta.diff.header.metavariables.smpl"
260
+ },
261
+ "1": {
262
+ "name": "meta.diff.range.smpl"
263
+ },
264
+ "2": {
265
+ "name": "punctuation.definition.range.diff.begin.smpl"
266
+ },
267
+ "3": {
268
+ "name": "punctuation.definition.range.diff.end.smpl"
269
+ }
270
+ }
271
+ }
272
+ ]
273
+ },
274
+ "variables": {
275
+ "name": "variable.at-prefix.smpl",
276
+ "match": "(?\u003c!^)(@)[\\w]+",
277
+ "captures": {
278
+ "1": {
279
+ "name": "keyword.operator.variable.smpl"
280
+ }
281
+ }
282
+ },
283
+ "virtual": {
284
+ "match": "^\\s*(virtual)\\s+(.*)",
285
+ "captures": {
286
+ "1": {
287
+ "name": "storage.modifier.virtual.smpl"
288
+ },
289
+ "2": {
290
+ "patterns": [
291
+ {
292
+ "name": "entity.name.rule.smpl",
293
+ "match": "[^\\s,]+"
294
+ },
295
+ {
296
+ "include": "etc#comma"
297
+ }
298
+ ]
299
+ }
300
+ }
301
+ },
302
+ "when": {
303
+ "match": "(?\u003c=\\s|\\.{3})(when)\\s*(any(?:\\s|$)|!=)",
304
+ "captures": {
305
+ "1": {
306
+ "name": "keyword.control.flow.when.smpl"
307
+ },
308
+ "2": {
309
+ "name": "keyword.operator.comparison.smpl"
310
+ }
311
+ }
312
+ }
313
+ }
314
+ }