github-linguist 5.0.5 → 5.0.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/grammars/hint.haskell.json +11 -5
- data/grammars/hint.message.haskell.json +11 -5
- data/grammars/hint.type.haskell.json +11 -5
- data/grammars/source.SASLog.json +1 -1
- data/grammars/source.clarion.json +1 -1
- data/grammars/source.clean.json +4 -4
- data/grammars/source.click.json +19 -8
- data/grammars/source.clojure.json +8 -6
- data/grammars/source.cobol.json +16 -23
- data/grammars/source.coffee.json +1 -1
- data/grammars/source.csound-document.json +0 -5
- data/grammars/source.csound-score.json +6 -2
- data/grammars/source.csound.json +77 -14
- data/grammars/source.css.less.json +1 -1
- data/grammars/source.ditroff.desc.json +379 -0
- data/grammars/source.ditroff.json +545 -0
- data/grammars/source.elixir.json +44 -2
- data/grammars/source.fsharp.json +20 -93
- data/grammars/source.haskell.json +13 -6
- data/grammars/source.hlsl.json +217 -0
- data/grammars/source.js.json +34 -16
- data/grammars/source.julia.json +4 -4
- data/grammars/source.meson.json +167 -0
- data/grammars/source.p4.json +117 -0
- data/grammars/source.perl6fe.json +101 -18
- data/grammars/source.python.json +7 -7
- data/grammars/source.quoting.perl6fe.json +101 -0
- data/grammars/source.regexp.extended.json +9 -5
- data/grammars/source.regexp.json +12 -21
- data/grammars/source.rust.json +33 -3
- data/grammars/source.sas.json +2 -2
- data/grammars/source.shaderlab.json +174 -0
- data/grammars/source.terraform.json +196 -0
- data/grammars/source.turing.json +1 -1
- data/grammars/source.viml.json +1 -1
- data/grammars/source.yaml.json +3 -1
- data/grammars/text.html.php.blade.json +10 -7
- data/grammars/text.restructuredtext.json +57 -6
- data/grammars/text.roff.json +1 -1
- data/grammars/text.slim.json +1 -1
- data/grammars/text.tex.latex.haskell.json +11 -5
- data/lib/linguist/documentation.yml +1 -1
- data/lib/linguist/heuristics.rb +8 -0
- data/lib/linguist/languages.json +1 -1
- data/lib/linguist/languages.yml +20 -2
- data/lib/linguist/samples.json +1253 -68
- data/lib/linguist/version.rb +1 -1
- metadata +9 -3
- data/grammars/source.regexp.comment.json +0 -11
data/grammars/source.elixir.json
CHANGED
@@ -114,6 +114,48 @@
|
|
114
114
|
}
|
115
115
|
]
|
116
116
|
},
|
117
|
+
{
|
118
|
+
"begin": "^\\s*(defprotocol)\\b",
|
119
|
+
"beginCaptures": {
|
120
|
+
"1": {
|
121
|
+
"name": "keyword.control.protocol.elixir"
|
122
|
+
}
|
123
|
+
},
|
124
|
+
"end": "\\b(do)\\b",
|
125
|
+
"endCaptures": {
|
126
|
+
"1": {
|
127
|
+
"name": "keyword.control.protocol.elixir"
|
128
|
+
}
|
129
|
+
},
|
130
|
+
"name": "meta.protocol_declaration.elixir",
|
131
|
+
"patterns": [
|
132
|
+
{
|
133
|
+
"match": "\\b[A-Z]\\w*\\b",
|
134
|
+
"name": "entity.name.protocol.elixir"
|
135
|
+
}
|
136
|
+
]
|
137
|
+
},
|
138
|
+
{
|
139
|
+
"begin": "^\\s*(defimpl)\\b",
|
140
|
+
"beginCaptures": {
|
141
|
+
"1": {
|
142
|
+
"name": "keyword.control.protocol.elixir"
|
143
|
+
}
|
144
|
+
},
|
145
|
+
"end": "\\b(do)\\b",
|
146
|
+
"endCaptures": {
|
147
|
+
"1": {
|
148
|
+
"name": "keyword.control.protocol.elixir"
|
149
|
+
}
|
150
|
+
},
|
151
|
+
"name": "meta.protocol_implementation.elixir",
|
152
|
+
"patterns": [
|
153
|
+
{
|
154
|
+
"match": "\\b[A-Z]\\w*\\b",
|
155
|
+
"name": "entity.name.protocol.elixir"
|
156
|
+
}
|
157
|
+
]
|
158
|
+
},
|
117
159
|
{
|
118
160
|
"begin": "^\\s*(def|defmacro)\\s+((?>[a-zA-Z_]\\w*(?>\\.|::))?(?>[a-zA-Z_]\\w*(?>[?!]|=(?!>))?|===?|>[>=]?|<=>|<[<=]?|[%&`/\\|]|\\*\\*?|=?~|[-+]@?|\\[\\]=?))((\\()|\\s*)",
|
119
161
|
"beginCaptures": {
|
@@ -148,7 +190,7 @@
|
|
148
190
|
"name": "keyword.operator.other.elixir"
|
149
191
|
}
|
150
192
|
},
|
151
|
-
"end": "
|
193
|
+
"end": ",|\\)|$",
|
152
194
|
"patterns": [
|
153
195
|
{
|
154
196
|
"include": "$self"
|
@@ -216,7 +258,7 @@
|
|
216
258
|
"name": "keyword.operator.other.elixir"
|
217
259
|
}
|
218
260
|
},
|
219
|
-
"end": "
|
261
|
+
"end": ",|\\)|$",
|
220
262
|
"patterns": [
|
221
263
|
{
|
222
264
|
"include": "$self"
|
data/grammars/source.fsharp.json
CHANGED
@@ -59,7 +59,7 @@
|
|
59
59
|
{
|
60
60
|
"name": "function.anonymous",
|
61
61
|
"begin": "\\b(fun)\\b",
|
62
|
-
"end": "(->)",
|
62
|
+
"end": "[(->)\\n]",
|
63
63
|
"beginCaptures": {
|
64
64
|
"1": {
|
65
65
|
"name": "keyword.other.function-definition.fsharp"
|
@@ -139,7 +139,7 @@
|
|
139
139
|
"patterns": [
|
140
140
|
{
|
141
141
|
"name": "binding.fsharp",
|
142
|
-
"begin": "(val mutable|val|let mutable|let|member|static member|override|let!)(\\s+rec|mutable)?(\\s+private|internal|public)?\\s+(\\([^\\s-]*\\)|[
|
142
|
+
"begin": "\\b(val mutable|val|let mutable|let inline|let|member|static member|override|let!)(\\s+rec|mutable)?(\\s+private|internal|public)?\\s+(\\([^\\s-]*\\)|[_[:alpha:]]([_[:alpha:]0-9,\\.]|(?<=,)\\s)*)",
|
143
143
|
"end": "((``.*``)|(with)|=|$)",
|
144
144
|
"beginCaptures": {
|
145
145
|
"1": {
|
@@ -178,7 +178,7 @@
|
|
178
178
|
"patterns": [
|
179
179
|
{
|
180
180
|
"name": "keyword.other.fsharp",
|
181
|
-
"match": "\\b(function|yield!|yield|class|match|delegate|of|new|in|as|if|then|else|elif|for|begin|end|inherit|do|let\\!|return\\!|return|interface|with|member|try|finally|and|when|use|use
|
181
|
+
"match": "\\b(function|yield!|yield|class|match|delegate|of|new|in|as|if|then|else|elif|for|begin|end|inherit|do|let\\!|return\\!|return|interface|with|abstract|member|try|finally|and|when|use|use\\!|struct|while)\\b"
|
182
182
|
},
|
183
183
|
{
|
184
184
|
"name": "meta.preprocessor.fsharp",
|
@@ -195,7 +195,7 @@
|
|
195
195
|
"patterns": [
|
196
196
|
{
|
197
197
|
"name": "entity.name.section.fsharp",
|
198
|
-
"begin": "\\b(namespace|module)(\\s+public|internal|private)?\\s+([
|
198
|
+
"begin": "\\b(namespace|module)(\\s+public|internal|private)?\\s+([[:alpha:]][[:alpha:]0-9'_. ]*)",
|
199
199
|
"end": "(\\s|$)",
|
200
200
|
"beginCaptures": {
|
201
201
|
"1": {
|
@@ -211,7 +211,7 @@
|
|
211
211
|
"patterns": [
|
212
212
|
{
|
213
213
|
"name": "entity.name.section.fsharp",
|
214
|
-
"match": "(\\.)([A-Z][
|
214
|
+
"match": "(\\.)([A-Z][[:alpha:]0-9'_]*)",
|
215
215
|
"captures": {
|
216
216
|
"1": {
|
217
217
|
"name": "punctuation.separator.namespace-reference.fsharp"
|
@@ -225,7 +225,7 @@
|
|
225
225
|
},
|
226
226
|
{
|
227
227
|
"name": "namespace.open.fsharp",
|
228
|
-
"begin": "\\b(open)\\s+([
|
228
|
+
"begin": "\\b(open)\\s+([[:alpha:]][[:alpha:]0-9'_]*)(?=(\\.[A-Z][[:alpha:]0-9_]*)*)",
|
229
229
|
"end": "(\\s|$)",
|
230
230
|
"beginCaptures": {
|
231
231
|
"1": {
|
@@ -238,7 +238,7 @@
|
|
238
238
|
"patterns": [
|
239
239
|
{
|
240
240
|
"name": "entity.name.section.fsharp",
|
241
|
-
"match": "(\\.)([
|
241
|
+
"match": "(\\.)([[:alpha:]][[:alpha:]0-9'_]*)",
|
242
242
|
"captures": {
|
243
243
|
"1": {
|
244
244
|
"name": "punctuation.separator.namespace-reference.fsharp"
|
@@ -252,7 +252,7 @@
|
|
252
252
|
},
|
253
253
|
{
|
254
254
|
"name": "namespace.alias.fsharp",
|
255
|
-
"begin": "^\\s*(module)\\s+([A-Z][
|
255
|
+
"begin": "^\\s*(module)\\s+([A-Z][[:alpha:]0-9'_]*)\\s*(=)\\s*([A-Z][[:alpha:]0-9'_]*)",
|
256
256
|
"end": "(\\s|$)",
|
257
257
|
"beginCaptures": {
|
258
258
|
"1": {
|
@@ -271,7 +271,7 @@
|
|
271
271
|
"patterns": [
|
272
272
|
{
|
273
273
|
"name": "entity.name.section.fsharp",
|
274
|
-
"match": "(\\.)([A-Z][
|
274
|
+
"match": "(\\.)([A-Z][[:alpha:]0-9'_]*)",
|
275
275
|
"captures": {
|
276
276
|
"1": {
|
277
277
|
"name": "punctuation.separator.namespace-reference.fsharp"
|
@@ -287,31 +287,6 @@
|
|
287
287
|
},
|
288
288
|
"strings": {
|
289
289
|
"patterns": [
|
290
|
-
{
|
291
|
-
"contentName": "string.quoted.literalprintf.fsharp",
|
292
|
-
"begin": "(sprintf|printf[n]|failwithf)\\s+((?=[^\\\\])(@\"))",
|
293
|
-
"end": "(\")",
|
294
|
-
"beginCaptures": {
|
295
|
-
"2": {
|
296
|
-
"name": "punctuation.definition.string.begin.fsharp"
|
297
|
-
}
|
298
|
-
},
|
299
|
-
"endCaptures": {
|
300
|
-
"1": {
|
301
|
-
"name": "punctuation.definition.string.end.fsharp"
|
302
|
-
}
|
303
|
-
},
|
304
|
-
"patterns": [
|
305
|
-
{
|
306
|
-
"name": "constant.character.string.escape.fsharp",
|
307
|
-
"match": "\"(\")"
|
308
|
-
},
|
309
|
-
{
|
310
|
-
"name": "constant.character.string.escape.format.fsharp",
|
311
|
-
"match": "%[0\\-\\+# ]{0,3}(\\*|[0-9]{0,2})(\\.[0-9]{1,2})?([bcsdiuxXoeEfFgGMOAt]|\\+A)"
|
312
|
-
}
|
313
|
-
]
|
314
|
-
},
|
315
290
|
{
|
316
291
|
"name": "string.quoted.literal.fsharp",
|
317
292
|
"begin": "(?=[^\\\\])(@\")",
|
@@ -333,27 +308,6 @@
|
|
333
308
|
}
|
334
309
|
]
|
335
310
|
},
|
336
|
-
{
|
337
|
-
"contentName": "string.quoted.tripleprintf.fsharp",
|
338
|
-
"begin": "(sprintf|printf[n]|failwithf)\\s+((?=[^\\\\])(\"\"\"))",
|
339
|
-
"end": "(\"\"\")",
|
340
|
-
"beginCaptures": {
|
341
|
-
"2": {
|
342
|
-
"name": "punctuation.definition.string.begin.fsharp"
|
343
|
-
}
|
344
|
-
},
|
345
|
-
"endCaptures": {
|
346
|
-
"1": {
|
347
|
-
"name": "punctuation.definition.string.end.fsharp"
|
348
|
-
}
|
349
|
-
},
|
350
|
-
"patterns": [
|
351
|
-
{
|
352
|
-
"name": "constant.character.string.escape.format.fsharp",
|
353
|
-
"match": "%[0\\-\\+# ]{0,3}(\\*|[0-9]{0,2})(\\.[0-9]{1,2})?([bcsdiuxXoeEfFgGMOAt]|\\+A)"
|
354
|
-
}
|
355
|
-
]
|
356
|
-
},
|
357
311
|
{
|
358
312
|
"name": "string.quoted.triple.fsharp",
|
359
313
|
"begin": "(?=[^\\\\])(\"\"\")",
|
@@ -369,39 +323,6 @@
|
|
369
323
|
}
|
370
324
|
}
|
371
325
|
},
|
372
|
-
{
|
373
|
-
"contentName": "string.quoted.doubleprintf.fsharp",
|
374
|
-
"begin": "(sprintf|printf[n]|failwithf)\\s+((?=[^\\\\])(\"))",
|
375
|
-
"end": "(\")",
|
376
|
-
"beginCaptures": {
|
377
|
-
"2": {
|
378
|
-
"name": "punctuation.definition.string.begin.fsharp"
|
379
|
-
}
|
380
|
-
},
|
381
|
-
"endCaptures": {
|
382
|
-
"1": {
|
383
|
-
"name": "punctuation.definition.string.end.fsharp"
|
384
|
-
}
|
385
|
-
},
|
386
|
-
"patterns": [
|
387
|
-
{
|
388
|
-
"name": "punctuation.separator.string.ignore-eol.fsharp",
|
389
|
-
"match": "\\\\$[ \\t]*"
|
390
|
-
},
|
391
|
-
{
|
392
|
-
"name": "constant.character.string.escape.format.fsharp",
|
393
|
-
"match": "%[0\\-\\+# ]{0,3}(\\*|[0-9]{0,2})(\\.[0-9]{1,2})?([bcsdiuxXoeEfFgGMOAt]|\\+A)"
|
394
|
-
},
|
395
|
-
{
|
396
|
-
"name": "constant.character.string.escape.fsharp",
|
397
|
-
"match": "\\\\([\\\\''ntbr]|u[a-fA-F0-9]{4}|u[a-fA-F0-9]{8})"
|
398
|
-
},
|
399
|
-
{
|
400
|
-
"name": "invalid.illeagal.character.string.fsharp",
|
401
|
-
"match": "\\\\(?![\\\\''ntbr]|u[a-fA-F0-9]{4}|u[a-fA-F0-9]{8})."
|
402
|
-
}
|
403
|
-
]
|
404
|
-
},
|
405
326
|
{
|
406
327
|
"name": "string.quoted.double.fsharp",
|
407
328
|
"begin": "(?=[^\\\\])(\")",
|
@@ -441,7 +362,7 @@
|
|
441
362
|
},
|
442
363
|
{
|
443
364
|
"name": "variable.parameter.fsharp",
|
444
|
-
"match": "[
|
365
|
+
"match": "[[:alpha:]']\\w*"
|
445
366
|
}
|
446
367
|
]
|
447
368
|
},
|
@@ -468,7 +389,7 @@
|
|
468
389
|
"patterns": [
|
469
390
|
{
|
470
391
|
"name": "record.fsharp",
|
471
|
-
"match": "(type)[\\s]+(private|internal|public)?[\\s]*([
|
392
|
+
"match": "(type)[\\s]+(private|internal|public)?[\\s]*([[:alpha:]0-9'<>^:,. ]+)[\\s]*(\\([[:alpha:]0-9'<>^:,. ]+\\))?[\\s]*((with)|(as [[:alpha:]0-9']+)|(=)|(\\(\\)))",
|
472
393
|
"captures": {
|
473
394
|
"1": {
|
474
395
|
"name": "keyword.other.fsharp"
|
@@ -479,13 +400,19 @@
|
|
479
400
|
"3": {
|
480
401
|
"name": "entity.name.type.fsharp"
|
481
402
|
},
|
482
|
-
"
|
483
|
-
"name": "
|
403
|
+
"4": {
|
404
|
+
"name": "entity.name.type.fsharp"
|
484
405
|
},
|
485
406
|
"6": {
|
486
407
|
"name": "keyword.other.fsharp"
|
487
408
|
},
|
488
409
|
"7": {
|
410
|
+
"name": "keyword.other.fsharp"
|
411
|
+
},
|
412
|
+
"8": {
|
413
|
+
"name": "keyword.other.fsharp"
|
414
|
+
},
|
415
|
+
"9": {
|
489
416
|
"name": "constant.language.unit.fsharp"
|
490
417
|
}
|
491
418
|
}
|
@@ -496,7 +423,7 @@
|
|
496
423
|
"patterns": [
|
497
424
|
{
|
498
425
|
"name": "cexpr.fsharp",
|
499
|
-
"match": "\\b([
|
426
|
+
"match": "\\b([[:alpha:]]*\\s+\\{)",
|
500
427
|
"captures": {
|
501
428
|
"1": {
|
502
429
|
"name": "keyword.other.fsharp"
|
@@ -1,6 +1,7 @@
|
|
1
1
|
{
|
2
2
|
"fileTypes": [
|
3
|
-
"hs"
|
3
|
+
"hs",
|
4
|
+
"cpphs"
|
4
5
|
],
|
5
6
|
"firstLineMatch": "^\\#\\!.*\\brunhaskell\\b",
|
6
7
|
"name": "Haskell",
|
@@ -619,6 +620,9 @@
|
|
619
620
|
},
|
620
621
|
{
|
621
622
|
"include": "#haskell_expr"
|
623
|
+
},
|
624
|
+
{
|
625
|
+
"include": "#comments"
|
622
626
|
}
|
623
627
|
]
|
624
628
|
}
|
@@ -649,6 +653,9 @@
|
|
649
653
|
"name": "keyword.other.haskell"
|
650
654
|
}
|
651
655
|
}
|
656
|
+
},
|
657
|
+
{
|
658
|
+
"include": "#comments"
|
652
659
|
}
|
653
660
|
]
|
654
661
|
}
|
@@ -798,7 +805,7 @@
|
|
798
805
|
},
|
799
806
|
{
|
800
807
|
"name": "keyword.control.haskell",
|
801
|
-
"match": "(?:(?=[\\p{Ll}_\\p{Lu}\\p{Lt}])(?<![\\p{Ll}_\\p{Lu}\\p{Lt}']))(do|if|then|else|case|of|let|in|default)(?:(?<=[\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}'])(?![\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']))"
|
808
|
+
"match": "(?:(?=[\\p{Ll}_\\p{Lu}\\p{Lt}])(?<![\\p{Ll}_\\p{Lu}\\p{Lt}']))(do|if|then|else|case|of|let|in|default|mdo|rec|proc)(?:(?<=[\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}'])(?![\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']))"
|
802
809
|
}
|
803
810
|
]
|
804
811
|
},
|
@@ -1007,7 +1014,7 @@
|
|
1007
1014
|
"include": "#module_name_prefix"
|
1008
1015
|
},
|
1009
1016
|
{
|
1010
|
-
"name": "support.function.prelude.haskell",
|
1017
|
+
"name": "support.function.prelude.$1.haskell",
|
1011
1018
|
"match": "(?:(?=[\\p{Ll}_\\p{Lu}\\p{Lt}])(?<![\\p{Ll}_\\p{Lu}\\p{Lt}']))(abs|acos|acosh|all|and|any|appendFile|asTypeOf|asin|asinh|atan|atan2|atanh|break|ceiling|compare|concat|concatMap|const|cos|cosh|curry|cycle|decodeFloat|div|divMod|drop|dropWhile|either|elem|encodeFloat|enumFrom|enumFromThen|enumFromThenTo|enumFromTo|error|even|exp|exponent|fail|filter|flip|floatDigits|floatRadix|floatRange|floor|fmap|foldMap|foldl|foldl1|foldr|foldr1|fromEnum|fromInteger|fromIntegral|fromRational|fst|gcd|getChar|getContents|getLine|head|id|init|interact|ioError|isDenormalized|isIEEE|isInfinite|isNaN|isNegativeZero|iterate|last|lcm|length|lex|lines|log|logBase|lookup|map|mapM|mapM_|mappend|max|maxBound|maximum|maybe|mconcat|mempty|min|minBound|minimum|mod|negate|not|notElem|null|odd|or|otherwise|pi|pred|print|product|properFraction|pure|putChar|putStr|putStrLn|quot|quotRem|read|readFile|readIO|readList|readLn|readParen|reads|readsPrec|realToFrac|recip|rem|repeat|replicate|return|reverse|round|scaleFloat|scanl|scanl1|scanr|scanr1|seq|sequence|sequenceA|sequence_|show|showChar|showList|showParen|showString|shows|showsPrec|significand|signum|sin|sinh|snd|span|splitAt|sqrt|subtract|succ|sum|tail|take|takeWhile|tan|tanh|toEnum|toInteger|toRational|traverse|truncate|uncurry|undefined|unlines|until|unwords|unzip|unzip3|userError|words|writeFile|zip|zip3|zipWith|zipWith3)(?:(?<=[\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}'])(?![\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']))"
|
1012
1019
|
}
|
1013
1020
|
]
|
@@ -1028,11 +1035,11 @@
|
|
1028
1035
|
"include": "#module_name_prefix"
|
1029
1036
|
},
|
1030
1037
|
{
|
1031
|
-
"name": "entity.other.inherited-class.prelude.haskell",
|
1038
|
+
"name": "entity.other.inherited-class.prelude.$1.haskell",
|
1032
1039
|
"match": "(?:(?=[\\p{Ll}_\\p{Lu}\\p{Lt}])(?<![\\p{Ll}_\\p{Lu}\\p{Lt}']))(Applicative|Bounded|Enum|Eq|Floating|Foldable|Fractional|Functor|Integral|Monad|Monoid|Num|Ord|Read|Real|RealFloat|RealFrac|Show|Traversable)(?:(?<=[\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}'])(?![\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']))"
|
1033
1040
|
},
|
1034
1041
|
{
|
1035
|
-
"name": "support.class.prelude.haskell",
|
1042
|
+
"name": "support.class.prelude.$1.haskell",
|
1036
1043
|
"match": "(?:(?=[\\p{Ll}_\\p{Lu}\\p{Lt}])(?<![\\p{Ll}_\\p{Lu}\\p{Lt}']))(Either|FilePath|IO|IOError|Integer|Maybe|Ordering|Rational|ReadS|ShowS|String|Bool|Char|Double|Float|Int|Word)(?:(?<=[\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}'])(?![\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']))"
|
1037
1044
|
}
|
1038
1045
|
]
|
@@ -1053,7 +1060,7 @@
|
|
1053
1060
|
"include": "#module_name_prefix"
|
1054
1061
|
},
|
1055
1062
|
{
|
1056
|
-
"name": "support.tag.prelude.haskell",
|
1063
|
+
"name": "support.tag.prelude.$1.haskell",
|
1057
1064
|
"match": "(?:(?=[\\p{Ll}_\\p{Lu}\\p{Lt}])(?<![\\p{Ll}_\\p{Lu}\\p{Lt}']))(EQ|GT|Just|LT|Left|Nothing|Right|True|False)(?:(?<=[\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}'])(?![\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']))"
|
1058
1065
|
}
|
1059
1066
|
]
|
@@ -0,0 +1,217 @@
|
|
1
|
+
{
|
2
|
+
"scopeName": "source.hlsl",
|
3
|
+
"name": "HLSL",
|
4
|
+
"fileTypes": [
|
5
|
+
"hlsl",
|
6
|
+
"hlsli",
|
7
|
+
"fx",
|
8
|
+
"fxh",
|
9
|
+
"vsh",
|
10
|
+
"psh",
|
11
|
+
"cginc",
|
12
|
+
"compute"
|
13
|
+
],
|
14
|
+
"patterns": [
|
15
|
+
{
|
16
|
+
"name": "comment.line.block.hlsl",
|
17
|
+
"begin": "/\\*",
|
18
|
+
"end": "\\*/"
|
19
|
+
},
|
20
|
+
{
|
21
|
+
"name": "comment.line.double-slash.hlsl",
|
22
|
+
"begin": "//",
|
23
|
+
"end": "$"
|
24
|
+
},
|
25
|
+
{
|
26
|
+
"name": "constant.numeric.hlsl",
|
27
|
+
"match": "\\b([0-9]+\\.?[0-9]*)\\b"
|
28
|
+
},
|
29
|
+
{
|
30
|
+
"name": "constant.numeric.hlsl",
|
31
|
+
"match": "\\b(\\.[0-9]+)\\b"
|
32
|
+
},
|
33
|
+
{
|
34
|
+
"name": "constant.numeric.hex.hlsl",
|
35
|
+
"match": "\\b(0x[0-9A-F]+)\\b"
|
36
|
+
},
|
37
|
+
{
|
38
|
+
"name": "constant.language.hlsl",
|
39
|
+
"match": "\\b(false|true)\\b"
|
40
|
+
},
|
41
|
+
{
|
42
|
+
"name": "keyword.preprocessor.hlsl",
|
43
|
+
"match": "^\\s*#\\s*(define|elif|else|endif|ifdef|ifndef|if|undef|include|line|error|pragma)"
|
44
|
+
},
|
45
|
+
{
|
46
|
+
"name": "keyword.control.hlsl",
|
47
|
+
"match": "\\b(break|case|continue|default|discard|do|else|for|if|return|switch|while)\\b"
|
48
|
+
},
|
49
|
+
{
|
50
|
+
"name": "keyword.control.fx.hlsl",
|
51
|
+
"match": "\\b(compile)\\b"
|
52
|
+
},
|
53
|
+
{
|
54
|
+
"name": "keyword.typealias.hlsl",
|
55
|
+
"match": "\\b(typedef)\\b"
|
56
|
+
},
|
57
|
+
{
|
58
|
+
"name": "storage.type.basic.hlsl",
|
59
|
+
"match": "\\b(bool([1-4](x[1-4])?)?|double([1-4](x[1-4])?)?|dword|float([1-4](x[1-4])?)?|half([1-4](x[1-4])?)?|int([1-4](x[1-4])?)?|matrix|min10float([1-4](x[1-4])?)?|min12int([1-4](x[1-4])?)?|min16float([1-4](x[1-4])?)?|min16int([1-4](x[1-4])?)?|min16uint([1-4](x[1-4])?)?|unsigned|uint([1-4](x[1-4])?)?|vector|void)\\b"
|
60
|
+
},
|
61
|
+
{
|
62
|
+
"name": "support.function.hlsl",
|
63
|
+
"match": "\\b([a-zA-Z_][a-zA-Z0-9_]*)(?=[\\s]*\\()"
|
64
|
+
},
|
65
|
+
{
|
66
|
+
"name": "support.variable.semantic.hlsl",
|
67
|
+
"match": "(?<=\\:\\s|\\:)(?i:BINORMAL[0-9]*|BLENDINDICES[0-9]*|BLENDWEIGHT[0-9]*|COLOR[0-9]*|NORMAL[0-9]*|POSITIONT|POSITION|PSIZE[0-9]*|TANGENT[0-9]*|TEXCOORD[0-9]*|FOG|TESSFACTOR[0-9]*|VFACE|VPOS|DEPTH[0-9]*)\\b"
|
68
|
+
},
|
69
|
+
{
|
70
|
+
"name": "support.variable.semantic.sm4.hlsl",
|
71
|
+
"match": "(?<=\\:\\s|\\:)(?i:SV_ClipDistance[0-9]*|SV_CullDistance[0-9]*|SV_Coverage|SV_Depth|SV_DepthGreaterEqual[0-9]*|SV_DepthLessEqual[0-9]*|SV_InstanceID|SV_IsFrontFace|SV_Position|SV_RenderTargetArrayIndex|SV_SampleIndex|SV_StencilRef|SV_Target[0-7]?|SV_VertexID|SV_ViewportArrayIndex)\\b"
|
72
|
+
},
|
73
|
+
{
|
74
|
+
"name": "support.variable.semantic.sm5.hlsl",
|
75
|
+
"match": "(?<=\\:\\s|\\:)(?i:SV_DispatchThreadID|SV_DomainLocation|SV_GroupID|SV_GroupIndex|SV_GroupThreadID|SV_GSInstanceID|SV_InsideTessFactor|SV_OutputControlPointID|SV_TessFactor)\\b"
|
76
|
+
},
|
77
|
+
{
|
78
|
+
"name": "support.variable.semantic.sm5_1.hlsl",
|
79
|
+
"match": "(?<=\\:\\s|\\:)(?i:SV_InnerCoverage|SV_StencilRef)\\b"
|
80
|
+
},
|
81
|
+
{
|
82
|
+
"name": "storage.modifier.hlsl",
|
83
|
+
"match": "\\b(column_major|const|export|extern|globallycoherent|groupshared|inline|inout|in|out|precise|row_major|shared|static|uniform|volatile)\\b"
|
84
|
+
},
|
85
|
+
{
|
86
|
+
"name": "storage.modifier.float.hlsl",
|
87
|
+
"match": "\\b(snorm|unorm)\\b"
|
88
|
+
},
|
89
|
+
{
|
90
|
+
"name": "storage.modifier.postfix.hlsl",
|
91
|
+
"match": "\\b(packoffset|register)\\b"
|
92
|
+
},
|
93
|
+
{
|
94
|
+
"name": "storage.modifier.interpolation.hlsl",
|
95
|
+
"match": "\\b(centroid|linear|nointerpolation|noperspective|sample)\\b"
|
96
|
+
},
|
97
|
+
{
|
98
|
+
"name": "storage.modifier.geometryshader.hlsl",
|
99
|
+
"match": "\\b(lineadj|line|point|triangle|triangleadj)\\b"
|
100
|
+
},
|
101
|
+
{
|
102
|
+
"name": "support.type.other.hlsl",
|
103
|
+
"match": "\\b(string)\\b"
|
104
|
+
},
|
105
|
+
{
|
106
|
+
"name": "support.type.object.hlsl",
|
107
|
+
"match": "\\b(AppendStructuredBuffer|Buffer|ByteAddressBuffer|ConstantBuffer|ConsumeStructuredBuffer|InputPatch|OutputPatch)\\b"
|
108
|
+
},
|
109
|
+
{
|
110
|
+
"name": "support.type.object.rasterizerordered.hlsl",
|
111
|
+
"match": "\\b(RasterizerOrderedBuffer|RasterizerOrderedByteAddressBuffer|RasterizerOrderedStructuredBuffer|RasterizerOrderedTexture1D|RasterizerOrderedTexture1DArray|RasterizerOrderedTexture2D|RasterizerOrderedTexture2DArray|RasterizerOrderedTexture3D)\\b"
|
112
|
+
},
|
113
|
+
{
|
114
|
+
"name": "support.type.object.rw.hlsl",
|
115
|
+
"match": "\\b(RWBuffer|RWByteAddressBuffer|RWStructuredBuffer|RWTexture1D|RWTexture1DArray|RWTexture2D|RWTexture2DArray|RWTexture3D)\\b"
|
116
|
+
},
|
117
|
+
{
|
118
|
+
"name": "support.type.object.geometryshader.hlsl",
|
119
|
+
"match": "\\b(LineStream|PointStream|TriangleStream)\\b"
|
120
|
+
},
|
121
|
+
{
|
122
|
+
"name": "support.type.sampler.legacy.hlsl",
|
123
|
+
"match": "\\b(sampler|sampler1D|sampler2D|sampler3D|samplerCUBE|sampler_state)\\b"
|
124
|
+
},
|
125
|
+
{
|
126
|
+
"name": "support.type.sampler.hlsl",
|
127
|
+
"match": "\\b(SamplerState|SamplerComparisonState)\\b"
|
128
|
+
},
|
129
|
+
{
|
130
|
+
"name": "support.type.texture.legacy.hlsl",
|
131
|
+
"match": "\\b(texture2D|textureCUBE)\\b"
|
132
|
+
},
|
133
|
+
{
|
134
|
+
"name": "support.type.texture.hlsl",
|
135
|
+
"match": "\\b(Texture1D|Texture1DArray|Texture2D|Texture2DArray|Texture2DMS|Texture2DMSArray|Texture3D|TextureCube|TextureCubeArray)\\b"
|
136
|
+
},
|
137
|
+
{
|
138
|
+
"name": "storage.type.structured.hlsl",
|
139
|
+
"match": "\\b(cbuffer|class|interface|namespace|struct|tbuffer)\\b"
|
140
|
+
},
|
141
|
+
{
|
142
|
+
"name": "support.constant.property-value.fx.hlsl",
|
143
|
+
"match": "\\b(FALSE|TRUE|NULL)\\b"
|
144
|
+
},
|
145
|
+
{
|
146
|
+
"name": "support.type.fx.hlsl",
|
147
|
+
"match": "\\b(BlendState|DepthStencilState|RasterizerState)\\b"
|
148
|
+
},
|
149
|
+
{
|
150
|
+
"name": "storage.type.fx.technique.hlsl",
|
151
|
+
"match": "\\b(technique|Technique|technique10|technique11|pass)\\b"
|
152
|
+
},
|
153
|
+
{
|
154
|
+
"name": "meta.object-literal.key.fx.blendstate.hlsl",
|
155
|
+
"match": "\\b(AlphaToCoverageEnable|BlendEnable|SrcBlend|DestBlend|BlendOp|SrcBlendAlpha|DestBlendAlpha|BlendOpAlpha|RenderTargetWriteMask)\\b"
|
156
|
+
},
|
157
|
+
{
|
158
|
+
"name": "meta.object-literal.key.fx.depthstencilstate.hlsl",
|
159
|
+
"match": "\\b(DepthEnable|DepthWriteMask|DepthFunc|StencilEnable|StencilReadMask|StencilWriteMask|FrontFaceStencilFail|FrontFaceStencilZFail|FrontFaceStencilPass|FrontFaceStencilFunc|BackFaceStencilFail|BackFaceStencilZFail|BackFaceStencilPass|BackFaceStencilFunc)\\b"
|
160
|
+
},
|
161
|
+
{
|
162
|
+
"name": "meta.object-literal.key.fx.rasterizerstate.hlsl",
|
163
|
+
"match": "\\b(FillMode|CullMode|FrontCounterClockwise|DepthBias|DepthBiasClamp|SlopeScaleDepthBias|ZClipEnable|ScissorEnable|MultiSampleEnable|AntiAliasedLineEnable)\\b"
|
164
|
+
},
|
165
|
+
{
|
166
|
+
"name": "meta.object-literal.key.fx.samplerstate.hlsl",
|
167
|
+
"match": "\\b(Filter|AddressU|AddressV|AddressW|MipLODBias|MaxAnisotropy|ComparisonFunc|BorderColor|MinLOD|MaxLOD)\\b"
|
168
|
+
},
|
169
|
+
{
|
170
|
+
"name": "support.constant.property-value.fx.blend.hlsl",
|
171
|
+
"match": "\\b(?i:ZERO|ONE|SRC_COLOR|INV_SRC_COLOR|SRC_ALPHA|INV_SRC_ALPHA|DEST_ALPHA|INV_DEST_ALPHA|DEST_COLOR|INV_DEST_COLOR|SRC_ALPHA_SAT|BLEND_FACTOR|INV_BLEND_FACTOR|SRC1_COLOR|INV_SRC1_COLOR|SRC1_ALPHA|INV_SRC1_ALPHA)\\b"
|
172
|
+
},
|
173
|
+
{
|
174
|
+
"name": "support.constant.property-value.fx.blendop.hlsl",
|
175
|
+
"match": "\\b(?i:ADD|SUBTRACT|REV_SUBTRACT|MIN|MAX)\\b"
|
176
|
+
},
|
177
|
+
{
|
178
|
+
"name": "support.constant.property-value.fx.depthwritemask.hlsl",
|
179
|
+
"match": "\\b(?i:ALL)\\b"
|
180
|
+
},
|
181
|
+
{
|
182
|
+
"name": "support.constant.property-value.fx.comparisonfunc.hlsl",
|
183
|
+
"match": "\\b(?i:NEVER|LESS|EQUAL|LESS_EQUAL|GREATER|NOT_EQUAL|GREATER_EQUAL|ALWAYS)\\b"
|
184
|
+
},
|
185
|
+
{
|
186
|
+
"name": "support.constant.property-value.fx.stencilop.hlsl",
|
187
|
+
"match": "\\b(?i:KEEP|REPLACE|INCR_SAT|DECR_SAT|INVERT|INCR|DECR)\\b"
|
188
|
+
},
|
189
|
+
{
|
190
|
+
"name": "support.constant.property-value.fx.fillmode.hlsl",
|
191
|
+
"match": "\\b(?i:WIREFRAME|SOLID)\\b"
|
192
|
+
},
|
193
|
+
{
|
194
|
+
"name": "support.constant.property-value.fx.cullmode.hlsl",
|
195
|
+
"match": "\\b(?i:NONE|FRONT|BACK)\\b"
|
196
|
+
},
|
197
|
+
{
|
198
|
+
"name": "support.constant.property-value.fx.filter.hlsl",
|
199
|
+
"match": "\\b(?i:MIN_MAG_MIP_POINT|MIN_MAG_POINT_MIP_LINEAR|MIN_POINT_MAG_LINEAR_MIP_POINT|MIN_POINT_MAG_MIP_LINEAR|MIN_LINEAR_MAG_MIP_POINT|MIN_LINEAR_MAG_POINT_MIP_LINEAR|MIN_MAG_LINEAR_MIP_POINT|MIN_MAG_MIP_LINEAR|ANISOTROPIC|COMPARISON_MIN_MAG_MIP_POINT|COMPARISON_MIN_MAG_POINT_MIP_LINEAR|COMPARISON_MIN_POINT_MAG_LINEAR_MIP_POINT|COMPARISON_MIN_POINT_MAG_MIP_LINEAR|COMPARISON_MIN_LINEAR_MAG_MIP_POINT|COMPARISON_MIN_LINEAR_MAG_POINT_MIP_LINEAR|COMPARISON_MIN_MAG_LINEAR_MIP_POINT|COMPARISON_MIN_MAG_MIP_LINEAR|COMPARISON_ANISOTROPIC|TEXT_1BIT)\\b"
|
200
|
+
},
|
201
|
+
{
|
202
|
+
"name": "support.constant.property-value.fx.textureaddressmode.hlsl",
|
203
|
+
"match": "\\b(?i:WRAP|MIRROR|CLAMP|BORDER|MIRROR_ONCE)\\b"
|
204
|
+
},
|
205
|
+
{
|
206
|
+
"name": "string.quoted.double.hlsl",
|
207
|
+
"begin": "\"",
|
208
|
+
"end": "\"",
|
209
|
+
"patterns": [
|
210
|
+
{
|
211
|
+
"name": "constant.character.escape.hlsl",
|
212
|
+
"match": "\\\\."
|
213
|
+
}
|
214
|
+
]
|
215
|
+
}
|
216
|
+
]
|
217
|
+
}
|