github-linguist 7.6.0 → 7.10.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/bin/github-linguist +17 -4
- data/grammars/annotation.liquidhaskell.haskell.json +58 -11
- data/grammars/etc.json +472 -4
- data/grammars/hidden.manref.json +29 -0
- data/grammars/hidden.regexp.injection-shell.json +28 -0
- data/grammars/hint.haskell.json +58 -11
- data/grammars/hint.message.haskell.json +58 -11
- data/grammars/hint.type.haskell.json +58 -11
- data/grammars/injections.etc.json +601 -1
- data/grammars/markdown.plantuml.codeblock.json +26 -0
- data/grammars/source.4dm.json +1156 -0
- data/grammars/source.abap.json +7 -7
- data/grammars/source.abl.json +685 -83
- data/grammars/source.abnf.json +23 -1
- data/grammars/source.agda.json +33 -203
- data/grammars/source.ahk.json +9 -5
- data/grammars/source.angelscript.json +1 -1
- data/grammars/source.ballerina.json +55 -19
- data/grammars/source.c++.json +4 -4
- data/grammars/source.c.platform.json +584 -33
- data/grammars/source.chapel.json +7 -4
- data/grammars/source.csound.json +1 -1
- data/grammars/source.css.json +3 -3
- data/grammars/source.css.scss.json +164 -15
- data/grammars/source.curlrc.json +869 -65
- data/grammars/source.d.json +2 -2
- data/grammars/source.dart.json +58 -32
- data/grammars/source.dircolors.json +137 -0
- data/grammars/source.direct-x.json +135 -0
- data/grammars/source.ebnf.json +67 -39
- data/grammars/source.editorconfig.json +23 -5
- data/grammars/source.elixir.json +51 -0
- data/grammars/source.elm.json +1 -1
- data/grammars/source.emacs.lisp.json +10 -0
- data/grammars/source.faust.json +119 -0
- data/grammars/source.futhark.json +146 -0
- data/grammars/source.gcode.json +166 -8
- data/grammars/source.gedcom.json +196 -0
- data/grammars/source.generic-db.json +41 -0
- data/grammars/source.gfm.blade.json +15 -0
- data/grammars/source.gfm.json +1697 -1439
- data/grammars/source.gitconfig.json +1 -1
- data/grammars/source.hack.json +200 -98
- data/grammars/source.haskell.json +58 -11
- data/grammars/source.hlsl.json +9 -5
- data/grammars/source.hosts.json +40 -0
- data/grammars/source.hsig.json +58 -11
- data/grammars/source.httpspec.json +1 -1
- data/grammars/source.hx.json +9 -5
- data/grammars/source.hxml.json +2 -2
- data/grammars/source.idris.json +1 -1
- data/grammars/source.igor.json +46 -2
- data/grammars/source.ini.npmrc.json +311 -0
- data/grammars/source.inno.json +133 -0
- data/grammars/source.inputrc.json +500 -0
- data/grammars/source.isabelle.root.json +1 -1
- data/grammars/source.jison.json +3 -0
- data/grammars/source.jisonlex.json +3 -0
- data/grammars/source.js.json +4 -4
- data/grammars/source.julia.json +70 -24
- data/grammars/source.kotlin.json +17 -51
- data/grammars/source.lcov.json +398 -0
- data/grammars/source.lean.json +20 -4
- data/grammars/source.lean.markdown.json +2598 -0
- data/grammars/source.lex.json +4 -4
- data/grammars/source.m2.json +125 -0
- data/grammars/source.m4.json +141 -99
- data/grammars/source.man-conf.json +47 -35
- data/grammars/source.matlab.json +437 -184
- data/grammars/source.mcfunction-snapshot.json +21388 -561
- data/grammars/source.mcfunction.json +55 -5
- data/grammars/source.meson.json +1 -1
- data/grammars/source.mlir.json +37 -317
- data/grammars/source.modula-3.json +10 -0
- data/grammars/source.msl.json +755 -0
- data/grammars/source.nasl.json +155 -0
- data/grammars/source.neon.json +381 -0
- data/grammars/source.nextflow.json +2 -2
- data/grammars/source.objc.platform.json +493 -35
- data/grammars/source.odin-ehr.json +806 -0
- data/grammars/source.odin.json +402 -0
- data/grammars/source.openbsd-pkg.contents.json +128 -0
- data/grammars/source.opts.json +12 -2
- data/grammars/source.perl6fe.json +1 -1
- data/grammars/source.postscript.json +358 -103
- data/grammars/source.prisma.json +435 -0
- data/grammars/source.purescript.json +29 -2
- data/grammars/source.python.json +52 -0
- data/grammars/source.q.json +150 -63
- data/grammars/source.qasm.json +66 -0
- data/grammars/source.ql.json +1408 -0
- data/grammars/source.r.json +4 -4
- data/grammars/source.reason.json +28 -16
- data/grammars/source.rego.json +124 -0
- data/grammars/source.sass.json +158 -3
- data/grammars/source.scala.json +53 -18
- data/grammars/source.sieve.json +383 -0
- data/grammars/source.solidity.json +1 -1
- data/grammars/source.ssh-config.json +1 -14
- data/grammars/source.swift.json +162 -2
- data/grammars/source.sy.json +2088 -183
- data/grammars/source.tags.json +266 -0
- data/grammars/source.terraform.json +576 -132
- data/grammars/source.tnsaudit.json +256 -0
- data/grammars/source.ts.json +246 -70
- data/grammars/source.tsx.json +247 -71
- data/grammars/source.v.json +587 -761
- data/grammars/source.vim-snippet.json +645 -0
- data/grammars/source.viml.json +6 -6
- data/grammars/source.webassembly.json +10 -0
- data/grammars/source.webidl.json +8 -0
- data/grammars/source.wgetrc.json +1640 -0
- data/grammars/source.wsd.json +781 -0
- data/grammars/source.x86.json +7 -3
- data/grammars/source.zig.json +231 -360
- data/grammars/text.dfy.dafny.json +188 -0
- data/grammars/text.html.php.blade.json +535 -528
- data/grammars/text.html.riot.json +788 -0
- data/grammars/text.muse.json +1471 -0
- data/grammars/text.openbsd-pkg.desc.json +78 -0
- data/grammars/text.roff.json +49 -1
- data/grammars/text.sfd.json +21 -0
- data/grammars/text.tex.latex.haskell.json +58 -11
- data/grammars/text.vim-help.json +383 -0
- data/grammars/text.xml.svg.json +8 -2
- data/grammars/version +1 -1
- data/lib/linguist/VERSION +1 -1
- data/lib/linguist/blob_helper.rb +4 -2
- data/lib/linguist/file_blob.rb +1 -1
- data/lib/linguist/generated.rb +96 -28
- data/lib/linguist/heuristics.yml +64 -4
- data/lib/linguist/languages.json +1 -1
- data/lib/linguist/languages.yml +408 -49
- data/lib/linguist/lazy_blob.rb +10 -10
- data/lib/linguist/linguist.bundle +0 -0
- data/lib/linguist/samples.json +48129 -31562
- data/lib/linguist/shebang.rb +5 -3
- data/lib/linguist/vendor.yml +71 -60
- metadata +48 -17
- data/grammars/source.LS.json +0 -85
- data/grammars/source.MCPOST.json +0 -54
- data/grammars/source.MOD.json +0 -55
- data/grammars/source.apt.json +0 -18
- data/grammars/source.jlex.json +0 -322
- data/grammars/source.yaml-ext.json +0 -324
- data/grammars/text.html.abl.json +0 -70
data/grammars/source.ebnf.json
CHANGED
@@ -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": "#
|
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": "
|
164
|
-
"
|
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
|
-
"
|
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
|
-
|
190
|
-
|
191
|
-
|
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",
|
@@ -51,10 +51,6 @@
|
|
51
51
|
"name": "constant.language.boolean.${1:/downcase}.editorconfig",
|
52
52
|
"match": "(?i)(?\u003c=\\s|=)(true|false|on|off|yes|no)(?=$|\\s)"
|
53
53
|
},
|
54
|
-
{
|
55
|
-
"name": "constant.language.charset.encoding.${1:/downcase}.editorconfig",
|
56
|
-
"match": "(?i)(?\u003c=\\s|=)(latin1|utf-8(?:-bom)?|utf-16[bl]e)(?=$|\\s)"
|
57
|
-
},
|
58
54
|
{
|
59
55
|
"name": "constant.language.${1:/downcase}.editorconfig",
|
60
56
|
"match": "(?i)(?\u003c=\\s|=)(CRLF|CR|LF|tab|space|unset)(?=$|\\s)"
|
@@ -200,9 +196,31 @@
|
|
200
196
|
},
|
201
197
|
{
|
202
198
|
"name": "meta.rule.${1:/downcase}.editorconfig",
|
203
|
-
"begin": "(?ix)\n^ \\s*\n(
|
199
|
+
"begin": "(?ix)\n^ \\s*\n( end_of_line\n| indent_size\n| indent_style\n| insert_final_newline\n| max_line_length\n| root\n| tab_width\n| trim_trailing_whitespace\n) \\s* (=)",
|
200
|
+
"end": "$",
|
201
|
+
"patterns": [
|
202
|
+
{
|
203
|
+
"include": "#value"
|
204
|
+
}
|
205
|
+
],
|
206
|
+
"beginCaptures": {
|
207
|
+
"1": {
|
208
|
+
"name": "keyword.other.definition.${1:/downcase}.editorconfig"
|
209
|
+
},
|
210
|
+
"2": {
|
211
|
+
"name": "punctuation.separator.key-value.editorconfig"
|
212
|
+
}
|
213
|
+
}
|
214
|
+
},
|
215
|
+
{
|
216
|
+
"name": "meta.rule.charset.editorconfig",
|
217
|
+
"begin": "^\\s*(charset)\\s*(=)",
|
204
218
|
"end": "$",
|
205
219
|
"patterns": [
|
220
|
+
{
|
221
|
+
"name": "constant.language.charset.encoding.${1:/downcase}.editorconfig",
|
222
|
+
"match": "(?i)(?\u003c=\\s|=)([-\\w]+)(?=$|\\s)"
|
223
|
+
},
|
206
224
|
{
|
207
225
|
"include": "#value"
|
208
226
|
}
|
data/grammars/source.elixir.json
CHANGED
@@ -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)|(\\)))",
|
@@ -774,6 +817,14 @@
|
|
774
817
|
}
|
775
818
|
}
|
776
819
|
},
|
820
|
+
{
|
821
|
+
"name": "comment.unused.elixir",
|
822
|
+
"match": "\\b_([\\w]+[?!]?)"
|
823
|
+
},
|
824
|
+
{
|
825
|
+
"name": "comment.wildcard.elixir",
|
826
|
+
"match": "\\b_\\b"
|
827
|
+
},
|
777
828
|
{
|
778
829
|
"name": "constant.numeric.elixir",
|
779
830
|
"match": "(?\u003c!\\w)\\?(\\\\(x[0-9A-Fa-f]{1,2}(?![0-9A-Fa-f])\\b|[^xMC])|[^\\s\\\\])"
|
data/grammars/source.elm.json
CHANGED
@@ -2,6 +2,16 @@
|
|
2
2
|
"name": "Emacs Lisp",
|
3
3
|
"scopeName": "source.emacs.lisp",
|
4
4
|
"patterns": [
|
5
|
+
{
|
6
|
+
"name": "comment.line.hashbang.emacs.lisp",
|
7
|
+
"begin": "\\A(#!)",
|
8
|
+
"end": "$",
|
9
|
+
"beginCaptures": {
|
10
|
+
"1": {
|
11
|
+
"name": "punctuation.definition.comment.hashbang.emacs.lisp"
|
12
|
+
}
|
13
|
+
}
|
14
|
+
},
|
5
15
|
{
|
6
16
|
"include": "#main"
|
7
17
|
}
|
@@ -0,0 +1,119 @@
|
|
1
|
+
{
|
2
|
+
"name": "faust",
|
3
|
+
"scopeName": "source.faust",
|
4
|
+
"patterns": [
|
5
|
+
{
|
6
|
+
"name": "comment.block.faust",
|
7
|
+
"begin": "/\\*",
|
8
|
+
"end": "\\*/",
|
9
|
+
"captures": {
|
10
|
+
"0": {
|
11
|
+
"name": "punctuation.definition.comment.faust"
|
12
|
+
}
|
13
|
+
}
|
14
|
+
},
|
15
|
+
{
|
16
|
+
"name": "comment.line.double-slash.faust",
|
17
|
+
"match": "(//).*$\\n?",
|
18
|
+
"captures": {
|
19
|
+
"1": {
|
20
|
+
"name": "punctuation.definition.comment.faust"
|
21
|
+
}
|
22
|
+
}
|
23
|
+
},
|
24
|
+
{
|
25
|
+
"name": "constant.numeric.faust",
|
26
|
+
"match": "(\\.\\d+([Ee][-+]\\d+)?i?)\\b"
|
27
|
+
},
|
28
|
+
{
|
29
|
+
"name": "constant.numeric.faust",
|
30
|
+
"match": "\\b\\d+\\.\\d*(([Ee][-+]\\d+)?i?\\b)?"
|
31
|
+
},
|
32
|
+
{
|
33
|
+
"name": "constant.numeric.faust",
|
34
|
+
"match": "\\b((0x[0-9a-fA-F]+)|(0[0-7]+i?)|(\\d+([Ee]\\d+)?i?)|(\\d+[Ee][-+]\\d+i?))\\b"
|
35
|
+
},
|
36
|
+
{
|
37
|
+
"name": "constant.symbol.faust",
|
38
|
+
"match": "\\b(mem|prefix|int|float|rdtable|rwtable|select2|select3|ffunction|fconstant|fvariable|button|checkbox|vslider|hslider|nentry|vgroup|hgroup|tgroup|vbargraph|hbargraph|attach|acos|asin|atan|atan2|cos|sin|tan|exp|log|log10|pow|sqrt|abs|min|max|fmod|remainder|floor|ceil|rint)\\b"
|
39
|
+
},
|
40
|
+
{
|
41
|
+
"name": "keyword.control.faust",
|
42
|
+
"match": "\\b(import|component|declare|library|environment|with|letrec|process|seq|par|sum|prod|inputs|outputs)\\b"
|
43
|
+
},
|
44
|
+
{
|
45
|
+
"name": "keyword.algebra.faust",
|
46
|
+
"match": "(,|:\u003e|\u003c:|:|~)"
|
47
|
+
},
|
48
|
+
{
|
49
|
+
"name": "constant.numeric.faust",
|
50
|
+
"match": "(;|=)"
|
51
|
+
},
|
52
|
+
{
|
53
|
+
"include": "#string_escaped_char"
|
54
|
+
},
|
55
|
+
{
|
56
|
+
"include": "#strings"
|
57
|
+
},
|
58
|
+
{
|
59
|
+
"include": "#operators"
|
60
|
+
}
|
61
|
+
],
|
62
|
+
"repository": {
|
63
|
+
"operators": {
|
64
|
+
"patterns": [
|
65
|
+
{
|
66
|
+
"name": "keyword.operator.faust",
|
67
|
+
"match": "(\\+|\u0026|==|!=|\\(|\\)|\\-|\\||\\-=|\\|=|\\|\\||\u003c|\u003c=|\\[|\\]|\\*|\\^|\\*=|\\^=|\u003c\\-|\u003e|\u003e=|\\{|\\}|/|\u003c\u003c|/=|\u003c\u003c=|\\+\\+|=|:=|,|;|%|\u003e\u003e|%=|\u003e\u003e=|\\-\\-|!|\\.\\.\\.|\\.|:|\u0026\\^|\u0026\\^=)"
|
68
|
+
}
|
69
|
+
]
|
70
|
+
},
|
71
|
+
"printf_verbs": {
|
72
|
+
"patterns": [
|
73
|
+
{
|
74
|
+
"name": "constant.escape.format-verb.faust",
|
75
|
+
"match": "%(\\[\\d+\\])?([\\+#\\-0\\x20]{,2}((\\d+|\\*)?(\\.?(\\d+|\\*|(\\[\\d+\\])\\*?)?(\\[\\d+\\])?)?))?[vT%tbcdoqxXUbeEfFgGsp]"
|
76
|
+
}
|
77
|
+
]
|
78
|
+
},
|
79
|
+
"string_escaped_char": {
|
80
|
+
"patterns": [
|
81
|
+
{
|
82
|
+
"name": "constant.character.escape.faust",
|
83
|
+
"match": "\\\\([0-7]{3}|[abfnrtv\\\\'\"]|x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|U[0-9a-fA-F]{8})"
|
84
|
+
},
|
85
|
+
{
|
86
|
+
"name": "invalid.illegal.unknown-escape.faust",
|
87
|
+
"match": "\\\\[^0-7xuUabfnrtv\\'\"]"
|
88
|
+
}
|
89
|
+
]
|
90
|
+
},
|
91
|
+
"strings": {
|
92
|
+
"patterns": [
|
93
|
+
{
|
94
|
+
"name": "string.quoted.double.faust",
|
95
|
+
"begin": "\"",
|
96
|
+
"end": "\"",
|
97
|
+
"patterns": [
|
98
|
+
{
|
99
|
+
"include": "#string_escaped_char"
|
100
|
+
},
|
101
|
+
{
|
102
|
+
"include": "#printf_verbs"
|
103
|
+
}
|
104
|
+
],
|
105
|
+
"beginCaptures": {
|
106
|
+
"0": {
|
107
|
+
"name": "punctuation.definition.string.begin.faust"
|
108
|
+
}
|
109
|
+
},
|
110
|
+
"endCaptures": {
|
111
|
+
"0": {
|
112
|
+
"name": "punctuation.definition.string.end.faust"
|
113
|
+
}
|
114
|
+
}
|
115
|
+
}
|
116
|
+
]
|
117
|
+
}
|
118
|
+
}
|
119
|
+
}
|
@@ -0,0 +1,146 @@
|
|
1
|
+
{
|
2
|
+
"name": "Futhark",
|
3
|
+
"scopeName": "source.futhark",
|
4
|
+
"patterns": [
|
5
|
+
{
|
6
|
+
"include": "#main"
|
7
|
+
}
|
8
|
+
],
|
9
|
+
"repository": {
|
10
|
+
"booleans": {
|
11
|
+
"name": "constant.language.boolean.$1.futhark",
|
12
|
+
"match": "(?\u003c![#'])(true|false)\\b(?![#'])"
|
13
|
+
},
|
14
|
+
"builtInTypes": {
|
15
|
+
"patterns": [
|
16
|
+
{
|
17
|
+
"name": "support.type.builtin.futhark",
|
18
|
+
"match": "(?\u003c![#'])(bool)\\b(?![#'])"
|
19
|
+
},
|
20
|
+
{
|
21
|
+
"include": "#numericTypes"
|
22
|
+
}
|
23
|
+
]
|
24
|
+
},
|
25
|
+
"character": {
|
26
|
+
"name": "string.quoted.single.character.futhark",
|
27
|
+
"match": "(')[^']?(')",
|
28
|
+
"captures": {
|
29
|
+
"1": {
|
30
|
+
"name": "punctuation.definition.string.begin.futhark"
|
31
|
+
},
|
32
|
+
"2": {
|
33
|
+
"name": "punctuation.definition.string.end.futhark"
|
34
|
+
}
|
35
|
+
}
|
36
|
+
},
|
37
|
+
"comment": {
|
38
|
+
"name": "comment.line.double-dash.futhark",
|
39
|
+
"begin": "--",
|
40
|
+
"end": "$"
|
41
|
+
},
|
42
|
+
"constructor": {
|
43
|
+
"name": "entity.name.function.constructor.futhark",
|
44
|
+
"match": "(#)['\\w]+",
|
45
|
+
"captures": {
|
46
|
+
"1": {
|
47
|
+
"name": "punctuation.definition.constructor.number-sign.futhark"
|
48
|
+
}
|
49
|
+
}
|
50
|
+
},
|
51
|
+
"functionDefinition": {
|
52
|
+
"match": "(?\u003c![#'])\\b(let|entry|type)\\s+([_A-Za-z]['\\w]*)",
|
53
|
+
"captures": {
|
54
|
+
"1": {
|
55
|
+
"patterns": [
|
56
|
+
{
|
57
|
+
"include": "#keywords"
|
58
|
+
}
|
59
|
+
]
|
60
|
+
},
|
61
|
+
"2": {
|
62
|
+
"name": "entity.name.function.futhark"
|
63
|
+
}
|
64
|
+
}
|
65
|
+
},
|
66
|
+
"keywords": {
|
67
|
+
"name": "keyword.control.$1.futhark",
|
68
|
+
"match": "(?\u003c![#'])\\b(assert|case|do|else|entry|for|if|import|include|in|let|local|loop|match|module|open|then|type|unsafe|val|while|with)\\b(?![#'])"
|
69
|
+
},
|
70
|
+
"main": {
|
71
|
+
"patterns": [
|
72
|
+
{
|
73
|
+
"include": "#functionDefinition"
|
74
|
+
},
|
75
|
+
{
|
76
|
+
"include": "#comment"
|
77
|
+
},
|
78
|
+
{
|
79
|
+
"include": "#keywords"
|
80
|
+
},
|
81
|
+
{
|
82
|
+
"include": "#numericTypes"
|
83
|
+
},
|
84
|
+
{
|
85
|
+
"include": "#builtInTypes"
|
86
|
+
},
|
87
|
+
{
|
88
|
+
"include": "#booleans"
|
89
|
+
},
|
90
|
+
{
|
91
|
+
"include": "#number"
|
92
|
+
},
|
93
|
+
{
|
94
|
+
"include": "#character"
|
95
|
+
},
|
96
|
+
{
|
97
|
+
"include": "#var"
|
98
|
+
},
|
99
|
+
{
|
100
|
+
"include": "#constructor"
|
101
|
+
},
|
102
|
+
{
|
103
|
+
"include": "#operator"
|
104
|
+
},
|
105
|
+
{
|
106
|
+
"include": "etc#bracket"
|
107
|
+
},
|
108
|
+
{
|
109
|
+
"include": "etc"
|
110
|
+
}
|
111
|
+
]
|
112
|
+
},
|
113
|
+
"number": {
|
114
|
+
"name": "constant.numeric.futhark",
|
115
|
+
"match": "(?x) -?\n(?:\n\t(?:0[xX])\n\t[0-9a-fA-F]+\n\t(?: \\.[0-9a-fA-F]+)?\n\t(?: [Pp][+-]?[0-9]+)?\n\t\n\t|\n\t\n\t[0-9]+\n\t(?:\\.[0-9]+)?\n\t(?:[Ee][+-]?[0-9]+)?\n) (?:i8|i16|i32|i64|u8|u16|u32|u64|f32|f64)?"
|
116
|
+
},
|
117
|
+
"numericTypes": {
|
118
|
+
"name": "support.type.numeric.futhark",
|
119
|
+
"match": "(?\u003c![#'])\\b(f32|f64|i16|i32|i64|i8|u16|u32|u64|u8)\\b(?![#'])"
|
120
|
+
},
|
121
|
+
"operator": {
|
122
|
+
"patterns": [
|
123
|
+
{
|
124
|
+
"name": "keyword.operator.futhark",
|
125
|
+
"match": "[-+*/%!\u003c\u003e=\u0026|@]+"
|
126
|
+
},
|
127
|
+
{
|
128
|
+
"name": "string.interpolated.quoted.backticks.futhark",
|
129
|
+
"match": "(`)[^`]*(`)",
|
130
|
+
"captures": {
|
131
|
+
"1": {
|
132
|
+
"name": "punctuation.definition.string.begin.futhark"
|
133
|
+
},
|
134
|
+
"2": {
|
135
|
+
"name": "punctuation.definition.string.end.futhark"
|
136
|
+
}
|
137
|
+
}
|
138
|
+
}
|
139
|
+
]
|
140
|
+
},
|
141
|
+
"var": {
|
142
|
+
"name": "variable.other.readwrite.futhark",
|
143
|
+
"match": "[_A-Za-z]['\\w]*"
|
144
|
+
}
|
145
|
+
}
|
146
|
+
}
|