github-linguist 6.2.0 → 6.3.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (45) hide show
  1. checksums.yaml +5 -5
  2. data/bin/git-linguist +6 -12
  3. data/ext/linguist/linguist.h +7 -0
  4. data/ext/linguist/strndup.c +10 -0
  5. data/grammars/annotation.liquidhaskell.haskell.json +3 -0
  6. data/grammars/hint.haskell.json +3 -0
  7. data/grammars/hint.message.haskell.json +3 -0
  8. data/grammars/hint.type.haskell.json +3 -0
  9. data/grammars/source.apl.json +97 -106
  10. data/grammars/source.ballerina.json +577 -144
  11. data/grammars/source.batchfile.json +24 -10
  12. data/grammars/source.bsl.json +50 -10
  13. data/grammars/source.cobol.json +4 -4
  14. data/grammars/source.css.json +1 -1
  15. data/grammars/source.gfm.json +20 -3
  16. data/grammars/source.haskell.json +3 -0
  17. data/grammars/source.hsig.json +3 -0
  18. data/grammars/source.hx.argument.json +80 -0
  19. data/grammars/source.hx.json +131 -46
  20. data/grammars/source.hxml.json +17 -9
  21. data/grammars/source.isabelle.root.json +2 -2
  22. data/grammars/source.lua.json +10 -3
  23. data/grammars/source.nim.json +4 -4
  24. data/grammars/source.pawn.json +5 -5
  25. data/grammars/source.pony.json +2 -2
  26. data/grammars/source.powershell.json +128 -87
  27. data/grammars/source.rascal.json +1 -0
  28. data/grammars/source.stan.json +3 -3
  29. data/grammars/source.ts.json +90 -28
  30. data/grammars/source.tsx.json +95 -33
  31. data/grammars/text.elixir.json +1 -3
  32. data/grammars/text.html.erlang.yaws.json +1 -1
  33. data/grammars/text.html.markdown.source.gfm.apib.json +1 -3
  34. data/grammars/text.html.markdown.source.gfm.mson.json +1 -3
  35. data/grammars/text.marko.json +129 -21
  36. data/grammars/text.shell-session.json +1 -1
  37. data/grammars/text.tex.latex.haskell.json +3 -0
  38. data/grammars/text.xml.json +4 -4
  39. data/lib/linguist/generated.rb +19 -1
  40. data/lib/linguist/languages.json +1 -1
  41. data/lib/linguist/languages.yml +68 -59
  42. data/lib/linguist/samples.json +618 -413
  43. data/lib/linguist/version.rb +1 -1
  44. metadata +7 -6
  45. data/grammars/source.elixir.json +0 -927
@@ -1,3 +1,3 @@
1
1
  module Linguist
2
- VERSION = "6.2.0"
2
+ VERSION = "6.3.0"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: github-linguist
3
3
  version: !ruby/object:Gem::Version
4
- version: 6.2.0
4
+ version: 6.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - GitHub
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-05-30 00:00:00.000000000 Z
11
+ date: 2018-07-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: charlock_holmes
@@ -184,14 +184,14 @@ dependencies:
184
184
  requirements:
185
185
  - - "~>"
186
186
  - !ruby/object:Gem::Version
187
- version: 1.0.0
187
+ version: 1.1.0
188
188
  type: :development
189
189
  prerelease: false
190
190
  version_requirements: !ruby/object:Gem::Requirement
191
191
  requirements:
192
192
  - - "~>"
193
193
  - !ruby/object:Gem::Version
194
- version: 1.0.0
194
+ version: 1.1.0
195
195
  - !ruby/object:Gem::Dependency
196
196
  name: licensee
197
197
  requirement: !ruby/object:Gem::Requirement
@@ -225,6 +225,7 @@ files:
225
225
  - ext/linguist/lex.linguist_yy.h
226
226
  - ext/linguist/linguist.c
227
227
  - ext/linguist/linguist.h
228
+ - ext/linguist/strndup.c
228
229
  - ext/linguist/tokenizer.l
229
230
  - grammars/annotation.liquidhaskell.haskell.json
230
231
  - grammars/config.xcompose.json
@@ -333,7 +334,6 @@ files:
333
334
  - grammars/source.dylan.json
334
335
  - grammars/source.ebnf.json
335
336
  - grammars/source.eiffel.json
336
- - grammars/source.elixir.json
337
337
  - grammars/source.elm.json
338
338
  - grammars/source.emacs.lisp.json
339
339
  - grammars/source.erlang.json
@@ -376,6 +376,7 @@ files:
376
376
  - grammars/source.hsc2hs.json
377
377
  - grammars/source.hsig.json
378
378
  - grammars/source.httpspec.json
379
+ - grammars/source.hx.argument.json
379
380
  - grammars/source.hx.json
380
381
  - grammars/source.hx.type.json
381
382
  - grammars/source.hxml.json
@@ -715,7 +716,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
715
716
  version: '0'
716
717
  requirements: []
717
718
  rubyforge_project:
718
- rubygems_version: 2.6.14
719
+ rubygems_version: 2.7.6
719
720
  signing_key:
720
721
  specification_version: 4
721
722
  summary: GitHub Language detection
@@ -1,927 +0,0 @@
1
- {
2
- "name": "Elixir",
3
- "scopeName": "source.elixir",
4
- "patterns": [
5
- {
6
- "begin": "\\b(fn)\\b(?!.*-\u003e)",
7
- "end": "$",
8
- "patterns": [
9
- {
10
- "include": "#core_syntax"
11
- }
12
- ],
13
- "beginCaptures": {
14
- "1": {
15
- "name": "keyword.control.elixir"
16
- }
17
- }
18
- },
19
- {
20
- "begin": "\\b(fn)\\b(?=.*-\u003e)",
21
- "end": "(?\u003e(-\u003e)|(when)|(\\)))",
22
- "patterns": [
23
- {
24
- "include": "#core_syntax"
25
- }
26
- ],
27
- "beginCaptures": {
28
- "1": {
29
- "name": "keyword.control.elixir"
30
- }
31
- },
32
- "endCaptures": {
33
- "1": {
34
- "name": "keyword.operator.other.elixir"
35
- },
36
- "2": {
37
- "name": "keyword.control.elixir"
38
- },
39
- "3": {
40
- "name": "punctuation.section.function.elixir"
41
- }
42
- }
43
- },
44
- {
45
- "include": "#core_syntax"
46
- },
47
- {
48
- "begin": "^(?=.*-\u003e)((?![^\"']*(\"|')[^\"']*-\u003e)|(?=.*-\u003e[^\"']*(\"|')[^\"']*-\u003e))((?!.*\\([^\\)]*-\u003e)|(?=[^\\(\\)]*-\u003e)|(?=\\s*\\(.*\\).*-\u003e))((?!.*\\b(fn)\\b)|(?=.*-\u003e.*\\bfn\\b))",
49
- "end": "(?\u003e(-\u003e)|(when)|(\\)))",
50
- "patterns": [
51
- {
52
- "include": "#core_syntax"
53
- }
54
- ],
55
- "beginCaptures": {
56
- "1": {
57
- "name": "keyword.control.elixir"
58
- }
59
- },
60
- "endCaptures": {
61
- "1": {
62
- "name": "keyword.operator.other.elixir"
63
- },
64
- "2": {
65
- "name": "keyword.control.elixir"
66
- },
67
- "3": {
68
- "name": "punctuation.section.function.elixir"
69
- }
70
- }
71
- }
72
- ],
73
- "repository": {
74
- "core_syntax": {
75
- "patterns": [
76
- {
77
- "name": "meta.module.elixir",
78
- "begin": "^\\s*(defmodule)\\b",
79
- "end": "\\b(do)\\b",
80
- "patterns": [
81
- {
82
- "name": "entity.name.class.elixir",
83
- "match": "\\b[A-Z]\\w*\\b"
84
- }
85
- ],
86
- "beginCaptures": {
87
- "1": {
88
- "name": "keyword.control.module.elixir"
89
- }
90
- },
91
- "endCaptures": {
92
- "1": {
93
- "name": "keyword.control.module.elixir"
94
- }
95
- }
96
- },
97
- {
98
- "name": "meta.protocol_declaration.elixir",
99
- "begin": "^\\s*(defprotocol)\\b",
100
- "end": "\\b(do)\\b",
101
- "patterns": [
102
- {
103
- "name": "entity.name.protocol.elixir",
104
- "match": "\\b[A-Z]\\w*\\b"
105
- }
106
- ],
107
- "beginCaptures": {
108
- "1": {
109
- "name": "keyword.control.protocol.elixir"
110
- }
111
- },
112
- "endCaptures": {
113
- "1": {
114
- "name": "keyword.control.protocol.elixir"
115
- }
116
- }
117
- },
118
- {
119
- "name": "meta.protocol_implementation.elixir",
120
- "begin": "^\\s*(defimpl)\\b",
121
- "end": "\\b(do)\\b",
122
- "patterns": [
123
- {
124
- "name": "entity.name.protocol.elixir",
125
- "match": "\\b[A-Z]\\w*\\b"
126
- }
127
- ],
128
- "beginCaptures": {
129
- "1": {
130
- "name": "keyword.control.protocol.elixir"
131
- }
132
- },
133
- "endCaptures": {
134
- "1": {
135
- "name": "keyword.control.protocol.elixir"
136
- }
137
- }
138
- },
139
- {
140
- "name": "meta.function.public.elixir",
141
- "begin": "^\\s*(def|defmacro|defdelegate|defguard)\\s+((?\u003e[a-zA-Z_]\\w*(?\u003e\\.|::))?(?\u003e[a-zA-Z_]\\w*(?\u003e[?!]|=(?!\u003e))?|===?|\u003e[\u003e=]?|\u003c=\u003e|\u003c[\u003c=]?|[%\u0026`/\\|]|\\*\\*?|=?~|[-+]@?|\\[\\]=?))((\\()|\\s*)",
142
- "end": "(\\bdo:)|(\\bdo\\b)|(?=\\s+(def|defmacro|defdelegate|defguard)\\b)",
143
- "patterns": [
144
- {
145
- "include": "$self"
146
- },
147
- {
148
- "begin": "\\s(\\\\\\\\)",
149
- "end": ",|\\)|$",
150
- "patterns": [
151
- {
152
- "include": "$self"
153
- }
154
- ],
155
- "beginCaptures": {
156
- "1": {
157
- "name": "keyword.operator.other.elixir"
158
- }
159
- }
160
- },
161
- {
162
- "name": "keyword.control.elixir",
163
- "match": "\\b(is_atom|is_binary|is_bitstring|is_boolean|is_float|is_function|is_integer|is_list|is_map|is_nil|is_number|is_pid|is_port|is_record|is_reference|is_tuple|is_exception|abs|bit_size|byte_size|div|elem|hd|length|map_size|node|rem|round|tl|trunc|tuple_size)\\b"
164
- }
165
- ],
166
- "beginCaptures": {
167
- "1": {
168
- "name": "keyword.control.module.elixir"
169
- },
170
- "2": {
171
- "name": "entity.name.function.public.elixir"
172
- },
173
- "4": {
174
- "name": "punctuation.section.function.elixir"
175
- }
176
- },
177
- "endCaptures": {
178
- "1": {
179
- "name": "constant.other.keywords.elixir"
180
- },
181
- "2": {
182
- "name": "keyword.control.module.elixir"
183
- }
184
- }
185
- },
186
- {
187
- "name": "meta.function.private.elixir",
188
- "begin": "^\\s*(defp|defmacrop|defguardp)\\s+((?\u003e[a-zA-Z_]\\w*(?\u003e\\.|::))?(?\u003e[a-zA-Z_]\\w*(?\u003e[?!]|=(?!\u003e))?|===?|\u003e[\u003e=]?|\u003c=\u003e|\u003c[\u003c=]?|[%\u0026`/\\|]|\\*\\*?|=?~|[-+]@?|\\[\\]=?))((\\()|\\s*)",
189
- "end": "(\\bdo:)|(\\bdo\\b)|(?=\\s+(defp|defmacrop|defguardp)\\b)",
190
- "patterns": [
191
- {
192
- "include": "$self"
193
- },
194
- {
195
- "begin": "\\s(\\\\\\\\)",
196
- "end": ",|\\)|$",
197
- "patterns": [
198
- {
199
- "include": "$self"
200
- }
201
- ],
202
- "beginCaptures": {
203
- "1": {
204
- "name": "keyword.operator.other.elixir"
205
- }
206
- }
207
- },
208
- {
209
- "name": "keyword.control.elixir",
210
- "match": "\\b(is_atom|is_binary|is_bitstring|is_boolean|is_float|is_function|is_integer|is_list|is_map|is_nil|is_number|is_pid|is_port|is_record|is_reference|is_tuple|is_exception|abs|bit_size|byte_size|div|elem|hd|length|map_size|node|rem|round|tl|trunc|tuple_size)\\b"
211
- }
212
- ],
213
- "beginCaptures": {
214
- "1": {
215
- "name": "keyword.control.module.elixir"
216
- },
217
- "2": {
218
- "name": "entity.name.function.private.elixir"
219
- },
220
- "4": {
221
- "name": "punctuation.section.function.elixir"
222
- }
223
- },
224
- "endCaptures": {
225
- "1": {
226
- "name": "constant.other.keywords.elixir"
227
- },
228
- "2": {
229
- "name": "keyword.control.module.elixir"
230
- }
231
- }
232
- },
233
- {
234
- "name": "comment.documentation.heredoc",
235
- "begin": "@(module|type)?doc (~[a-z])?\"\"\"",
236
- "end": "\\s*\"\"\"",
237
- "patterns": [
238
- {
239
- "include": "#interpolated_elixir"
240
- },
241
- {
242
- "include": "#escaped_char"
243
- }
244
- ]
245
- },
246
- {
247
- "name": "comment.documentation.heredoc",
248
- "begin": "@(module|type)?doc ~[A-Z]\"\"\"",
249
- "end": "\\s*\"\"\""
250
- },
251
- {
252
- "name": "comment.documentation.heredoc",
253
- "begin": "@(module|type)?doc (~[a-z])?'''",
254
- "end": "\\s*'''",
255
- "patterns": [
256
- {
257
- "include": "#interpolated_elixir"
258
- },
259
- {
260
- "include": "#escaped_char"
261
- }
262
- ]
263
- },
264
- {
265
- "name": "comment.documentation.heredoc",
266
- "begin": "@(module|type)?doc ~[A-Z]'''",
267
- "end": "\\s*'''"
268
- },
269
- {
270
- "name": "comment.documentation.false",
271
- "match": "@(module|type)?doc false"
272
- },
273
- {
274
- "name": "comment.documentation.string",
275
- "begin": "@(module|type)?doc \"",
276
- "end": "\"",
277
- "patterns": [
278
- {
279
- "include": "#interpolated_elixir"
280
- },
281
- {
282
- "include": "#escaped_char"
283
- }
284
- ]
285
- },
286
- {
287
- "name": "keyword.control.elixir",
288
- "match": "(?\u003c!\\.)\\b(do|end|case|bc|lc|for|if|cond|unless|try|receive|fn|defmodule|defp?|defprotocol|defimpl|defrecord|defstruct|defmacrop?|defguardp?|defdelegate|defexception|defoverridable|exit|after|rescue|catch|else|raise|throw|import|require|alias|use|quote|unquote|super|with)\\b(?![?!:])"
289
- },
290
- {
291
- "name": "keyword.operator.elixir",
292
- "match": "(?\u003c!\\.)\\b(and|not|or|when|xor|in)\\b"
293
- },
294
- {
295
- "name": "entity.name.class.elixir",
296
- "match": "\\b[A-Z]\\w*\\b"
297
- },
298
- {
299
- "name": "constant.language.elixir",
300
- "match": "\\b(nil|true|false)\\b(?![?!])"
301
- },
302
- {
303
- "name": "variable.language.elixir",
304
- "match": "\\b(__(CALLER|ENV|MODULE|DIR|STACKTRACE)__)\\b(?![?!])"
305
- },
306
- {
307
- "name": "variable.other.readwrite.module.elixir",
308
- "match": "(@)[a-zA-Z_]\\w*",
309
- "captures": {
310
- "1": {
311
- "name": "punctuation.definition.variable.elixir"
312
- }
313
- }
314
- },
315
- {
316
- "name": "variable.other.anonymous.elixir",
317
- "match": "(\u0026)\\d+",
318
- "captures": {
319
- "1": {
320
- "name": "punctuation.definition.variable.elixir"
321
- }
322
- }
323
- },
324
- {
325
- "name": "variable.other.capture.elixir",
326
- "match": "\\^[a-z_]\\w*",
327
- "captures": {
328
- "1": {
329
- "name": "punctuation.definition.variable.elixir"
330
- }
331
- }
332
- },
333
- {
334
- "name": "constant.numeric.elixir",
335
- "match": "\\b(0x[0-9A-Fa-f](?\u003e_?[0-9A-Fa-f])*|\\d(?\u003e_?\\d)*(\\.(?![^[:space:][:digit:]])(?\u003e_?\\d)*)?([eE][-+]?\\d(?\u003e_?\\d)*)?|0b[01]+|0o[0-7]+)\\b"
336
- },
337
- {
338
- "name": "constant.other.symbol.single-quoted.elixir",
339
- "begin": ":'",
340
- "end": "'",
341
- "patterns": [
342
- {
343
- "include": "#interpolated_elixir"
344
- },
345
- {
346
- "include": "#escaped_char"
347
- }
348
- ],
349
- "captures": {
350
- "0": {
351
- "name": "punctuation.definition.constant.elixir"
352
- }
353
- }
354
- },
355
- {
356
- "name": "constant.other.symbol.double-quoted.elixir",
357
- "begin": ":\"",
358
- "end": "\"",
359
- "patterns": [
360
- {
361
- "include": "#interpolated_elixir"
362
- },
363
- {
364
- "include": "#escaped_char"
365
- }
366
- ],
367
- "captures": {
368
- "0": {
369
- "name": "punctuation.definition.constant.elixir"
370
- }
371
- }
372
- },
373
- {
374
- "name": "string.quoted.single.heredoc.elixir",
375
- "begin": "(?\u003e''')",
376
- "end": "^\\s*'''",
377
- "patterns": [
378
- {
379
- "include": "#interpolated_elixir"
380
- },
381
- {
382
- "include": "#escaped_char"
383
- }
384
- ],
385
- "beginCaptures": {
386
- "0": {
387
- "name": "punctuation.definition.string.begin.elixir"
388
- }
389
- },
390
- "endCaptures": {
391
- "0": {
392
- "name": "punctuation.definition.string.end.elixir"
393
- }
394
- }
395
- },
396
- {
397
- "name": "string.quoted.single.elixir",
398
- "begin": "'",
399
- "end": "'",
400
- "patterns": [
401
- {
402
- "include": "#interpolated_elixir"
403
- },
404
- {
405
- "include": "#escaped_char"
406
- }
407
- ],
408
- "beginCaptures": {
409
- "0": {
410
- "name": "punctuation.definition.string.begin.elixir"
411
- }
412
- },
413
- "endCaptures": {
414
- "0": {
415
- "name": "punctuation.definition.string.end.elixir"
416
- }
417
- }
418
- },
419
- {
420
- "name": "string.quoted.double.heredoc.elixir",
421
- "begin": "(?\u003e\"\"\")",
422
- "end": "^\\s*\"\"\"",
423
- "patterns": [
424
- {
425
- "include": "#interpolated_elixir"
426
- },
427
- {
428
- "include": "#escaped_char"
429
- }
430
- ],
431
- "beginCaptures": {
432
- "0": {
433
- "name": "punctuation.definition.string.begin.elixir"
434
- }
435
- },
436
- "endCaptures": {
437
- "0": {
438
- "name": "punctuation.definition.string.end.elixir"
439
- }
440
- }
441
- },
442
- {
443
- "name": "string.quoted.double.elixir",
444
- "begin": "\"",
445
- "end": "\"",
446
- "patterns": [
447
- {
448
- "include": "#interpolated_elixir"
449
- },
450
- {
451
- "include": "#escaped_char"
452
- }
453
- ],
454
- "beginCaptures": {
455
- "0": {
456
- "name": "punctuation.definition.string.begin.elixir"
457
- }
458
- },
459
- "endCaptures": {
460
- "0": {
461
- "name": "punctuation.definition.string.end.elixir"
462
- }
463
- }
464
- },
465
- {
466
- "name": "string.quoted.double.heredoc.elixir",
467
- "begin": "~[a-z](?\u003e\"\"\")",
468
- "end": "^\\s*\"\"\"",
469
- "patterns": [
470
- {
471
- "include": "#interpolated_elixir"
472
- },
473
- {
474
- "include": "#escaped_char"
475
- }
476
- ],
477
- "beginCaptures": {
478
- "0": {
479
- "name": "punctuation.definition.string.begin.elixir"
480
- }
481
- },
482
- "endCaptures": {
483
- "0": {
484
- "name": "punctuation.definition.string.end.elixir"
485
- }
486
- }
487
- },
488
- {
489
- "name": "string.interpolated.elixir",
490
- "begin": "~[a-z]\\{",
491
- "end": "\\}[a-z]*",
492
- "patterns": [
493
- {
494
- "include": "#interpolated_elixir"
495
- },
496
- {
497
- "include": "#escaped_char"
498
- }
499
- ],
500
- "beginCaptures": {
501
- "0": {
502
- "name": "punctuation.definition.string.begin.elixir"
503
- }
504
- },
505
- "endCaptures": {
506
- "0": {
507
- "name": "punctuation.definition.string.end.elixir"
508
- }
509
- }
510
- },
511
- {
512
- "name": "string.interpolated.elixir",
513
- "begin": "~[a-z]\\[",
514
- "end": "\\][a-z]*",
515
- "patterns": [
516
- {
517
- "include": "#interpolated_elixir"
518
- },
519
- {
520
- "include": "#escaped_char"
521
- }
522
- ],
523
- "beginCaptures": {
524
- "0": {
525
- "name": "punctuation.definition.string.begin.elixir"
526
- }
527
- },
528
- "endCaptures": {
529
- "0": {
530
- "name": "punctuation.definition.string.end.elixir"
531
- }
532
- }
533
- },
534
- {
535
- "name": "string.interpolated.elixir",
536
- "begin": "~[a-z]\\\u003c",
537
- "end": "\\\u003e[a-z]*",
538
- "patterns": [
539
- {
540
- "include": "#interpolated_elixir"
541
- },
542
- {
543
- "include": "#escaped_char"
544
- }
545
- ],
546
- "beginCaptures": {
547
- "0": {
548
- "name": "punctuation.definition.string.begin.elixir"
549
- }
550
- },
551
- "endCaptures": {
552
- "0": {
553
- "name": "punctuation.definition.string.end.elixir"
554
- }
555
- }
556
- },
557
- {
558
- "name": "string.interpolated.elixir",
559
- "begin": "~[a-z]\\(",
560
- "end": "\\)[a-z]*",
561
- "patterns": [
562
- {
563
- "include": "#interpolated_elixir"
564
- },
565
- {
566
- "include": "#escaped_char"
567
- }
568
- ],
569
- "beginCaptures": {
570
- "0": {
571
- "name": "punctuation.definition.string.begin.elixir"
572
- }
573
- },
574
- "endCaptures": {
575
- "0": {
576
- "name": "punctuation.definition.string.end.elixir"
577
- }
578
- }
579
- },
580
- {
581
- "name": "string.interpolated.elixir",
582
- "begin": "~[a-z]([^\\w])",
583
- "end": "\\1[a-z]*",
584
- "patterns": [
585
- {
586
- "include": "#interpolated_elixir"
587
- },
588
- {
589
- "include": "#escaped_char"
590
- },
591
- {
592
- "include": "#escaped_char"
593
- }
594
- ],
595
- "beginCaptures": {
596
- "0": {
597
- "name": "punctuation.definition.string.begin.elixir"
598
- }
599
- },
600
- "endCaptures": {
601
- "0": {
602
- "name": "punctuation.definition.string.end.elixir"
603
- }
604
- }
605
- },
606
- {
607
- "name": "string.quoted.other.literal.upper.elixir",
608
- "begin": "~[A-Z](?\u003e\"\"\")",
609
- "end": "^\\s*\"\"\"",
610
- "beginCaptures": {
611
- "0": {
612
- "name": "punctuation.definition.string.begin.elixir"
613
- }
614
- },
615
- "endCaptures": {
616
- "0": {
617
- "name": "punctuation.definition.string.end.elixir"
618
- }
619
- }
620
- },
621
- {
622
- "name": "string.quoted.other.literal.upper.elixir",
623
- "begin": "~[A-Z]\\{",
624
- "end": "\\}[a-z]*",
625
- "beginCaptures": {
626
- "0": {
627
- "name": "punctuation.definition.string.begin.elixir"
628
- }
629
- },
630
- "endCaptures": {
631
- "0": {
632
- "name": "punctuation.definition.string.end.elixir"
633
- }
634
- }
635
- },
636
- {
637
- "name": "string.quoted.other.literal.upper.elixir",
638
- "begin": "~[A-Z]\\[",
639
- "end": "\\][a-z]*",
640
- "beginCaptures": {
641
- "0": {
642
- "name": "punctuation.definition.string.begin.elixir"
643
- }
644
- },
645
- "endCaptures": {
646
- "0": {
647
- "name": "punctuation.definition.string.end.elixir"
648
- }
649
- }
650
- },
651
- {
652
- "name": "string.quoted.other.literal.upper.elixir",
653
- "begin": "~[A-Z]\\\u003c",
654
- "end": "\\\u003e[a-z]*",
655
- "beginCaptures": {
656
- "0": {
657
- "name": "punctuation.definition.string.begin.elixir"
658
- }
659
- },
660
- "endCaptures": {
661
- "0": {
662
- "name": "punctuation.definition.string.end.elixir"
663
- }
664
- }
665
- },
666
- {
667
- "name": "string.quoted.other.literal.upper.elixir",
668
- "begin": "~[A-Z]\\(",
669
- "end": "\\)[a-z]*",
670
- "beginCaptures": {
671
- "0": {
672
- "name": "punctuation.definition.string.begin.elixir"
673
- }
674
- },
675
- "endCaptures": {
676
- "0": {
677
- "name": "punctuation.definition.string.end.elixir"
678
- }
679
- }
680
- },
681
- {
682
- "name": "string.quoted.other.literal.upper.elixir",
683
- "begin": "~[A-Z]([^\\w])",
684
- "end": "\\1[a-z]*",
685
- "beginCaptures": {
686
- "0": {
687
- "name": "punctuation.definition.string.begin.elixir"
688
- }
689
- },
690
- "endCaptures": {
691
- "0": {
692
- "name": "punctuation.definition.string.end.elixir"
693
- }
694
- }
695
- },
696
- {
697
- "name": "constant.other.symbol.elixir",
698
- "match": "(?\u003c!:)(:)(?\u003e[a-zA-Z_][\\w@]*(?\u003e[?!]|=(?![\u003e=]))?|\\\u003c\\\u003e|===?|!==?|\u003c\u003c\u003e\u003e|\u003c\u003c\u003c|\u003e\u003e\u003e|~~~|::|\u003c\\-|\\|\u003e|=\u003e|=~|=|/|\\\\\\\\|\\*\\*?|\\.\\.?\\.?|\u003e=?|\u003c=?|\u0026\u0026?\u0026?|\\+\\+?|\\-\\-?|\\|\\|?\\|?|\\!|@|\\%?\\{\\}|%|\\[\\]|\\^(\\^\\^)?)",
699
- "captures": {
700
- "1": {
701
- "name": "punctuation.definition.constant.elixir"
702
- }
703
- }
704
- },
705
- {
706
- "name": "constant.other.keywords.elixir",
707
- "match": "(?\u003e[a-zA-Z_][\\w@]*(?\u003e[?!])?)(:)(?!:)",
708
- "captures": {
709
- "1": {
710
- "name": "punctuation.definition.constant.elixir"
711
- }
712
- }
713
- },
714
- {
715
- "name": "comment.line.section.elixir",
716
- "match": "^\\s*(##).*$\\n?",
717
- "captures": {
718
- "1": {
719
- "name": "punctuation.definition.comment.elixir"
720
- }
721
- }
722
- },
723
- {
724
- "name": "comment.line.number-sign.elixir",
725
- "match": "(?:^[ \\t]+)?(#).*$\\n?",
726
- "captures": {
727
- "1": {
728
- "name": "punctuation.definition.comment.elixir"
729
- }
730
- }
731
- },
732
- {
733
- "name": "constant.numeric.elixir",
734
- "match": "(?\u003c!\\w)\\?(\\\\(x[0-9A-Fa-f]{1,2}(?![0-9A-Fa-f])\\b|[^xMC])|[^\\s\\\\])"
735
- },
736
- {
737
- "name": "keyword.operator.concatenation.elixir",
738
- "match": "\\+\\+|\\-\\-|\u003c\\|\u003e"
739
- },
740
- {
741
- "name": "keyword.operator.sigils_1.elixir",
742
- "match": "\\|\\\u003e|\u003c~\u003e|\u003c\u003e|\u003c\u003c\u003c|\u003e\u003e\u003e|~\u003e\u003e|\u003c\u003c~|~\u003e|\u003c~|\u003c\\|\u003e"
743
- },
744
- {
745
- "name": "keyword.operator.sigils_2.elixir",
746
- "match": "\u0026\u0026\u0026|\u0026\u0026"
747
- },
748
- {
749
- "name": "keyword.operator.sigils_3.elixir",
750
- "match": "\u003c\\-|\\\\\\\\"
751
- },
752
- {
753
- "name": "keyword.operator.comparison.elixir",
754
- "match": "===?|!==?|\u003c=?|\u003e=?"
755
- },
756
- {
757
- "name": "keyword.operator.bitwise.elixir",
758
- "match": "(\\|\\|\\||\u0026\u0026\u0026|\\^\\^\\^|\u003c\u003c\u003c|\u003e\u003e\u003e|~~~)"
759
- },
760
- {
761
- "name": "keyword.operator.logical.elixir",
762
- "match": "(?\u003c=[ \\t])!+|\\bnot\\b|\u0026\u0026|\\band\\b|\\|\\||\\bor\\b|\\bxor\\b"
763
- },
764
- {
765
- "name": "keyword.operator.arithmetic.elixir",
766
- "match": "(\\*|\\+|\\-|/)"
767
- },
768
- {
769
- "name": "keyword.operator.other.elixir",
770
- "match": "\\||\\+\\+|\\-\\-|\\*\\*|\\\\\\\\|\\\u003c\\-|\\\u003c\\\u003e|\\\u003c\\\u003c|\\\u003e\\\u003e|\\:\\:|\\.\\.|\\|\u003e|~|=\u003e|\u0026"
771
- },
772
- {
773
- "name": "keyword.operator.assignment.elixir",
774
- "match": "="
775
- },
776
- {
777
- "name": "punctuation.separator.other.elixir",
778
- "match": ":"
779
- },
780
- {
781
- "name": "punctuation.separator.statement.elixir",
782
- "match": "\\;"
783
- },
784
- {
785
- "name": "punctuation.separator.object.elixir",
786
- "match": ","
787
- },
788
- {
789
- "name": "punctuation.separator.method.elixir",
790
- "match": "\\."
791
- },
792
- {
793
- "name": "punctuation.section.scope.elixir",
794
- "match": "\\{|\\}"
795
- },
796
- {
797
- "name": "punctuation.section.array.elixir",
798
- "match": "\\[|\\]"
799
- },
800
- {
801
- "name": "punctuation.section.function.elixir",
802
- "match": "\\(|\\)"
803
- }
804
- ]
805
- },
806
- "escaped_char": {
807
- "name": "constant.character.escaped.elixir",
808
- "match": "\\\\(x[\\da-fA-F]{1,2}|.)"
809
- },
810
- "interpolated_elixir": {
811
- "patterns": [
812
- {
813
- "name": "source.elixir.embedded.source",
814
- "match": "#\\{(\\})",
815
- "captures": {
816
- "0": {
817
- "name": "punctuation.section.embedded.elixir"
818
- },
819
- "1": {
820
- "name": "source.elixir.embedded.source.empty"
821
- }
822
- }
823
- },
824
- {
825
- "name": "source.elixir.embedded.source",
826
- "begin": "#\\{",
827
- "end": "\\}",
828
- "patterns": [
829
- {
830
- "include": "#nest_curly_and_self"
831
- },
832
- {
833
- "include": "$self"
834
- }
835
- ],
836
- "captures": {
837
- "0": {
838
- "name": "punctuation.section.embedded.elixir"
839
- }
840
- }
841
- }
842
- ]
843
- },
844
- "nest_curly_and_self": {
845
- "patterns": [
846
- {
847
- "begin": "\\{",
848
- "end": "\\}",
849
- "patterns": [
850
- {
851
- "include": "#nest_curly_and_self"
852
- }
853
- ],
854
- "captures": {
855
- "0": {
856
- "name": "punctuation.section.scope.elixir"
857
- }
858
- }
859
- },
860
- {
861
- "include": "$self"
862
- }
863
- ]
864
- },
865
- "regex_sub": {
866
- "patterns": [
867
- {
868
- "include": "#interpolated_elixir"
869
- },
870
- {
871
- "include": "#escaped_char"
872
- },
873
- {
874
- "name": "string.regexp.arbitrary-repitition.elixir",
875
- "match": "(\\{)\\d+(,\\d+)?(\\})",
876
- "captures": {
877
- "1": {
878
- "name": "punctuation.definition.arbitrary-repitition.elixir"
879
- },
880
- "3": {
881
- "name": "punctuation.definition.arbitrary-repitition.elixir"
882
- }
883
- }
884
- },
885
- {
886
- "name": "string.regexp.character-class.elixir",
887
- "begin": "\\[(?:\\^?\\])?",
888
- "end": "\\]",
889
- "patterns": [
890
- {
891
- "include": "#escaped_char"
892
- }
893
- ],
894
- "captures": {
895
- "0": {
896
- "name": "punctuation.definition.character-class.elixir"
897
- }
898
- }
899
- },
900
- {
901
- "name": "string.regexp.group.elixir",
902
- "begin": "\\(",
903
- "end": "\\)",
904
- "patterns": [
905
- {
906
- "include": "#regex_sub"
907
- }
908
- ],
909
- "captures": {
910
- "0": {
911
- "name": "punctuation.definition.group.elixir"
912
- }
913
- }
914
- },
915
- {
916
- "name": "comment.line.number-sign.elixir",
917
- "match": "(?\u003c=^|\\s)(#)\\s[[a-zA-Z0-9,. \\t?!-][^\\x{00}-\\x{7F}]]*$",
918
- "captures": {
919
- "1": {
920
- "name": "punctuation.definition.comment.elixir"
921
- }
922
- }
923
- }
924
- ]
925
- }
926
- }
927
- }