github-linguist 6.3.1 → 6.4.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 0ffb89c056859f7afd40de3e4b64a26d685a255f
4
- data.tar.gz: 44e2f1be77d1c9997ed70a90ece91899b1fa2764
2
+ SHA256:
3
+ metadata.gz: ce37d4216eefa6820fa0469c8ffb9b4ffa9d7b063503dddf49f0ff42ace21db9
4
+ data.tar.gz: c7da000472e9541a7530ceef7888624d7bbb6b05859d1f37f5d90ec50e7f3d45
5
5
  SHA512:
6
- metadata.gz: 02f07ff2bd6956acbcf27d4dc5eaeb2ea0c3bd28ed6ec5b779ea32d17151ea602fe934094a4bdeee1bce33f9c2b89a2128094f0768180227a1d984db14a7e814
7
- data.tar.gz: a6c30e599c3367b0ae997f3fb074cb55819cb4541e5f1b7a5ad69d687c2309238b2b3d5455a5447432d8579df407d4252683df1f570f987a7653c57b46dc50f0
6
+ metadata.gz: 93ec40363541e67b147c8e572560befe7f01be5879b162ab8a0324985ec61ff294af70974642e2ff6c961e88c033d9a7b48f59644caa13f660bc63f0a6a7e287
7
+ data.tar.gz: bddc90c56d90e4b0b763f5abfa1093912f4917855163c0b3cf3250e8054125fcaa3d35c6d000313a3da9ae0a76693c1f137f4f3a1290d41ccb6264dba52041f3
data/bin/git-linguist CHANGED
@@ -82,6 +82,8 @@ class GitLinguist
82
82
  f.close
83
83
  File.rename(f.path, cache_file)
84
84
  end
85
+
86
+ FileUtils.chmod 0644, cache_file
85
87
  end
86
88
 
87
89
  def load_cache
@@ -98,12 +100,12 @@ def git_linguist(args)
98
100
  commit = nil
99
101
 
100
102
  parser = OptionParser.new do |opts|
101
- opts.banner = <<-HELP
102
- Linguist v#{Linguist::VERSION}
103
- Detect language type and determine language breakdown for a given Git repository.
103
+ opts.banner = <<~HELP
104
+ Linguist v#{Linguist::VERSION}
105
+ Detect language type and determine language breakdown for a given Git repository.
104
106
 
105
- Usage:
106
- git-linguist [OPTIONS] stats|breakdown|dump-cache|clear|disable"
107
+ Usage:
108
+ git-linguist [OPTIONS] stats|breakdown|dump-cache|clear|disable
107
109
  HELP
108
110
 
109
111
  opts.on("-f", "--force", "Force a full rescan") { incremental = false }
@@ -134,6 +136,8 @@ def git_linguist(args)
134
136
  $stderr.print(parser.help)
135
137
  exit 1
136
138
  end
139
+ rescue SystemExit
140
+ exit 1
137
141
  rescue Exception => e
138
142
  $stderr.puts e.message
139
143
  $stderr.puts e.backtrace
@@ -2,6 +2,12 @@
2
2
  "name": "ATS",
3
3
  "scopeName": "source.ats",
4
4
  "patterns": [
5
+ {
6
+ "include": "#quantifier_curly"
7
+ },
8
+ {
9
+ "include": "#quantifier_square"
10
+ },
5
11
  {
6
12
  "include": "#block"
7
13
  },
@@ -12,7 +18,10 @@
12
18
  "include": "#comment_line"
13
19
  },
14
20
  {
15
- "include": "#comment_block"
21
+ "include": "#comment_block_c"
22
+ },
23
+ {
24
+ "include": "#comment_block_sml"
16
25
  },
17
26
  {
18
27
  "include": "#embed"
@@ -21,13 +30,13 @@
21
30
  "include": "#operators"
22
31
  },
23
32
  {
24
- "include": "#quantifier_curly"
33
+ "include": "#quantifier_arrow"
25
34
  },
26
35
  {
27
- "include": "#quantifier_square"
36
+ "include": "#definition_function"
28
37
  },
29
38
  {
30
- "include": "#quantifier_arrow"
39
+ "include": "#definition_type"
31
40
  },
32
41
  {
33
42
  "include": "#keywords"
@@ -35,6 +44,9 @@
35
44
  {
36
45
  "include": "#keywords_types"
37
46
  },
47
+ {
48
+ "include": "#false_true"
49
+ },
38
50
  {
39
51
  "include": "#string"
40
52
  },
@@ -49,12 +61,16 @@
49
61
  },
50
62
  {
51
63
  "include": "#number"
64
+ },
65
+ {
66
+ "include": "#identifier"
52
67
  }
53
68
  ],
54
69
  "repository": {
55
70
  "block": {
56
- "begin": "(?\u003c=where|=|^|then|else|\\$rec|\\$rec_t|\\$rec_vt)(?:\\s*){",
57
- "end": "}",
71
+ "name": "meta.block",
72
+ "begin": "(?\u003c=where|=|^|then|else|\\$rec|\\$rec_t|\\$rec_vt)(?:\\s*)\\{",
73
+ "end": "\\}",
58
74
  "patterns": [
59
75
  {
60
76
  "include": "$self"
@@ -66,13 +82,19 @@
66
82
  "name": "string.quoted.double",
67
83
  "match": "(')([^\\\\]{0,1}|\\\\(\\\\|[abefpnrtv'\"?]|[0-3]\\d{0,2}|[4-7]\\d?|x[a-fA-F0-9]{0,2}|u[a-fA-F0-9]{0,4}|U[a-fA-F0-9]{0,8}))(')"
68
84
  },
69
- "comment_block": {
85
+ "comment_block_c": {
86
+ "name": "comment.block",
87
+ "begin": "/\\*",
88
+ "end": "\\*/",
89
+ "applyEndPatternLast": true
90
+ },
91
+ "comment_block_sml": {
70
92
  "name": "comment.block",
71
93
  "begin": "\\(\\*",
72
94
  "end": "\\*\\)",
73
95
  "patterns": [
74
96
  {
75
- "include": "#comment_block"
97
+ "include": "#comment_block_sml"
76
98
  }
77
99
  ],
78
100
  "applyEndPatternLast": true
@@ -82,7 +104,7 @@
82
104
  "match": "//.*$"
83
105
  },
84
106
  "comment_rest": {
85
- "name": "comment",
107
+ "name": "comment.block",
86
108
  "begin": "////",
87
109
  "end": ".\\z",
88
110
  "patterns": [
@@ -92,18 +114,66 @@
92
114
  ],
93
115
  "applyEndPatternLast": true
94
116
  },
117
+ "definition_function": {
118
+ "name": "meta.function-definition",
119
+ "begin": "\\b(?:castfn|fn|fun|implement|implmnt|infixl|infixr|infix|overload|postfix|praxi|prfn|prfun|primplement|primplmnt|var)\\b",
120
+ "end": "\\b[a-zA-Z][a-zA-Z0-9_']*\\b",
121
+ "patterns": [
122
+ {
123
+ "include": "$self"
124
+ }
125
+ ],
126
+ "beginCaptures": {
127
+ "0": {
128
+ "name": "keyword"
129
+ }
130
+ },
131
+ "endCaptures": {
132
+ "0": {
133
+ "name": "entity.name.function"
134
+ }
135
+ }
136
+ },
137
+ "definition_type": {
138
+ "name": "meta.type-definition",
139
+ "begin": "\\b(abstype|abst@ype|abst0pe|absvtype|absvt@ype|absvt0pe|absviewtype|absviewt@ype|absviewt0pe|absview|absprop|datatype|datavtype|dataviewtype|dataview|dataprop|datasort|sortdef|propdef|viewdef|viewtypedef|vtypedef|stadef|stacst|typedef)\\b",
140
+ "end": "\\b[a-zA-Z][a-zA-Z0-9_']*\\b",
141
+ "patterns": [
142
+ {
143
+ "include": "$self"
144
+ }
145
+ ],
146
+ "beginCaptures": {
147
+ "0": {
148
+ "name": "keyword"
149
+ }
150
+ },
151
+ "endCaptures": {
152
+ "0": {
153
+ "name": "entity.name.type storage.type"
154
+ }
155
+ }
156
+ },
95
157
  "embed": {
96
158
  "name": "meta",
97
159
  "begin": "(%{)",
98
160
  "end": "(%})"
99
161
  },
162
+ "false_true": {
163
+ "name": "constant.language.boolean",
164
+ "match": "\\b(?:false|true)\\b"
165
+ },
166
+ "identifier": {
167
+ "name": "identifier",
168
+ "match": "\\b[a-zA-Z][a-zA-Z0-9_']*\\b"
169
+ },
100
170
  "keywords": {
101
171
  "name": "keyword",
102
- "match": "(\\#|\\$)(\\w+)|\\b(castfn|and|andalso|assume|as|begin|break|case(\\+|-)?|class|continue|dynload|dyn|else|end|exception|extern|fix|fn|for|fun|if|implement|implmnt|primplement|primplmnt|infixl|infixr|infix|in|lam|let|llam|local|macdef|macrodef|method|modprop|modtype|module|nonfix|object|of|op|or|orelse|overload|par|postfix|praxi|prefix|prfn|prfun|prval|rec|sif|staif|staload|stavar|sta|struct|symelim|symintr|then|try|union|val(\\+|-)?|var|when|where|while|withprop|withtype|withviewtype|withview|with)\\b"
172
+ "match": "(\\#|\\$)(\\w+)|\\b(castfn|and|andalso|assume|as|begin|break|case(\\+|-)?|class|continue|dynload|dyn|else|end|exception|extern|fix|fn|for|fun|if|implement|implmnt|primplement|primplmnt|infixl|infixr|infix|in|lam|let|llam|local|macdef|macrodef|method|modprop|modtype|module|nonfix|object|of|op|or|orelse|overload|par|postfix|praxi|prefix|prfn|prfun|prval|rec|scase|sif|stacst|staif|staload|stavar|sta|struct|symelim|symintr|then|try|union|val(\\+|-)?|var|when|where|while|withprop|withtype|withviewtype|withview|with)\\b"
103
173
  },
104
174
  "keywords_types": {
105
175
  "name": "keyword",
106
- "match": "(\\#|\\$)(\\w+)|\\b(abstype|abst@ype|abst0pe|absvtype|absvt@ype|absvt0pe|absviewtype|absviewt@ype|absviewt0pe|absview|absprop|datatype|datavtype|dataviewtype|dataview|dataprop|datasort|sortdef|propdef|viewdef|viewtypedef|vtypedef|stadef|typedef|)\\b"
176
+ "match": "(\\#|\\$)(\\w+)|\\b(abstype|abst@ype|abst0pe|absvtype|absvt@ype|absvt0pe|absviewtype|absviewt@ype|absviewt0pe|absview|absprop|datatype|datavtype|dataviewtype|dataview|dataprop|datasort|sortdef|propdef|viewdef|viewtypedef|vtypedef|stadef|typedef)\\b"
107
177
  },
108
178
  "number": {
109
179
  "name": "constant.numeric",
@@ -119,14 +189,14 @@
119
189
  "end": "\u003e"
120
190
  },
121
191
  "quantifier_curly": {
122
- "name": "support.type",
123
- "begin": "({)",
124
- "end": "(})"
192
+ "name": "support.type.quantifier.universal",
193
+ "begin": "\\{(?=[\\S])",
194
+ "end": "\\}"
125
195
  },
126
196
  "quantifier_square": {
127
- "name": "support.type",
128
- "begin": "(\\[)",
129
- "end": "(\\])"
197
+ "name": "support.type.quantifier.existential",
198
+ "begin": "\\[(?=[\\S])",
199
+ "end": "\\]"
130
200
  },
131
201
  "records": {
132
202
  "begin": "('|@)({)",
@@ -13,6 +13,9 @@
13
13
  {
14
14
  "name": "support.function.other.autoit"
15
15
  },
16
+ {
17
+ "name": "support.function.other.autoit"
18
+ },
16
19
  {
17
20
  "name": "support.type.macro.autoit",
18
21
  "match": "@\\b(?i:appdatacommondir|appdatadir|autoitexe|autoitpid|autoitversion|autoitx64|com_eventobj|commonfilesdir|compiled|computername|comspec|cpuarch|cr|crlf|desktopcommondir|desktopdepth|desktopdir|desktopheight|desktoprefresh|desktopwidth|documentscommondir|error|exitcode|exitmethod|extended|favoritescommondir|favoritesdir|gui_ctrlhandle|gui_ctrlid|gui_dragfile|gui_dragid|gui_dropid|gui_winhandle|homedrive|homepath|homeshare|hotkeypressed|hour|ipaddress1|ipaddress2|ipaddress3|ipaddress4|kblayout|lf|localappdatadir|logondnsdomain|logondomain|logonserver|mday|min|mon|msec|muilang|mydocumentsdir|numparams|osarch|osbuild|oslang|osservicepack|ostype|osversion|programfilesdir|programscommondir|programsdir|scriptdir|scriptfullpath|scriptlinenumber|scriptname|sec|startmenucommondir|startmenudir|startupcommondir|startupdir|sw_disable|sw_enable|sw_hide|sw_lock|sw_maximize|sw_minimize|sw_restore|sw_show|sw_showdefault|sw_showmaximized|sw_showminimized|sw_showminnoactive|sw_showna|sw_shownoactivate|sw_shownormal|sw_unlock|systemdir|tab|tempdir|tray_id|trayiconflashing|trayiconvisible|username|userprofiledir|wday|windowsdir|workingdir|yday|year)\\b"
@@ -1426,11 +1426,17 @@
1426
1426
  "begin": "(\\bxml)(\\s*)(`)",
1427
1427
  "end": "`",
1428
1428
  "patterns": [
1429
+ {
1430
+ "include": "#xmlTag"
1431
+ },
1432
+ {
1433
+ "include": "#xmlComment"
1434
+ },
1429
1435
  {
1430
1436
  "include": "#templateVariable"
1431
1437
  },
1432
1438
  {
1433
- "name": "string",
1439
+ "name": "text.xml.ballerina",
1434
1440
  "match": "."
1435
1441
  }
1436
1442
  ],
@@ -1450,6 +1456,114 @@
1450
1456
  }
1451
1457
  }
1452
1458
  ]
1459
+ },
1460
+ "xmlComment": {
1461
+ "patterns": [
1462
+ {
1463
+ "name": "comment.block.xml.ballerina",
1464
+ "begin": "\u003c!--",
1465
+ "end": "--\u003e",
1466
+ "beginCaptures": {
1467
+ "0": {
1468
+ "name": "comment.block.xml.ballerina"
1469
+ }
1470
+ },
1471
+ "endCaptures": {
1472
+ "0": {
1473
+ "name": "comment.block.xml.ballerina"
1474
+ }
1475
+ }
1476
+ }
1477
+ ]
1478
+ },
1479
+ "xmlDoubleQuotedString": {
1480
+ "patterns": [
1481
+ {
1482
+ "begin": "\\\"",
1483
+ "end": "\\\"",
1484
+ "patterns": [
1485
+ {
1486
+ "name": "constant.character.escape.ballerina",
1487
+ "match": "\\\\."
1488
+ },
1489
+ {
1490
+ "name": "string",
1491
+ "match": "."
1492
+ }
1493
+ ],
1494
+ "beginCaptures": {
1495
+ "0": {
1496
+ "name": "string.begin.ballerina"
1497
+ }
1498
+ },
1499
+ "endCaptures": {
1500
+ "0": {
1501
+ "name": "string.end.ballerina"
1502
+ }
1503
+ }
1504
+ }
1505
+ ]
1506
+ },
1507
+ "xmlSingleQuotedString": {
1508
+ "patterns": [
1509
+ {
1510
+ "begin": "\\'",
1511
+ "end": "\\'",
1512
+ "patterns": [
1513
+ {
1514
+ "name": "constant.character.escape.ballerina",
1515
+ "match": "\\\\."
1516
+ },
1517
+ {
1518
+ "name": "string",
1519
+ "match": "."
1520
+ }
1521
+ ],
1522
+ "beginCaptures": {
1523
+ "0": {
1524
+ "name": "string.begin.ballerina"
1525
+ }
1526
+ },
1527
+ "endCaptures": {
1528
+ "0": {
1529
+ "name": "string.end.ballerina"
1530
+ }
1531
+ }
1532
+ }
1533
+ ]
1534
+ },
1535
+ "xmlTag": {
1536
+ "patterns": [
1537
+ {
1538
+ "begin": "(\u003c\\/?\\??)\\s*([-_a-zA-Z0-9]+)",
1539
+ "end": "\\??\\/?\u003e",
1540
+ "patterns": [
1541
+ {
1542
+ "include": "#xmlSingleQuotedString"
1543
+ },
1544
+ {
1545
+ "include": "#xmlDoubleQuotedString"
1546
+ },
1547
+ {
1548
+ "name": "entity.other.attribute-name.xml.ballerina",
1549
+ "match": "([a-zA-Z-]+)"
1550
+ }
1551
+ ],
1552
+ "beginCaptures": {
1553
+ "1": {
1554
+ "name": "punctuation.definition.tag.begin.xml.ballerina"
1555
+ },
1556
+ "2": {
1557
+ "name": "entity.name.tag.xml.ballerina"
1558
+ }
1559
+ },
1560
+ "endCaptures": {
1561
+ "0": {
1562
+ "name": "punctuation.definition.tag.begin.xml.ballerina"
1563
+ }
1564
+ }
1565
+ }
1566
+ ]
1453
1567
  }
1454
1568
  }
1455
1569
  }
@@ -124,6 +124,12 @@
124
124
  }
125
125
  }
126
126
  },
127
+ {
128
+ "name": "support.function"
129
+ },
130
+ {
131
+ "name": "support.function"
132
+ },
127
133
  {
128
134
  "name": "support.function"
129
135
  }
@@ -0,0 +1,78 @@
1
+ {
2
+ "name": "Modula-3",
3
+ "scopeName": "source.modula-3",
4
+ "patterns": [
5
+ {
6
+ "name": "keyword.modula-3",
7
+ "match": "\\b(AND|ANY|ARRAY|AS|BEGIN|BITS|BRANDED|BY|CASE|CONST|DIV|DO|ELSE|ELSIF|END|EVAL|EXCEPT|EXCEPTION|EXIT|EXPORTS|FINALLY|FOR|FROM|GENERIC|IF|IMPORT|IN|INTERFACE|LOCK|LOOP|METHODS|MOD|MODULE|NOT|OBJECT|OF|OR|OVERRIDES|PROCEDURE|RAISE|RAISES|READONLY|RECORD|REF|REPEAT|RETURN|REVEAL|SET|THEN|TO|TRY|TYPE|TYPECASE|UNSAFE|UNTIL|UNTRACED|VALUE|VAR|WHILE|WITH)\\b"
8
+ },
9
+ {
10
+ "name": "constant.language.modula-3",
11
+ "match": "\\b(ABS|ADDRESS|ADR|ADRSIZE|ANY|BITSIZE|BOOLEAN|BYTESIZE|CARDINAL|CEILING|CHAR|DEC|DISPOSE|EXTENDED|FALSE|FIRST|FLOAT|FLOOR|INC|INTEGER|IS|LAST|LONGREAL|LOOPHOLE|MAX|MIN|MUTEX|NARROW|NEW|NIL|NULL|NUMBER|ORD|REAL|REF|REFANY|ROOT|ROUND|SUBARRAY|TEXT|TRUE|TRUNC|TYPE|TYPECODE|VAL)\\b"
12
+ },
13
+ {
14
+ "name": "constant.language.cm3_specific.modula-3",
15
+ "match": "\\b(LONGCARD|LONGINT)\\b"
16
+ },
17
+ {
18
+ "name": "constant.numeric.float.modula-3",
19
+ "match": "(\\b|[\\+\\-])[0-9]+\\.[0-9]+([DdEeXx][\\+\\-]?[0-9]+)?\\b"
20
+ },
21
+ {
22
+ "name": "constant.numeric.integer.modula-3",
23
+ "match": "(\\b|[\\+\\-])[0-9]+(\\_[0-9a-fA-F]+)?L?\\b"
24
+ },
25
+ {
26
+ "name": "string.quoted.double.modula-3",
27
+ "begin": "\"",
28
+ "end": "\"",
29
+ "patterns": [
30
+ {
31
+ "include": "#escape_sequence"
32
+ }
33
+ ]
34
+ },
35
+ {
36
+ "name": "string.quoted.single.modula-3",
37
+ "begin": "'",
38
+ "end": "'",
39
+ "patterns": [
40
+ {
41
+ "include": "#escape_sequence"
42
+ }
43
+ ]
44
+ },
45
+ {
46
+ "include": "#comment"
47
+ },
48
+ {
49
+ "include": "#pragma"
50
+ }
51
+ ],
52
+ "repository": {
53
+ "comment": {
54
+ "name": "comment.block.modula-3",
55
+ "begin": "\\(\\*",
56
+ "end": "\\*\\)",
57
+ "patterns": [
58
+ {
59
+ "include": "#comment"
60
+ }
61
+ ]
62
+ },
63
+ "escape_sequence": {
64
+ "name": "constant.character.escape.modula-3",
65
+ "match": "\\\\[0-7]{3}|\\\\[\\\\fnrt\\\"\\']"
66
+ },
67
+ "pragma": {
68
+ "name": "keyword.control.directive.pragma.modula-3",
69
+ "begin": "\\\u003c\\*",
70
+ "end": "\\*\\\u003e",
71
+ "patterns": [
72
+ {
73
+ "include": "#pragma"
74
+ }
75
+ ]
76
+ }
77
+ }
78
+ }