github-linguist 7.6.1 → 7.7.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (78) hide show
  1. checksums.yaml +5 -5
  2. data/bin/github-linguist +17 -4
  3. data/grammars/annotation.liquidhaskell.haskell.json +11 -11
  4. data/grammars/etc.json +212 -3
  5. data/grammars/hidden.manref.json +29 -0
  6. data/grammars/hint.haskell.json +11 -11
  7. data/grammars/hint.message.haskell.json +11 -11
  8. data/grammars/hint.type.haskell.json +11 -11
  9. data/grammars/injections.etc.json +601 -1
  10. data/grammars/source.abap.json +7 -7
  11. data/grammars/source.abnf.json +23 -1
  12. data/grammars/source.ahk.json +3 -3
  13. data/grammars/source.angelscript.json +1 -1
  14. data/grammars/source.ballerina.json +54 -18
  15. data/grammars/source.csound.json +1 -1
  16. data/grammars/source.css.json +2 -2
  17. data/grammars/source.css.scss.json +164 -15
  18. data/grammars/source.curlrc.json +869 -65
  19. data/grammars/source.dart.json +1 -1
  20. data/grammars/source.dircolors.json +39 -0
  21. data/grammars/source.direct-x.json +135 -0
  22. data/grammars/source.ebnf.json +67 -39
  23. data/grammars/source.elixir.json +43 -0
  24. data/grammars/source.gfm.json +1 -1
  25. data/grammars/source.gitconfig.json +1 -1
  26. data/grammars/source.hack.json +196 -80
  27. data/grammars/source.haskell.json +11 -11
  28. data/grammars/source.hosts.json +40 -0
  29. data/grammars/source.hsig.json +11 -11
  30. data/grammars/source.igor.json +2 -2
  31. data/grammars/source.ini.npmrc.json +311 -0
  32. data/grammars/source.inno.json +133 -0
  33. data/grammars/source.inputrc.json +500 -0
  34. data/grammars/source.js.json +4 -4
  35. data/grammars/source.julia.json +45 -3
  36. data/grammars/source.kotlin.json +1 -1
  37. data/grammars/source.lex.json +4 -4
  38. data/grammars/source.m4.json +141 -99
  39. data/grammars/source.man-conf.json +46 -34
  40. data/grammars/source.matlab.json +225 -35
  41. data/grammars/source.mcfunction-snapshot.json +21388 -561
  42. data/grammars/source.mcfunction.json +55 -5
  43. data/grammars/source.mlir.json +37 -317
  44. data/grammars/source.mrc.json +858 -0
  45. data/grammars/source.opts.json +12 -2
  46. data/grammars/source.p4.json +21 -5
  47. data/grammars/source.prisma.json +428 -0
  48. data/grammars/source.python.json +2 -0
  49. data/grammars/source.reason.json +28 -16
  50. data/grammars/source.rego.json +124 -0
  51. data/grammars/source.sass.json +158 -3
  52. data/grammars/source.scala.json +26 -15
  53. data/grammars/source.ssh-config.json +1 -14
  54. data/grammars/source.swift.json +162 -2
  55. data/grammars/source.ts.json +74 -25
  56. data/grammars/source.tsx.json +75 -26
  57. data/grammars/source.v.json +58 -16
  58. data/grammars/source.vim-snippet.json +645 -0
  59. data/grammars/source.viml.json +5 -5
  60. data/grammars/source.wgetrc.json +1640 -0
  61. data/grammars/source.zig.json +169 -304
  62. data/grammars/text.html.php.blade.json +1 -1
  63. data/grammars/text.html.riot.json +788 -0
  64. data/grammars/text.muse.json +1471 -0
  65. data/grammars/text.tex.latex.haskell.json +11 -11
  66. data/grammars/text.vim-help.json +383 -0
  67. data/grammars/version +1 -1
  68. data/lib/linguist/VERSION +1 -1
  69. data/lib/linguist/blob_helper.rb +4 -2
  70. data/lib/linguist/generated.rb +39 -12
  71. data/lib/linguist/heuristics.yml +16 -1
  72. data/lib/linguist/languages.json +1 -1
  73. data/lib/linguist/languages.yml +183 -14
  74. data/lib/linguist/linguist.bundle +0 -0
  75. data/lib/linguist/samples.json +6910 -536
  76. data/lib/linguist/vendor.yml +6 -0
  77. metadata +18 -5
  78. data/grammars/source.jlex.json +0 -322
@@ -232,7 +232,7 @@
232
232
  },
233
233
  {
234
234
  "name": "keyword.declaration.dart",
235
- "match": "(?\u003c!\\$)\\b(abstract|class|enum|extends|external|factory|implements|get|mixin|native|operator|set|typedef|with|covariant)\\b(?!\\$)"
235
+ "match": "(?\u003c!\\$)\\b(abstract|class|enum|extends|extension|external|factory|implements|get|mixin|native|operator|set|typedef|with|covariant)\\b(?!\\$)"
236
236
  },
237
237
  {
238
238
  "name": "keyword.operator.dart",
@@ -0,0 +1,39 @@
1
+ {
2
+ "name": "dircolors",
3
+ "scopeName": "source.dircolors",
4
+ "patterns": [
5
+ {
6
+ "begin": "(^\\s+)?(?\u003c!\\S)(?=#)(?!#\\{)",
7
+ "end": "(?!\\G)",
8
+ "patterns": [
9
+ {
10
+ "name": "comment.line.number-sign.dircolors",
11
+ "begin": "#",
12
+ "end": "\\n",
13
+ "beginCaptures": {
14
+ "0": {
15
+ "name": "punctuation.definition.comment.dircolors"
16
+ }
17
+ }
18
+ }
19
+ ],
20
+ "beginCaptures": {
21
+ "1": {
22
+ "name": "punctuation.whitespace.comment.leading.dircolors"
23
+ }
24
+ }
25
+ },
26
+ {
27
+ "name": "constant.numeric.radix.dircolors",
28
+ "match": "\\b[0-3]?[0-9]#[0-9a-zA-Z]+\\b"
29
+ },
30
+ {
31
+ "name": "constant.numeric.dircolors",
32
+ "match": "\\b\\d+?\\b"
33
+ },
34
+ {
35
+ "name": "keyword.other.dircolors",
36
+ "match": "\\b(TERM|COLOR|EIGHTBIT|OPTION|NORMAL|NORM|FILE|RESET|DIR|LNK|LINK|SYMLINK|ORPHAN|MISSING|FIFO|PIPE|SOCK|BLK|BLOCK|CHR|CHAR|DOOR|EXEC|LEFT|LEFTCODE|RIGHT|RIGHTCODE|END|ENDCODE|SUID|SETUID|SGID|SETGID|STICKY|OTHER_WRITABLE|OWR|STICKY_OTHER_WRITABLE|OWT|CAPABILITY|MULTIHARDLINK|CLRTOEOL)\\b"
37
+ }
38
+ ]
39
+ }
@@ -0,0 +1,135 @@
1
+ {
2
+ "name": "DirectX 3D File",
3
+ "scopeName": "source.direct-x",
4
+ "patterns": [
5
+ {
6
+ "include": "#main"
7
+ }
8
+ ],
9
+ "repository": {
10
+ "header": {
11
+ "name": "meta.signature.header.direct-x",
12
+ "match": "^\\s*(xof)\\s*(\\d+)\\s*(txt|bin|tzip|bzip)\\s*(.*)",
13
+ "captures": {
14
+ "1": {
15
+ "name": "keyword.control.magic-number.direct-x"
16
+ },
17
+ "2": {
18
+ "name": "constant.numeric.integer.int.version-number.direct-x"
19
+ },
20
+ "3": {
21
+ "name": "storage.type.var.format.direct-x"
22
+ },
23
+ "4": {
24
+ "patterns": [
25
+ {
26
+ "include": "etc"
27
+ }
28
+ ]
29
+ }
30
+ }
31
+ },
32
+ "keywords": {
33
+ "name": "keyword.operator.reserved.direct-x",
34
+ "match": "(?ix) \\b\n(ARRAY|BINARY_RESOURCE|BINARY|CHAR|CSTRING|DOUBLE|DWORD|FLOAT\n|SDWORD|STRING|SWORD|TEMPLATE|UCHAR|ULONGLONG|UNICODE|WORD)\\b"
35
+ },
36
+ "main": {
37
+ "patterns": [
38
+ {
39
+ "include": "#header"
40
+ },
41
+ {
42
+ "include": "#template"
43
+ },
44
+ {
45
+ "include": "#uuid"
46
+ },
47
+ {
48
+ "include": "#keywords"
49
+ },
50
+ {
51
+ "include": "#templateTypes"
52
+ },
53
+ {
54
+ "include": "#name"
55
+ },
56
+ {
57
+ "include": "etc#ellipsis"
58
+ },
59
+ {
60
+ "include": "etc#commentHash"
61
+ },
62
+ {
63
+ "include": "etc#commentSlash"
64
+ },
65
+ {
66
+ "include": "etc"
67
+ }
68
+ ]
69
+ },
70
+ "name": {
71
+ "name": "variable.other.direct-x",
72
+ "match": "(?!\\d)\\w+"
73
+ },
74
+ "template": {
75
+ "name": "meta.template.direct-x",
76
+ "begin": "\\b([A-Za-z_]\\w*)\\s+((?!\\d)\\w+)\\s*({)",
77
+ "end": "}",
78
+ "patterns": [
79
+ {
80
+ "include": "#main"
81
+ }
82
+ ],
83
+ "beginCaptures": {
84
+ "1": {
85
+ "name": "storage.type.function.template.direct-x"
86
+ },
87
+ "2": {
88
+ "name": "entity.name.function.direct-x"
89
+ },
90
+ "3": {
91
+ "name": "punctuation.section.scope.begin.direct-x"
92
+ }
93
+ },
94
+ "endCaptures": {
95
+ "0": {
96
+ "name": "punctuation.section.scope.end.direct-x"
97
+ }
98
+ }
99
+ },
100
+ "templateTypes": {
101
+ "name": "storage.type.var.template.direct-x",
102
+ "match": "(?ix) \\b\n(AnimTicksPerSecond|AnimationKey|AnimationOptions|AnimationSet|Animation|Boolean2d|Boolean|ColorRGBA?|CompressedAnimationSet\n|Coords2d|DeclData|EffectDWord|EffectFloats|EffectInstance|EffectParamDWord|EffectParamFloats|EffectParamString|EffectString\n|FVFData|FaceAdjacency|FloatKeys|FrameTransformMatrix|Frame|Guid|IndexedColor|MaterialWrap|Material|Matrix4x4|MeshFaceWraps\n|MeshFace|MeshMaterialList|MeshNormals|MeshTextureCoords|MeshVertexColors|Mesh|PMAttributeRange|PMInfo|PMVSplitRecord\n|PatchMesh9|PatchMesh|Patch|SkinWeights|Templates|TextureFilename|TimedFloatKeys|Vector|VertexDuplicationIndices\n|VertexElement|XSkinMeshHeader) \\b"
103
+ },
104
+ "uuid": {
105
+ "name": "meta.uuid.direct-x",
106
+ "match": "(\u003c)([-\\sA-Fa-f0-9]+)(\u003e)",
107
+ "captures": {
108
+ "1": {
109
+ "patterns": [
110
+ {
111
+ "include": "etc#bracket"
112
+ }
113
+ ]
114
+ },
115
+ "2": {
116
+ "patterns": [
117
+ {
118
+ "include": "etc#dash"
119
+ },
120
+ {
121
+ "include": "etc#hexNoSign"
122
+ }
123
+ ]
124
+ },
125
+ "3": {
126
+ "patterns": [
127
+ {
128
+ "include": "etc#bracket"
129
+ }
130
+ ]
131
+ }
132
+ }
133
+ }
134
+ }
135
+ }
@@ -22,13 +22,46 @@
22
22
  }
23
23
  }
24
24
  },
25
+ "lhs": {
26
+ "patterns": [
27
+ {
28
+ "name": "meta.lhs.ebnf",
29
+ "match": "(?x)\n(?: \\s++\n| ^|\\G\n| (?= ^|\\G )\n| (?\u003c= ;|\\*\\) )\n)\n\n# Exclude leading whitespace\n\\s*\n\n([A-Za-z][A-Za-z0-9_]*+)",
30
+ "captures": {
31
+ "1": {
32
+ "name": "entity.name.rule.identifier.ebnf"
33
+ }
34
+ }
35
+ },
36
+ {
37
+ "name": "meta.lhs.non-standard.ebnf",
38
+ "contentName": "entity.name.rule.identifier.non-standard.ebnf",
39
+ "begin": "(?x)\n(?: \\s++\n| ^|\\G\n| (?= ^|\\G )\n| (?\u003c= \\*\\) )\n)\n\n# Exclude leading whitespace\n\\s*\n\n# Check for at least one “invalid” character\n(?=\n\t# Starts with a digit\n\t[0-9]\n\t|\n\t\n\t# Contains at least one non-“word” character\n\t[A-Za-z0-9_]* # Skip any legal characters\n\t(?: [^:;=()] # Don't swallow symbols for comments, terminators, or assignments\n\t| \\((?!\\*) # Permit open brackets if they don't introduce a comment\n\t)\n)",
40
+ "end": "(?x)\n# Exclude trailing whitespace\n\\s*\n\n# Stop before an...\n(?= :*= # Assignment operator separating `#lhs` from `#rhs`\n| ; # Unexpected terminator\n| \\(\\* # Embedded comment\n)",
41
+ "patterns": [
42
+ {
43
+ "include": "#comment"
44
+ }
45
+ ]
46
+ },
47
+ {
48
+ "include": "#comment"
49
+ }
50
+ ]
51
+ },
25
52
  "main": {
26
53
  "patterns": [
27
54
  {
28
55
  "include": "#comment"
29
56
  },
30
57
  {
31
- "include": "#rule"
58
+ "include": "#semicolon"
59
+ },
60
+ {
61
+ "include": "#lhs"
62
+ },
63
+ {
64
+ "include": "#rhs"
32
65
  },
33
66
  {
34
67
  "include": "#special"
@@ -36,6 +69,27 @@
36
69
  ]
37
70
  },
38
71
  "rhs": {
72
+ "name": "meta.rhs.ebnf",
73
+ "begin": "(::=)|(:=)|(=)",
74
+ "end": "(?=;|^\\s*(?:\u003c?[A-Za-z][A-Za-z0-9_]*\u003e?\\s*)?:*=)",
75
+ "patterns": [
76
+ {
77
+ "include": "#rhs-innards"
78
+ }
79
+ ],
80
+ "beginCaptures": {
81
+ "1": {
82
+ "name": "keyword.operator.assignment.non-standard.double-colon.ebnf"
83
+ },
84
+ "2": {
85
+ "name": "keyword.operator.assignment.non-standard.single-colon.ebnf"
86
+ },
87
+ "3": {
88
+ "name": "keyword.operator.assignment.ebnf"
89
+ }
90
+ }
91
+ },
92
+ "rhs-innards": {
39
93
  "patterns": [
40
94
  {
41
95
  "name": "punctuation.delimiter.comma.ebnf",
@@ -92,7 +146,7 @@
92
146
  "end": "\\]",
93
147
  "patterns": [
94
148
  {
95
- "include": "#rhs"
149
+ "include": "#rhs-innards"
96
150
  }
97
151
  ],
98
152
  "beginCaptures": {
@@ -112,7 +166,7 @@
112
166
  "end": "}",
113
167
  "patterns": [
114
168
  {
115
- "include": "#rhs"
169
+ "include": "#rhs-innards"
116
170
  }
117
171
  ],
118
172
  "beginCaptures": {
@@ -132,7 +186,7 @@
132
186
  "end": "\\)",
133
187
  "patterns": [
134
188
  {
135
- "include": "#rhs"
189
+ "include": "#rhs-innards"
136
190
  }
137
191
  ],
138
192
  "beginCaptures": {
@@ -152,45 +206,19 @@
152
206
  {
153
207
  "name": "variable.parameter.argument.identifier.reference.ebnf",
154
208
  "match": "[A-Za-z][A-Za-z0-9_]*"
155
- }
156
- ]
157
- },
158
- "rule": {
159
- "begin": "(?=[A-Za-z][A-Za-z0-9_]*)",
160
- "end": ";",
161
- "patterns": [
209
+ },
162
210
  {
163
- "name": "meta.lhs.ebnf",
164
- "begin": "\\G",
165
- "end": "(?=[=;])",
166
- "patterns": [
167
- {
168
- "name": "entity.name.rule.identifier.ebnf",
169
- "match": "[A-Za-z][A-Za-z0-9_]*"
170
- }
171
- ]
211
+ "name": "keyword.operator.logical.not.negation.non-standard.ebnf",
212
+ "match": "!"
172
213
  },
173
214
  {
174
- "name": "meta.rhs.ebnf",
175
- "begin": "=",
176
- "end": "(?=;)",
177
- "patterns": [
178
- {
179
- "include": "#rhs"
180
- }
181
- ],
182
- "beginCaptures": {
183
- "0": {
184
- "name": "keyword.operator.assignment.ebnf"
185
- }
186
- }
215
+ "include": "source.lex.regexp#quantifier"
187
216
  }
188
- ],
189
- "endCaptures": {
190
- "0": {
191
- "name": "punctuation.terminator.statement.ebnf"
192
- }
193
- }
217
+ ]
218
+ },
219
+ "semicolon": {
220
+ "name": "punctuation.terminator.statement.ebnf",
221
+ "match": ";"
194
222
  },
195
223
  "special": {
196
224
  "name": "meta.pragma.directive.special.ebnf",
@@ -16,6 +16,49 @@
16
16
  }
17
17
  }
18
18
  },
19
+ {
20
+ "match": "([A-Z]\\w+)\\s*(\\.)\\s*([a-z_]\\w*[!?]?)",
21
+ "captures": {
22
+ "1": {
23
+ "name": "entity.name.type.class.elixir"
24
+ },
25
+ "2": {
26
+ "name": "punctuation.separator.method.elixir"
27
+ },
28
+ "3": {
29
+ "name": "entity.name.function.elixir"
30
+ }
31
+ }
32
+ },
33
+ {
34
+ "match": "(\\:\\w+)\\s*(\\.)\\s*([_]?\\w*[!?]?)",
35
+ "captures": {
36
+ "1": {
37
+ "name": "constant.other.symbol.elixir"
38
+ },
39
+ "2": {
40
+ "name": "punctuation.separator.method.elixir"
41
+ },
42
+ "3": {
43
+ "name": "entity.name.function.elixir"
44
+ }
45
+ }
46
+ },
47
+ {
48
+ "match": "(\\|\\\u003e)\\s*([a-z_]\\w*[!?]?)",
49
+ "captures": {
50
+ "1": {
51
+ "name": "keyword.operator.other.elixir"
52
+ },
53
+ "2": {
54
+ "name": "entity.name.function.elixir"
55
+ }
56
+ }
57
+ },
58
+ {
59
+ "name": "entity.name.function.elixir",
60
+ "match": "\\b[a-z_]\\w*[!?]?(?=\\s*\\.?\\s*\\()"
61
+ },
19
62
  {
20
63
  "begin": "\\b(fn)\\b(?=.*-\u003e)",
21
64
  "end": "(?\u003e(-\u003e)|(when)|(\\)))",
@@ -1084,7 +1084,7 @@
1084
1084
  {
1085
1085
  "name": "markup.code.julia.gfm",
1086
1086
  "contentName": "source.embedded.julia",
1087
- "begin": "^\\s*(`{3,}|~{3,})\\s*(?i:(julia))\\s*$",
1087
+ "begin": "^\\s*(`{3,}|~{3,})\\s*(?i:(julia|jl))\\s*$",
1088
1088
  "end": "^\\s*\\1((?\u003c=`)`+|(?\u003c=~)~+)?\\s*$",
1089
1089
  "patterns": [
1090
1090
  {
@@ -374,7 +374,7 @@
374
374
  },
375
375
  {
376
376
  "name": "meta.variable-field.gitconfig",
377
- "begin": "(?i)\\b(email)\\s*(=)",
377
+ "begin": "(?i)\\b(email|url)\\s*(=)",
378
378
  "end": "$|(?=#|;)",
379
379
  "patterns": [
380
380
  {
@@ -10,6 +10,53 @@
10
10
  }
11
11
  ],
12
12
  "repository": {
13
+ "attributes": {
14
+ "patterns": [
15
+ {
16
+ "name": "meta.attributes.php",
17
+ "begin": "(\u003c\u003c)(?!\u003c)",
18
+ "end": "(\u003e\u003e)",
19
+ "patterns": [
20
+ {
21
+ "include": "#comments"
22
+ },
23
+ {
24
+ "name": "entity.other.attribute-name.php",
25
+ "match": "([A-Za-z_][A-Za-z0-9_]*)"
26
+ },
27
+ {
28
+ "begin": "(\\()",
29
+ "end": "(\\))",
30
+ "patterns": [
31
+ {
32
+ "include": "#language"
33
+ }
34
+ ],
35
+ "beginCaptures": {
36
+ "1": {
37
+ "name": "punctuation.definition.parameters.begin.php"
38
+ }
39
+ },
40
+ "endCaptures": {
41
+ "1": {
42
+ "name": "punctuation.definition.parameters.end.php"
43
+ }
44
+ }
45
+ }
46
+ ],
47
+ "beginCaptures": {
48
+ "1": {
49
+ "name": "punctuation.definition.attributes.php"
50
+ }
51
+ },
52
+ "endCaptures": {
53
+ "1": {
54
+ "name": "punctuation.definition.attributes.php"
55
+ }
56
+ }
57
+ }
58
+ ]
59
+ },
13
60
  "class-builtin": {
14
61
  "patterns": [
15
62
  {
@@ -202,6 +249,9 @@
202
249
  {
203
250
  "include": "#comments"
204
251
  },
252
+ {
253
+ "include": "#attributes"
254
+ },
205
255
  {
206
256
  "include": "#type-annotation"
207
257
  },
@@ -366,6 +416,55 @@
366
416
  }
367
417
  ]
368
418
  },
419
+ "implements": {
420
+ "patterns": [
421
+ {
422
+ "begin": "(?i)(implements)\\s+",
423
+ "end": "(?i)(?=[;{])",
424
+ "patterns": [
425
+ {
426
+ "include": "#comments"
427
+ },
428
+ {
429
+ "contentName": "meta.other.inherited-class.php",
430
+ "begin": "(?i)(?=[a-z0-9_\\\\]+)",
431
+ "end": "(?i)(?:\\s*(?:,|(?=[^a-z0-9_\\\\\\s]))\\s*)",
432
+ "patterns": [
433
+ {
434
+ "begin": "(?i)(?=\\\\?[a-z_0-9]+\\\\)",
435
+ "end": "(?i)([a-z_][a-z_0-9]*)?(?=[^a-z0-9_\\\\])",
436
+ "patterns": [
437
+ {
438
+ "include": "#namespace"
439
+ }
440
+ ],
441
+ "endCaptures": {
442
+ "1": {
443
+ "name": "entity.other.inherited-class.php"
444
+ }
445
+ }
446
+ },
447
+ {
448
+ "include": "#class-builtin"
449
+ },
450
+ {
451
+ "include": "#namespace"
452
+ },
453
+ {
454
+ "name": "entity.other.inherited-class.php",
455
+ "match": "(?i)[a-z_][a-z_0-9]*"
456
+ }
457
+ ]
458
+ }
459
+ ],
460
+ "beginCaptures": {
461
+ "1": {
462
+ "name": "storage.modifier.implements.php"
463
+ }
464
+ }
465
+ }
466
+ ]
467
+ },
369
468
  "instantiation": {
370
469
  "begin": "(?i)(new)\\s+",
371
470
  "end": "(?i)(?=[^$a-z0-9_\\\\])",
@@ -475,6 +574,15 @@
475
574
  {
476
575
  "include": "#comments"
477
576
  },
577
+ {
578
+ "begin": "(?=^\\s*\u003c\u003c)",
579
+ "end": "(?\u003c=\u003e\u003e)",
580
+ "patterns": [
581
+ {
582
+ "include": "#attributes"
583
+ }
584
+ ]
585
+ },
478
586
  {
479
587
  "include": "#xhp"
480
588
  },
@@ -495,6 +603,9 @@
495
603
  {
496
604
  "name": "keyword.operator.assignment.php",
497
605
  "match": "(=)"
606
+ },
607
+ {
608
+ "include": "#type-annotation"
498
609
  }
499
610
  ],
500
611
  "beginCaptures": {
@@ -521,6 +632,9 @@
521
632
  },
522
633
  {
523
634
  "include": "#generics"
635
+ },
636
+ {
637
+ "include": "#implements"
524
638
  }
525
639
  ],
526
640
  "beginCaptures": {
@@ -606,6 +720,9 @@
606
720
  {
607
721
  "include": "#generics"
608
722
  },
723
+ {
724
+ "include": "#implements"
725
+ },
609
726
  {
610
727
  "contentName": "meta.other.inherited-class.php",
611
728
  "begin": "(?i)(extends)\\s+",
@@ -641,51 +758,6 @@
641
758
  "name": "storage.modifier.extends.php"
642
759
  }
643
760
  }
644
- },
645
- {
646
- "begin": "(?i)(implements)\\s+",
647
- "end": "(?i)(?=[;{])",
648
- "patterns": [
649
- {
650
- "include": "#comments"
651
- },
652
- {
653
- "contentName": "meta.other.inherited-class.php",
654
- "begin": "(?i)(?=[a-z0-9_\\\\]+)",
655
- "end": "(?i)(?:\\s*(?:,|(?=[^a-z0-9_\\\\\\s]))\\s*)",
656
- "patterns": [
657
- {
658
- "begin": "(?i)(?=\\\\?[a-z_0-9]+\\\\)",
659
- "end": "(?i)([a-z_][a-z_0-9]*)?(?=[^a-z0-9_\\\\])",
660
- "patterns": [
661
- {
662
- "include": "#namespace"
663
- }
664
- ],
665
- "endCaptures": {
666
- "1": {
667
- "name": "entity.other.inherited-class.php"
668
- }
669
- }
670
- },
671
- {
672
- "include": "#class-builtin"
673
- },
674
- {
675
- "include": "#namespace"
676
- },
677
- {
678
- "name": "entity.other.inherited-class.php",
679
- "match": "(?i)[a-z_][a-z_0-9]*"
680
- }
681
- ]
682
- }
683
- ],
684
- "beginCaptures": {
685
- "1": {
686
- "name": "storage.modifier.implements.php"
687
- }
688
- }
689
761
  }
690
762
  ],
691
763
  "beginCaptures": {
@@ -725,27 +797,50 @@
725
797
  },
726
798
  {
727
799
  "name": "meta.catch.php",
728
- "begin": "\\b(catch)\\b\\s*\\(\\s*",
729
- "end": "([A-Za-z_][A-Za-z_0-9]*)\\s*((\\$+)[a-zA-Z_\\x{7f}-\\x{ff}][a-zA-Z0-9_\\x{7f}-\\x{ff}]*)\\s*\\)",
800
+ "begin": "\\b(catch)\\s*(\\()",
801
+ "end": "\\)",
730
802
  "patterns": [
731
803
  {
732
804
  "include": "#namespace"
805
+ },
806
+ {
807
+ "match": "(?xi)\n([a-z_\\x{7f}-\\x{10ffff}][a-z0-9_\\x{7f}-\\x{10ffff}]*) # Exception class\n((?:\\s*\\|\\s*[a-z_\\x{7f}-\\x{10ffff}][a-z0-9_\\x{7f}-\\x{10ffff}]*)*) # Optional additional exception classes\n\\s*\n((\\$+)[a-z_\\x{7f}-\\x{10ffff}][a-z0-9_\\x{7f}-\\x{10ffff}]*) # Variable",
808
+ "captures": {
809
+ "1": {
810
+ "name": "support.class.exception.php"
811
+ },
812
+ "2": {
813
+ "patterns": [
814
+ {
815
+ "name": "support.class.exception.php",
816
+ "match": "(?i)[a-z_\\x{7f}-\\x{10ffff}][a-z0-9_\\x{7f}-\\x{10ffff}]*"
817
+ },
818
+ {
819
+ "name": "punctuation.separator.delimiter.php",
820
+ "match": "\\|"
821
+ }
822
+ ]
823
+ },
824
+ "3": {
825
+ "name": "variable.other.php"
826
+ },
827
+ "4": {
828
+ "name": "punctuation.definition.variable.php"
829
+ }
830
+ }
733
831
  }
734
832
  ],
735
833
  "beginCaptures": {
736
834
  "1": {
737
835
  "name": "keyword.control.exception.catch.php"
836
+ },
837
+ "2": {
838
+ "name": "punctuation.definition.parameters.begin.bracket.round.php"
738
839
  }
739
840
  },
740
841
  "endCaptures": {
741
- "1": {
742
- "name": "support.class.exception.php"
743
- },
744
- "2": {
745
- "name": "variable.other.php"
746
- },
747
- "3": {
748
- "name": "punctuation.definition.variable.php"
842
+ "0": {
843
+ "name": "punctuation.definition.parameters.end.bracket.round.php"
749
844
  }
750
845
  }
751
846
  },
@@ -1048,7 +1143,11 @@
1048
1143
  },
1049
1144
  {
1050
1145
  "name": "keyword.operator.logical.php",
1051
- "match": "(?i)(!|\u0026\u0026|\\|\\|)|\\b(and|or|xor|as)\\b"
1146
+ "match": "(?i)(!|\u0026\u0026|\\|\\|)|\\b(and|or|xor)\\b"
1147
+ },
1148
+ {
1149
+ "name": "keyword.operator.type.php",
1150
+ "match": "(?i)\\b(is|as)\\b"
1052
1151
  },
1053
1152
  {
1054
1153
  "include": "#function-call"
@@ -1177,9 +1276,13 @@
1177
1276
  },
1178
1277
  "namespace": {
1179
1278
  "name": "support.other.namespace.php",
1180
- "begin": "(?i)(?:(namespace)|[a-z0-9_]+)?(\\\\)(?=.*?[^a-z_0-9\\\\])",
1279
+ "begin": "(?i)((namespace)|[a-z0-9_]+)?(\\\\)(?=.*?[^a-z_0-9\\\\])",
1181
1280
  "end": "(?i)(?=[a-z0-9_]*[^a-z0-9_\\\\])",
1182
1281
  "patterns": [
1282
+ {
1283
+ "name": "entity.name.type.namespace.php",
1284
+ "match": "(?i)[a-z0-9_]+(?=\\\\)"
1285
+ },
1183
1286
  {
1184
1287
  "match": "(?i)(\\\\)",
1185
1288
  "captures": {
@@ -1191,9 +1294,9 @@
1191
1294
  ],
1192
1295
  "beginCaptures": {
1193
1296
  "1": {
1194
- "name": "variable.language.namespace.php"
1297
+ "name": "entity.name.type.namespace.php"
1195
1298
  },
1196
- "2": {
1299
+ "3": {
1197
1300
  "name": "punctuation.separator.inheritance.php"
1198
1301
  }
1199
1302
  }
@@ -1483,6 +1586,10 @@
1483
1586
  "begin": "\"\\s*(?=(SELECT|INSERT|UPDATE|DELETE|CREATE|REPLACE|ALTER)\\b)",
1484
1587
  "end": "\"",
1485
1588
  "patterns": [
1589
+ {
1590
+ "name": "punctuation.definition.parameters.begin.bracket.round.php",
1591
+ "match": "\\("
1592
+ },
1486
1593
  {
1487
1594
  "name": "comment.line.number-sign.sql",
1488
1595
  "match": "#(\\\\\"|[^\"])*(?=\"|$\\n?)"
@@ -1547,6 +1654,10 @@
1547
1654
  "begin": "'\\s*(?=(SELECT|INSERT|UPDATE|DELETE|CREATE|REPLACE|ALTER)\\b)",
1548
1655
  "end": "'",
1549
1656
  "patterns": [
1657
+ {
1658
+ "name": "punctuation.definition.parameters.begin.bracket.round.php",
1659
+ "match": "\\("
1660
+ },
1550
1661
  {
1551
1662
  "name": "comment.line.number-sign.sql",
1552
1663
  "match": "#(\\\\'|[^'])*(?='|$\\n?)"
@@ -2110,30 +2221,24 @@
2110
2221
  },
2111
2222
  {
2112
2223
  "name": "storage.type.shape.php",
2113
- "begin": "(?=shape\\()",
2114
- "end": "\\)",
2224
+ "begin": "(shape\\()",
2225
+ "end": "((,|\\.\\.\\.)?\\s*\\))",
2115
2226
  "patterns": [
2116
2227
  {
2117
- "begin": "(shape\\()",
2118
- "end": "(=\u003e)",
2119
- "patterns": [
2120
- {
2121
- "include": "#strings"
2122
- },
2123
- {
2124
- "include": "#constants"
2125
- }
2126
- ],
2127
- "endCaptures": {
2128
- "1": {
2129
- "name": "keyword.operator.key.php"
2130
- }
2131
- }
2228
+ "include": "#type-annotation"
2132
2229
  },
2133
2230
  {
2134
- "include": "#type-annotation"
2231
+ "include": "#strings"
2232
+ },
2233
+ {
2234
+ "include": "#constants"
2135
2235
  }
2136
- ]
2236
+ ],
2237
+ "endCaptures": {
2238
+ "1": {
2239
+ "name": "keyword.operator.key.php"
2240
+ }
2241
+ }
2137
2242
  },
2138
2243
  {
2139
2244
  "begin": "\\(",
@@ -2146,6 +2251,9 @@
2146
2251
  },
2147
2252
  {
2148
2253
  "include": "#class-name"
2254
+ },
2255
+ {
2256
+ "include": "#comments"
2149
2257
  }
2150
2258
  ]
2151
2259
  },
@@ -2157,7 +2265,12 @@
2157
2265
  {
2158
2266
  "include": "#namespace"
2159
2267
  }
2160
- ]
2268
+ ],
2269
+ "endCaptures": {
2270
+ "0": {
2271
+ "name": "entity.name.function.php"
2272
+ }
2273
+ }
2161
2274
  },
2162
2275
  "var_basic": {
2163
2276
  "patterns": [
@@ -2452,6 +2565,9 @@
2452
2565
  {
2453
2566
  "include": "#xhp-tag-termination"
2454
2567
  },
2568
+ {
2569
+ "include": "#xhp-html-comments"
2570
+ },
2455
2571
  {
2456
2572
  "include": "#xhp-tag-attributes"
2457
2573
  }
@@ -2484,7 +2600,7 @@
2484
2600
  "xhp-tag-termination": {
2485
2601
  "patterns": [
2486
2602
  {
2487
- "begin": "(\u003e)",
2603
+ "begin": "(?\u003c!--)(\u003e)",
2488
2604
  "end": "(\u003c/)",
2489
2605
  "patterns": [
2490
2606
  {