github-linguist 5.0.8 → 5.0.9

Sign up to get free protection for your applications and to get access to all the features.
Files changed (43) hide show
  1. checksums.yaml +4 -4
  2. data/bin/linguist +1 -1
  3. data/grammars/source.assembly.json +2 -1
  4. data/grammars/source.clean.json +1 -1
  5. data/grammars/source.clojure.json +13 -3
  6. data/grammars/source.coffee.json +2 -2
  7. data/grammars/source.csound-document.json +1 -2
  8. data/grammars/source.csound.json +1 -1
  9. data/grammars/source.css.json +7 -7
  10. data/grammars/source.ditroff.json +5 -5
  11. data/grammars/source.elixir.json +2 -2
  12. data/grammars/source.gfm.json +31 -3
  13. data/grammars/source.harbour.json +21 -51
  14. data/grammars/source.jison.json +16 -16
  15. data/grammars/source.jisonlex.json +6 -6
  16. data/grammars/source.jolie.json +138 -0
  17. data/grammars/source.nim.json +20 -5
  18. data/grammars/source.perl6fe.json +3 -3
  19. data/grammars/source.python.json +23 -23
  20. data/grammars/source.renpy.json +2 -2
  21. data/grammars/source.solidity.json +2 -2
  22. data/grammars/source.sqf.json +1 -1
  23. data/grammars/source.terraform.json +78 -25
  24. data/grammars/source.ts.json +176 -157
  25. data/grammars/source.tsx.json +176 -157
  26. data/grammars/source.yaml.json +5 -4
  27. data/grammars/text.html.basic.json +212 -60
  28. data/grammars/text.html.ecr.json +1 -1
  29. data/grammars/text.html.php.blade.json +607 -264
  30. data/grammars/text.html.php.json +18 -14
  31. data/grammars/text.html.vue.json +10 -10
  32. data/grammars/text.marko.json +13 -2
  33. data/grammars/{source.gfm.clean.json → text.restructuredtext.clean.json} +4 -5
  34. data/grammars/text.restructuredtext.json +4 -3
  35. data/grammars/text.roff.json +390 -23
  36. data/grammars/text.tex.latex.json +1 -1
  37. data/lib/linguist.rb +1 -1
  38. data/lib/linguist/heuristics.rb +27 -18
  39. data/lib/linguist/languages.json +1 -1
  40. data/lib/linguist/languages.yml +39 -2
  41. data/lib/linguist/samples.json +1999 -737
  42. data/lib/linguist/version.rb +1 -1
  43. metadata +5 -4
@@ -34,7 +34,7 @@
34
34
  },
35
35
  {
36
36
  "name": "meta.section.rules.jisonlex",
37
- "begin": "(?!%%)",
37
+ "begin": "\\G",
38
38
  "end": "(?=^%%)",
39
39
  "patterns": [
40
40
  {
@@ -46,7 +46,7 @@
46
46
  },
47
47
  {
48
48
  "name": "meta.section.definitions.jisonlex",
49
- "begin": "(?!%%)",
49
+ "begin": "^",
50
50
  "end": "(?=%%)",
51
51
  "patterns": [
52
52
  {
@@ -66,7 +66,7 @@
66
66
  },
67
67
  {
68
68
  "name": "meta.definition.jisonlex",
69
- "begin": "\\b[\\p{Alpha}_](?:[\\w-]*\\w)?\\b",
69
+ "begin": "\\b[[:alpha:]_](?:[\\w-]*\\w)?\\b",
70
70
  "end": "$",
71
71
  "beginCaptures": {
72
72
  "0": {
@@ -104,7 +104,7 @@
104
104
  },
105
105
  {
106
106
  "name": "entity.name.function.jisonlex",
107
- "match": "\\b[\\p{Alpha}_](?:[\\w-]*\\w)?\\b"
107
+ "match": "\\b[[:alpha:]_](?:[\\w-]*\\w)?\\b"
108
108
  },
109
109
  {
110
110
  "name": "invalid.illegal.jisonlex",
@@ -150,7 +150,7 @@
150
150
  },
151
151
  {
152
152
  "name": "entity.name.function.jisonlex",
153
- "match": "\\b[\\p{Alpha}_](?:[\\w-]*\\w)?\\b"
153
+ "match": "\\b[[:alpha:]_](?:[\\w-]*\\w)?\\b"
154
154
  },
155
155
  {
156
156
  "name": "punctuation.separator.start-condition.jisonlex",
@@ -223,7 +223,7 @@
223
223
  "patterns": [
224
224
  {
225
225
  "name": "variable.other.jisonlex",
226
- "match": "\\{[\\p{Alpha}_](?:[\\w-]*\\w)?\\}"
226
+ "match": "\\{[[:alpha:]_](?:[\\w-]*\\w)?\\}"
227
227
  }
228
228
  ]
229
229
  },
@@ -0,0 +1,138 @@
1
+ {
2
+ "name": "Jolie",
3
+ "fileTypes": [
4
+ "ol",
5
+ "iol"
6
+ ],
7
+ "scopeName": "source.jolie",
8
+ "foldingStartMarker": "\\{\\s*$",
9
+ "foldingStopMarker": "^\\s*\\}",
10
+ "patterns": [
11
+ {
12
+ "include": "#code"
13
+ }
14
+ ],
15
+ "repository": {
16
+ "code": {
17
+ "patterns": [
18
+ {
19
+ "include": "#block_comments"
20
+ },
21
+ {
22
+ "include": "#line_comments"
23
+ },
24
+ {
25
+ "include": "#constants_language"
26
+ },
27
+ {
28
+ "include": "#constants_numeric"
29
+ },
30
+ {
31
+ "include": "#strings"
32
+ },
33
+ {
34
+ "include": "#keywords_control"
35
+ },
36
+ {
37
+ "include": "#keywords_with_colon"
38
+ },
39
+ {
40
+ "include": "#keywords_other"
41
+ },
42
+ {
43
+ "include": "#keywords_types"
44
+ },
45
+ {
46
+ "include": "#keywords_modifiers"
47
+ },
48
+ {
49
+ "include": "#invocations"
50
+ },
51
+ {
52
+ "include": "#operators"
53
+ },
54
+ {
55
+ "include": "#definitions"
56
+ }
57
+ ]
58
+ },
59
+ "constants_language": {
60
+ "name": "constant.language.jolie",
61
+ "match": "\\b(true|false)\\b"
62
+ },
63
+ "constants_numeric": {
64
+ "name": "constant.numeric.jolie",
65
+ "match": "\\b\\d+\\b"
66
+ },
67
+ "block_comments": {
68
+ "begin": "/\\*",
69
+ "end": "\\*/",
70
+ "name": "comment.block.jolie"
71
+ },
72
+ "line_comments": {
73
+ "begin": "//",
74
+ "end": "\\n",
75
+ "name": "comment.line.double-slash.jolie"
76
+ },
77
+ "definitions": {
78
+ "match": "\\b(inputPort|outputPort|interface|type|define|service)\\s+(\\w+)\\b",
79
+ "captures": {
80
+ "1": {
81
+ "name": "keyword.other.jolie"
82
+ },
83
+ "2": {
84
+ "name": "meta.class.identifier.jolie"
85
+ }
86
+ }
87
+ },
88
+ "keywords_with_colon": {
89
+ "name": "keyword.other.with_colon.jolie",
90
+ "match": "\\b(Location|Protocol|Interfaces|Aggregates|Redirects|Jolie|JavaScript|Java|OneWay|RequestResponse)\\b\\s*:"
91
+ },
92
+ "keywords_other": {
93
+ "name": "keyword.other.jolie",
94
+ "match": "\\b(constants|cH|instanceof|execution|comp|concurrent|nullProcess|single|sequential|main|init|cset|is_defined|embedded|extender|courier|forward|install|undef|include|synchronized|throws|throw)\\b"
95
+ },
96
+ "keywords_control": {
97
+ "name": "keyword.control.jolie",
98
+ "match": "\\b(if|else|while|for|foreach|provide|until|throw|forward|scope)\\b"
99
+ },
100
+ "keywords_types": {
101
+ "name": "storage.type.jolie",
102
+ "match": "\\b(void|bool|int|string|long|double|any|raw)\\b"
103
+ },
104
+ "keywords_modifiers": {
105
+ "name": "storage.modifiers.jolie",
106
+ "match": "\\b(csets|global)\\b"
107
+ },
108
+ "invocations": {
109
+ "match": "\\b(\\w+)\\s*(@)\\s*(\\w+)\\b",
110
+ "captures": {
111
+ "1": {
112
+ "name": "meta.method.jolie"
113
+ },
114
+ "2": {
115
+ "name": "keyword.operator.jolie"
116
+ },
117
+ "3": {
118
+ "name": "meta.class.jolie"
119
+ }
120
+ }
121
+ },
122
+ "strings": {
123
+ "name": "string.quoted.double.jolie",
124
+ "begin": "\"",
125
+ "end": "\"",
126
+ "patterns": [
127
+ {
128
+ "match": "\\\\.",
129
+ "name": "constant.character.escape.jolie"
130
+ }
131
+ ]
132
+ },
133
+ "operators": {
134
+ "name": "keyword.operator.jolie",
135
+ "match": "\\b(<<|&&|\\|\\||\\+|\\-|/|\\*|=|==|\\+\\+|--|\\+=|-=|\\*=|/=|!|%|%=)\\b"
136
+ }
137
+ }
138
+ }
@@ -362,7 +362,7 @@
362
362
  }
363
363
  },
364
364
  "comment": "Import syntax",
365
- "match": "((import)\\s+[\\/\\w]+,?)"
365
+ "match": "((import)\\s+[\\.|\\w|\\/]+,?)"
366
366
  },
367
367
  {
368
368
  "captures": {
@@ -389,17 +389,17 @@
389
389
  },
390
390
  {
391
391
  "comment": "Common functions",
392
- "match": "(?<![\\w\\x{80}-\\x{10FFFF}])(len|high|low)(?![\\w\\x{80}-\\x{10FFFF}])",
393
- "name": "support.function.any-method.nim"
392
+ "match": "(?<![\\w\\x{80}-\\x{10FFFF}])(new|GC_ref|GC_unref|assert|echo|defined|declared|newException|countup|countdown|len|high|low)(?![\\w\\x{80}-\\x{10FFFF}])",
393
+ "name": "keyword.other.common.function.nim"
394
394
  },
395
395
  {
396
396
  "comment": "Built-in, concrete types.",
397
- "match": "(?<![\\w\\x{80}-\\x{10FFFF}])(((uint|int|float)(8|16|32|64)?)|bool|string|auto|cstring|char|byte|tobject|typedesc|stmt|expr|any)(?![\\w\\x{80}-\\x{10FFFF}])",
397
+ "match": "(?<![\\w\\x{80}-\\x{10FFFF}])(((uint|int|float)(8|16|32|64)?)|clong|culong|cchar|cschar|cshort|cint|csize|clonglong|cfloat|cdouble|clongdouble|cuchar|cushort|cuint|culonglong|cstringArray|bool|string|auto|cstring|char|byte|tobject|typedesc|stmt|expr|any|untyped|typed)(?![\\w\\x{80}-\\x{10FFFF}])",
398
398
  "name": "storage.type.concrete.nim"
399
399
  },
400
400
  {
401
401
  "comment": "Built-in, generic types.",
402
- "match": "(?<![\\w\\x{80}-\\x{10FFFF}])(range|array|seq|tuple|natural|set|ref|ptr)(?![\\w\\x{80}-\\x{10FFFF}])",
402
+ "match": "(?<![\\w\\x{80}-\\x{10FFFF}])(range|array|seq|tuple|natural|set|ref|ptr|pointer)(?![\\w\\x{80}-\\x{10FFFF}])",
403
403
  "name": "storage.type.generic.nim"
404
404
  },
405
405
  {
@@ -412,6 +412,21 @@
412
412
  "match": "(?<![\\w\\x{80}-\\x{10FFFF}])(openarray|varargs|void)(?![\\w\\x{80}-\\x{10FFFF}])",
413
413
  "name": "storage.type.generic.nim"
414
414
  },
415
+ {
416
+ "comment": "Other constants.",
417
+ "match": "(?<![\\w\\x{80}-\\x{10FFFF}])([A-Z][A-Z0-9_]+)(?![\\w\\x{80}-\\x{10FFFF}])",
418
+ "name": "support.constant.nim"
419
+ },
420
+ {
421
+ "comment": "Other types.",
422
+ "match": "(?<![\\w\\x{80}-\\x{10FFFF}])([A-Z]\\w+)(?![\\w\\x{80}-\\x{10FFFF}])",
423
+ "name": "support.type.nim"
424
+ },
425
+ {
426
+ "comment": "Function call.",
427
+ "match": "(?<![\\w\\x{80}-\\x{10FFFF}])(\\w+)(?![\\w\\x{80}-\\x{10FFFF}])(?=\\()",
428
+ "name": "support.function.any-method.nim"
429
+ },
415
430
  {
416
431
  "begin": "r?\\\"\\\"\\\"",
417
432
  "comment": "(Raw) Triple Quoted String",
@@ -554,7 +554,7 @@
554
554
  }
555
555
  },
556
556
  {
557
- "begin": "(?x)\n(?<= ^|[=,(\\[~]|when|=> ) \\s*\n(?:\n (m|rx)\n (\n (?:\n (?<!:P5) # < This can maybe be removed because we\n \\s*:\\w+\n (?!\\s*:P5) # < include p5_regex above it\n )*\n )\n) # With the m or rx\n\\s*\n([/]) # Solidus",
557
+ "begin": "(?x)\n(?<= ^|[=,(\\[~]|when|=> ) \\s*\n(?:\n (m|rx|s)\n (\n (?:\n (?<!:P5) # < This can maybe be removed because we\n \\s*:\\w+\n (?!\\s*:P5) # < include p5_regex above it\n )*\n )\n) # With the m or rx\n\\s*\n([/]) # Solidus",
558
558
  "beginCaptures": {
559
559
  "1": {
560
560
  "name": "string.regexp.construct.perl6fe"
@@ -583,7 +583,7 @@
583
583
  ]
584
584
  },
585
585
  {
586
- "begin": "(?x)\n(?<= ^|[=,(\\[~]|when|=> ) \\s*\n(?:\n (m|rx)\n (\n (?:\n (?<!:P5) # < This can maybe be removed because we\n \\s*:\\w+\n (?!\\s*:P5) # < include p5_regex above it\n )*\n )\n) # With the m or rx\n\\s*\n([{]) # Left curly brace",
586
+ "begin": "(?x)\n(?<= ^|[=,(\\[~]|when|=> ) \\s*\n(?:\n (m|rx|s)\n (\n (?:\n (?<!:P5) # < This can maybe be removed because we\n \\s*:\\w+\n (?!\\s*:P5) # < include p5_regex above it\n )*\n )\n) # With the m or rx\n\\s*\n([{]) # Left curly brace",
587
587
  "beginCaptures": {
588
588
  "1": {
589
589
  "name": "string.regexp.construct.perl6fe"
@@ -690,7 +690,7 @@
690
690
  ]
691
691
  },
692
692
  {
693
- "begin": "(?x)\n(?<= ^|\\s )\n(?:\n (m|rx|s|S)\n (\n (?:\n (?<!:P5) # < This can maybe be removed because we\n \\s*:\\w+\n (?!\\s*:P5) # < include p5_regex above it\n )*\n )\n)\n\\s*\n([^#\\p{Ps}\\p{Pe}\\p{Pi}\\p{Pf}\\w'\\-<>\\-])",
693
+ "begin": "(?x)\n(?<= ^|\\s )\n(?:\n (m|rx|s|S)\n (\n (?:\n (?<!:P5) # < This can maybe be removed because we\n \\s*:\\w+\n (?!\\s*:P5) # < include p5_regex above it\n )*\n )\n)\n\\s*\n([^#\\p{Ps}\\p{Pe}\\p{Pi}\\p{Pf}\\w'\\-<>\\-\\}\\{])",
694
694
  "beginCaptures": {
695
695
  "1": {
696
696
  "name": "string.regexp.construct.perl6fe"
@@ -421,7 +421,7 @@
421
421
  },
422
422
  "special-names": {
423
423
  "name": "constant.other.caps.python",
424
- "match": "(?x)\n \\b\n (\n _* [[:upper:]]{2}\n )\n [[:upper:]\\d]* (_\\w*)?\n \\b\n"
424
+ "match": "(?x)\n \\b\n # we want to see \"enough\", meaning 2 or more upper-case\n # letters in the beginning of the constant\n #\n # for more details refer to:\n # https://github.com/MagicStack/MagicPython/issues/42\n (\n _* [[:upper:]] [_\\d]* [[:upper:]]\n )\n [[:upper:]\\d]* (_\\w*)?\n \\b\n"
425
425
  },
426
426
  "curly-braces": {
427
427
  "begin": "\\{",
@@ -878,7 +878,7 @@
878
878
  "name": "storage.type.format.python"
879
879
  },
880
880
  "3": {
881
- "name": "support.other.format.python"
881
+ "name": "storage.type.format.python"
882
882
  }
883
883
  }
884
884
  },
@@ -891,7 +891,7 @@
891
891
  "name": "storage.type.format.python"
892
892
  },
893
893
  "3": {
894
- "name": "support.other.format.python"
894
+ "name": "storage.type.format.python"
895
895
  }
896
896
  },
897
897
  "patterns": [
@@ -4953,7 +4953,7 @@
4953
4953
  "name": "storage.type.format.python"
4954
4954
  },
4955
4955
  "2": {
4956
- "name": "support.other.format.python"
4956
+ "name": "storage.type.format.python"
4957
4957
  }
4958
4958
  }
4959
4959
  },
@@ -4970,7 +4970,7 @@
4970
4970
  "name": "storage.type.format.python"
4971
4971
  },
4972
4972
  "2": {
4973
- "name": "support.other.format.python"
4973
+ "name": "storage.type.format.python"
4974
4974
  }
4975
4975
  },
4976
4976
  "patterns": [
@@ -4981,35 +4981,35 @@
4981
4981
  "include": "#fstring-single-brace"
4982
4982
  },
4983
4983
  {
4984
- "name": "support.other.format.python",
4984
+ "name": "storage.type.format.python",
4985
4985
  "match": "([bcdeEfFgGnosxX%])(?=})"
4986
4986
  },
4987
4987
  {
4988
- "name": "support.other.format.python",
4988
+ "name": "storage.type.format.python",
4989
4989
  "match": "(\\.\\d+)"
4990
4990
  },
4991
4991
  {
4992
- "name": "support.other.format.python",
4992
+ "name": "storage.type.format.python",
4993
4993
  "match": "(,)"
4994
4994
  },
4995
4995
  {
4996
- "name": "support.other.format.python",
4996
+ "name": "storage.type.format.python",
4997
4997
  "match": "(\\d+)"
4998
4998
  },
4999
4999
  {
5000
- "name": "support.other.format.python",
5000
+ "name": "storage.type.format.python",
5001
5001
  "match": "(\\#)"
5002
5002
  },
5003
5003
  {
5004
- "name": "support.other.format.python",
5004
+ "name": "storage.type.format.python",
5005
5005
  "match": "([-+ ])"
5006
5006
  },
5007
5007
  {
5008
- "name": "support.other.format.python",
5008
+ "name": "storage.type.format.python",
5009
5009
  "match": "([<>=^])"
5010
5010
  },
5011
5011
  {
5012
- "name": "support.other.format.python",
5012
+ "name": "storage.type.format.python",
5013
5013
  "match": "(\\w)"
5014
5014
  }
5015
5015
  ]
@@ -5169,7 +5169,7 @@
5169
5169
  "name": "storage.type.format.python"
5170
5170
  },
5171
5171
  "2": {
5172
- "name": "support.other.format.python"
5172
+ "name": "storage.type.format.python"
5173
5173
  }
5174
5174
  }
5175
5175
  },
@@ -5186,7 +5186,7 @@
5186
5186
  "name": "storage.type.format.python"
5187
5187
  },
5188
5188
  "2": {
5189
- "name": "support.other.format.python"
5189
+ "name": "storage.type.format.python"
5190
5190
  }
5191
5191
  },
5192
5192
  "patterns": [
@@ -5197,35 +5197,35 @@
5197
5197
  "include": "#fstring-multi-brace"
5198
5198
  },
5199
5199
  {
5200
- "name": "support.other.format.python",
5200
+ "name": "storage.type.format.python",
5201
5201
  "match": "([bcdeEfFgGnosxX%])(?=})"
5202
5202
  },
5203
5203
  {
5204
- "name": "support.other.format.python",
5204
+ "name": "storage.type.format.python",
5205
5205
  "match": "(\\.\\d+)"
5206
5206
  },
5207
5207
  {
5208
- "name": "support.other.format.python",
5208
+ "name": "storage.type.format.python",
5209
5209
  "match": "(,)"
5210
5210
  },
5211
5211
  {
5212
- "name": "support.other.format.python",
5212
+ "name": "storage.type.format.python",
5213
5213
  "match": "(\\d+)"
5214
5214
  },
5215
5215
  {
5216
- "name": "support.other.format.python",
5216
+ "name": "storage.type.format.python",
5217
5217
  "match": "(\\#)"
5218
5218
  },
5219
5219
  {
5220
- "name": "support.other.format.python",
5220
+ "name": "storage.type.format.python",
5221
5221
  "match": "([-+ ])"
5222
5222
  },
5223
5223
  {
5224
- "name": "support.other.format.python",
5224
+ "name": "storage.type.format.python",
5225
5225
  "match": "([<>=^])"
5226
5226
  },
5227
5227
  {
5228
- "name": "support.other.format.python",
5228
+ "name": "storage.type.format.python",
5229
5229
  "match": "(\\w)"
5230
5230
  }
5231
5231
  ]
@@ -118,7 +118,7 @@
118
118
  {
119
119
  "comment": "renpy screen statement keywords",
120
120
  "name": "support.type.screen.renpy",
121
- "match": "\\b(kind|color|action|area|hovered|unhovered|clicked|modal|text_style|default|has|who|what|tag|value|theme)\\b"
121
+ "match": "\\b(kind|color|action|area|hovered|unhovered|clicked|modal|text_style|has|who|what|tag|value|theme)\\b"
122
122
  },
123
123
  {
124
124
  "comment": "renpy transform keywords",
@@ -453,7 +453,7 @@
453
453
  ]
454
454
  },
455
455
  {
456
- "begin": "((define)|(image)|(scene)|(show)|(hide))\\s+((\\s)|(?=[a-zA-Z_][a-zA-Z_0-9]*\\s*))",
456
+ "begin": "((default)|(define)|(image)|(scene)|(show)|(hide))\\s+((\\s)|(?=[a-zA-Z_][a-zA-Z_0-9]*\\s*))",
457
457
  "beginCaptures": {
458
458
  "1": {
459
459
  "name": "keyword.control.statement.renpy"
@@ -35,7 +35,7 @@
35
35
  }
36
36
  },
37
37
  "comment": "Main keywords",
38
- "match": "\\b(contract|library|using|struct|function|modifier)\\s+([A-Za-z_]\\w*)(?:\\s+is\\s+((?:[A-Za-z_][\\,\\s]*)*))?\\b",
38
+ "match": "\\b(contract|interface|library|using|struct|function|modifier)\\s+([A-Za-z_]\\w*)(?:\\s+is\\s+((?:[A-Za-z_][\\,\\s]*)*))?\\b",
39
39
  "name": "keyword.control"
40
40
  },
41
41
  {
@@ -75,7 +75,7 @@
75
75
  },
76
76
  {
77
77
  "comment": "Langauge keywords",
78
- "match": "\\b(var|import|function|constant|if|else|for|while|do|break|continue|returns?|private|public|internal|external|inherited|this|suicide|new|is|throw|\\_)\\b",
78
+ "match": "\\b(var|import|function|constant|if|else|for|while|do|break|continue|returns?|private|public|internal|external|inherited|this|suicide|new|is|throw|revert|assert|require|\\_)\\b",
79
79
  "name": "keyword.control"
80
80
  },
81
81
  {