github-linguist 7.5.1 → 7.6.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/grammars/annotation.liquidhaskell.haskell.json +122 -24
- data/grammars/etc.json +7 -0
- data/grammars/hint.haskell.json +122 -24
- data/grammars/hint.message.haskell.json +122 -24
- data/grammars/hint.type.haskell.json +122 -24
- data/grammars/injections.etc.json +48 -10
- data/grammars/source.abnf.json +180 -353
- data/grammars/source.ballerina.json +205 -50
- data/grammars/source.bnf.json +191 -0
- data/grammars/source.cabal.json +1 -1
- data/grammars/source.ditroff.desc.json +1 -1
- data/grammars/source.ebnf.json +157 -147
- data/grammars/source.editorconfig.json +30 -5
- data/grammars/source.emacs.lisp.json +4 -4
- data/grammars/source.gremlin.json +200 -0
- data/grammars/source.haproxy-config.json +65 -13
- data/grammars/source.haskell.json +122 -24
- data/grammars/source.hql.json +1 -1
- data/grammars/source.hsig.json +122 -24
- data/grammars/source.hx.json +5 -5
- data/grammars/source.hxml.json +4 -4
- data/grammars/source.ideal.json +4 -4
- data/grammars/source.igor.json +325 -0
- data/grammars/source.jlex.json +322 -0
- data/grammars/source.julia.json +132 -1
- data/grammars/source.lean.json +103 -54
- data/grammars/source.lex.json +232 -0
- data/grammars/source.lex.regexp.json +269 -0
- data/grammars/source.logos.json +1 -1
- data/grammars/source.meson.json +1 -1
- data/grammars/source.mlir.json +389 -0
- data/grammars/source.nanorc.json +3 -0
- data/grammars/source.pic.json +19 -19
- data/grammars/source.plist.json +336 -0
- data/grammars/source.powershell.json +2 -2
- data/grammars/source.purescript.json +2 -2
- data/grammars/source.rascal.json +1 -0
- data/grammars/source.regexp.extended.json +544 -6
- data/grammars/source.regexp.json +408 -31
- data/grammars/source.renpy.json +3 -1
- data/grammars/source.scala.json +199 -97
- data/grammars/source.smpl.json +314 -0
- data/grammars/source.solidity.json +1 -1
- data/grammars/source.sourcepawn.json +654 -0
- data/grammars/source.sqf.json +5 -1
- data/grammars/source.swift.json +56 -11
- data/grammars/source.sy.json +800 -0
- data/grammars/source.ts.json +64 -47
- data/grammars/source.tsx.json +65 -48
- data/grammars/source.v.json +1184 -0
- data/grammars/source.viml.json +31 -31
- data/grammars/source.wollok.json +1 -1
- data/grammars/source.xojo.json +2 -2
- data/grammars/source.yacc.json +626 -0
- data/grammars/source.yara.json +1 -1
- data/grammars/source.yasnippet.json +15 -25
- data/grammars/source.zeek.json +4 -4
- data/grammars/source.zig.json +594 -195
- data/grammars/text.eml.basic.json +19 -6
- data/grammars/text.html.php.blade.json +3 -3
- data/grammars/text.plain.json +18 -0
- data/grammars/text.roff.json +926 -437
- data/grammars/text.runoff.json +3 -3
- data/grammars/text.tex.latex.haskell.json +122 -24
- data/grammars/text.texinfo.json +1525 -0
- data/grammars/text.xml.plist.json +664 -0
- data/grammars/text.xml.svg.json +556 -0
- data/grammars/version +1 -1
- data/lib/linguist.rb +3 -1
- data/lib/linguist/VERSION +1 -1
- data/lib/linguist/generated.rb +62 -17
- data/lib/linguist/heuristics.yml +13 -0
- data/lib/linguist/language.rb +1 -11
- data/lib/linguist/languages.json +1 -1
- data/lib/linguist/languages.yml +179 -19
- data/lib/linguist/samples.json +2778 -732
- data/lib/linguist/strategy/manpage.rb +42 -0
- metadata +22 -5
- data/grammars/source.bison.json +0 -55
- data/grammars/source.sp.json +0 -113
@@ -0,0 +1,269 @@
|
|
1
|
+
{
|
2
|
+
"scopeName": "source.lex.regexp",
|
3
|
+
"patterns": [
|
4
|
+
{
|
5
|
+
"include": "#main"
|
6
|
+
}
|
7
|
+
],
|
8
|
+
"repository": {
|
9
|
+
"alternation": {
|
10
|
+
"name": "keyword.operator.logical.or.lex",
|
11
|
+
"match": "\\|"
|
12
|
+
},
|
13
|
+
"anchors": {
|
14
|
+
"patterns": [
|
15
|
+
{
|
16
|
+
"name": "keyword.control.anchor.line-start.lex",
|
17
|
+
"match": "\\^"
|
18
|
+
},
|
19
|
+
{
|
20
|
+
"name": "keyword.control.anchor.line-end.lex",
|
21
|
+
"match": "\\$"
|
22
|
+
},
|
23
|
+
{
|
24
|
+
"name": "keyword.control.anchor.eof.lex",
|
25
|
+
"match": "(\u003c\u003c)EOF(\u003e\u003e)",
|
26
|
+
"captures": {
|
27
|
+
"1": {
|
28
|
+
"name": "punctuation.definition.angle.bracket.begin.lex"
|
29
|
+
},
|
30
|
+
"2": {
|
31
|
+
"name": "punctuation.definition.angle.bracket.end.lex"
|
32
|
+
}
|
33
|
+
}
|
34
|
+
}
|
35
|
+
]
|
36
|
+
},
|
37
|
+
"class": {
|
38
|
+
"name": "meta.character-class.set.lex",
|
39
|
+
"begin": "(\\[)(\\^)?(-)?",
|
40
|
+
"end": "\\]",
|
41
|
+
"patterns": [
|
42
|
+
{
|
43
|
+
"include": "#escapes"
|
44
|
+
},
|
45
|
+
{
|
46
|
+
"include": "#expressions"
|
47
|
+
},
|
48
|
+
{
|
49
|
+
"name": "punctuation.separator.range.dash.lex",
|
50
|
+
"match": "-(?!\\])"
|
51
|
+
},
|
52
|
+
{
|
53
|
+
"name": "constant.single.character.character-class.lex",
|
54
|
+
"match": "."
|
55
|
+
}
|
56
|
+
],
|
57
|
+
"beginCaptures": {
|
58
|
+
"1": {
|
59
|
+
"name": "punctuation.definition.character-class.set.begin.lex"
|
60
|
+
},
|
61
|
+
"2": {
|
62
|
+
"name": "keyword.operator.logical.not.lex"
|
63
|
+
},
|
64
|
+
"3": {
|
65
|
+
"name": "constant.single.character.character-class.lex"
|
66
|
+
}
|
67
|
+
},
|
68
|
+
"endCaptures": {
|
69
|
+
"0": {
|
70
|
+
"name": "punctuation.definition.character-class.set.end.lex"
|
71
|
+
}
|
72
|
+
}
|
73
|
+
},
|
74
|
+
"escapes": {
|
75
|
+
"patterns": [
|
76
|
+
{
|
77
|
+
"name": "constant.character.escape.codepoint.octal.lex",
|
78
|
+
"match": "\\\\[0-7]{3}"
|
79
|
+
},
|
80
|
+
{
|
81
|
+
"name": "constant.character.escape.codepoint.hexadecimal.hex.lex",
|
82
|
+
"match": "\\\\[xX][A-Fa-f0-9]{2}"
|
83
|
+
},
|
84
|
+
{
|
85
|
+
"name": "constant.character.escape.lex",
|
86
|
+
"match": "\\\\."
|
87
|
+
}
|
88
|
+
]
|
89
|
+
},
|
90
|
+
"expansion": {
|
91
|
+
"name": "meta.expansion.lex",
|
92
|
+
"match": "(\\{)([^{}\\s]+)(\\})",
|
93
|
+
"captures": {
|
94
|
+
"1": {
|
95
|
+
"name": "punctuation.definition.expansion.bracket.curly.begin.lex"
|
96
|
+
},
|
97
|
+
"2": {
|
98
|
+
"name": "variable.parameter.reference.lex"
|
99
|
+
},
|
100
|
+
"3": {
|
101
|
+
"name": "punctuation.definition.expansion.bracket.curly.end.lex"
|
102
|
+
}
|
103
|
+
}
|
104
|
+
},
|
105
|
+
"expressions": {
|
106
|
+
"name": "constant.language.posix.$2-char.character-class.lex",
|
107
|
+
"match": "(?x)\n(\\[:)\n(alnum|alpha|blank|cntrl|digit|graph\n|lower|print|punct|space|upper|xdigit)\n(:\\])",
|
108
|
+
"captures": {
|
109
|
+
"1": {
|
110
|
+
"name": "punctuation.definition.character-class.set.begin.lex"
|
111
|
+
},
|
112
|
+
"2": {
|
113
|
+
"name": "support.constant.posix-class.lex"
|
114
|
+
},
|
115
|
+
"3": {
|
116
|
+
"name": "punctuation.definition.character-class.set.end.lex"
|
117
|
+
}
|
118
|
+
}
|
119
|
+
},
|
120
|
+
"lookahead": {
|
121
|
+
"name": "keyword.operator.logical.and.lookahead.lex",
|
122
|
+
"match": "/"
|
123
|
+
},
|
124
|
+
"main": {
|
125
|
+
"patterns": [
|
126
|
+
{
|
127
|
+
"include": "#wildcard"
|
128
|
+
},
|
129
|
+
{
|
130
|
+
"include": "#alternation"
|
131
|
+
},
|
132
|
+
{
|
133
|
+
"include": "#lookahead"
|
134
|
+
},
|
135
|
+
{
|
136
|
+
"include": "#anchors"
|
137
|
+
},
|
138
|
+
{
|
139
|
+
"include": "#start-condition"
|
140
|
+
},
|
141
|
+
{
|
142
|
+
"include": "#quantifier"
|
143
|
+
},
|
144
|
+
{
|
145
|
+
"include": "#string"
|
146
|
+
},
|
147
|
+
{
|
148
|
+
"include": "#expansion"
|
149
|
+
},
|
150
|
+
{
|
151
|
+
"include": "#quantifier-range"
|
152
|
+
},
|
153
|
+
{
|
154
|
+
"include": "#class"
|
155
|
+
},
|
156
|
+
{
|
157
|
+
"include": "#subpattern"
|
158
|
+
},
|
159
|
+
{
|
160
|
+
"include": "#escapes"
|
161
|
+
}
|
162
|
+
]
|
163
|
+
},
|
164
|
+
"quantifier": {
|
165
|
+
"name": "keyword.operator.quantifier.lex",
|
166
|
+
"match": "[*+?]"
|
167
|
+
},
|
168
|
+
"quantifier-range": {
|
169
|
+
"name": "keyword.operator.quantifier.specific.lex",
|
170
|
+
"match": "({)(?:([0-9]+)(?:(,)([0-9]*))?|(,)([0-9]+))(})",
|
171
|
+
"captures": {
|
172
|
+
"1": {
|
173
|
+
"name": "punctuation.definition.quantifier.bracket.curly.begin.lex"
|
174
|
+
},
|
175
|
+
"2": {
|
176
|
+
"name": "keyword.operator.quantifier.min.lex"
|
177
|
+
},
|
178
|
+
"3": {
|
179
|
+
"name": "punctuation.delimiter.comma.lex"
|
180
|
+
},
|
181
|
+
"4": {
|
182
|
+
"name": "keyword.operator.quantifier.max.lex"
|
183
|
+
},
|
184
|
+
"5": {
|
185
|
+
"name": "punctuation.delimiter.comma.lex"
|
186
|
+
},
|
187
|
+
"6": {
|
188
|
+
"name": "keyword.operator.quantifier.max.lex"
|
189
|
+
},
|
190
|
+
"7": {
|
191
|
+
"name": "punctuation.definition.quantifier.bracket.curly.end.lex"
|
192
|
+
}
|
193
|
+
}
|
194
|
+
},
|
195
|
+
"start-condition": {
|
196
|
+
"name": "meta.start-condition.lex",
|
197
|
+
"begin": "\u003c",
|
198
|
+
"end": "\u003e|(?=$)",
|
199
|
+
"patterns": [
|
200
|
+
{
|
201
|
+
"name": "keyword.operator.wildcard.condition.lex",
|
202
|
+
"match": "\\*"
|
203
|
+
},
|
204
|
+
{
|
205
|
+
"name": "punctuation.delimiter.separator.comma.lex",
|
206
|
+
"match": ","
|
207
|
+
},
|
208
|
+
{
|
209
|
+
"name": "constant.language.condition.name.lex",
|
210
|
+
"match": "[^\u003c\u003e*,\\s]+"
|
211
|
+
}
|
212
|
+
],
|
213
|
+
"beginCaptures": {
|
214
|
+
"0": {
|
215
|
+
"name": "punctuation.definition.angle.bracket.begin.lex"
|
216
|
+
}
|
217
|
+
},
|
218
|
+
"endCaptures": {
|
219
|
+
"0": {
|
220
|
+
"name": "punctuation.definition.angle.bracket.end.lex"
|
221
|
+
}
|
222
|
+
}
|
223
|
+
},
|
224
|
+
"string": {
|
225
|
+
"name": "string.quoted.double.lex",
|
226
|
+
"begin": "\"",
|
227
|
+
"end": "\"",
|
228
|
+
"patterns": [
|
229
|
+
{
|
230
|
+
"include": "#escapes"
|
231
|
+
}
|
232
|
+
],
|
233
|
+
"beginCaptures": {
|
234
|
+
"0": {
|
235
|
+
"name": "punctuation.definition.string.begin.lex"
|
236
|
+
}
|
237
|
+
},
|
238
|
+
"endCaptures": {
|
239
|
+
"0": {
|
240
|
+
"name": "punctuation.definition.string.end.lex"
|
241
|
+
}
|
242
|
+
}
|
243
|
+
},
|
244
|
+
"subpattern": {
|
245
|
+
"name": "meta.group.regexp",
|
246
|
+
"begin": "\\(",
|
247
|
+
"end": "\\)",
|
248
|
+
"patterns": [
|
249
|
+
{
|
250
|
+
"include": "#main"
|
251
|
+
}
|
252
|
+
],
|
253
|
+
"beginCaptures": {
|
254
|
+
"0": {
|
255
|
+
"name": "punctuation.definition.group.begin.lex"
|
256
|
+
}
|
257
|
+
},
|
258
|
+
"endCaptures": {
|
259
|
+
"0": {
|
260
|
+
"name": "punctuation.definition.group.end.lex"
|
261
|
+
}
|
262
|
+
}
|
263
|
+
},
|
264
|
+
"wildcard": {
|
265
|
+
"name": "constant.character.wildcard.dot.match.any.lex",
|
266
|
+
"match": "\\."
|
267
|
+
}
|
268
|
+
}
|
269
|
+
}
|
data/grammars/source.logos.json
CHANGED
@@ -4,7 +4,7 @@
|
|
4
4
|
"patterns": [
|
5
5
|
{
|
6
6
|
"name": "keyword.source.logos",
|
7
|
-
"match": "%(init|hook|subclass|group|class|new|ctor|end|config|orig|log)"
|
7
|
+
"match": "%(init|hook|subclass|group|class|new|ctor|end|config|orig|log|hookf|dtor|property|c)"
|
8
8
|
},
|
9
9
|
{
|
10
10
|
"match": "%c\\(([A-Za-z$_]+)\\)",
|
data/grammars/source.meson.json
CHANGED
@@ -59,7 +59,7 @@
|
|
59
59
|
},
|
60
60
|
{
|
61
61
|
"name": "support.function.builtin.meson",
|
62
|
-
"match": "(?x)\\b(add_global_arguments|add_project_arguments|add_global_link_arguments|add_project_link_arguments|add_test_setup|add_languages|assert|benchmark|build_target|configuration_data|configure_file|custom_target|declare_dependency|dependency|environment|error|executable|generator|gettext|get_option|get_variable|files|find_library|find_program|include_directories|import|install_data|install_headers|install_man|install_subdir|is_variable|jar|join_paths|library|message|option|project|run_target|run_command|set_variable|subdir|subproject|shared_library|shared_module|static_library|test|vcs_tag\n)\\b\\s*(?=\\()"
|
62
|
+
"match": "(?x)\\b(add_global_arguments|add_project_arguments|add_global_link_arguments|add_project_link_arguments|add_test_setup|add_languages|alias_target|assert|benchmark|both_libraries|build_target|configuration_data|configure_file|custom_target|declare_dependency|dependency|disabler|environment|error|executable|generator|gettext|get_option|get_variable|files|find_library|find_program|include_directories|import|install_data|install_headers|install_man|install_subdir|is_disabler|is_variable|jar|join_paths|library|message|option|project|run_target|run_command|set_variable|subdir|subdir_done|subproject|shared_library|shared_module|static_library|test|vcs_tag|warning\n)\\b\\s*(?=\\()"
|
63
63
|
}
|
64
64
|
],
|
65
65
|
"repository": {
|
@@ -0,0 +1,389 @@
|
|
1
|
+
{
|
2
|
+
"name": "MLIR",
|
3
|
+
"scopeName": "source.mlir",
|
4
|
+
"patterns": [
|
5
|
+
{
|
6
|
+
"name": "keyword.module.mlir",
|
7
|
+
"match": "\\b(module)\\b"
|
8
|
+
},
|
9
|
+
{
|
10
|
+
"name": "support.function.mlir",
|
11
|
+
"begin": "\\b(func)\\b\\s*(@[a-zA-Z_][a-zA-Z_0-9\\.]*)",
|
12
|
+
"end": "}",
|
13
|
+
"patterns": [
|
14
|
+
{
|
15
|
+
"include": "#function_params"
|
16
|
+
},
|
17
|
+
{
|
18
|
+
"include": "#function_attributes"
|
19
|
+
},
|
20
|
+
{
|
21
|
+
"include": "#function_results"
|
22
|
+
},
|
23
|
+
{
|
24
|
+
"include": "#region"
|
25
|
+
}
|
26
|
+
],
|
27
|
+
"beginCaptures": {
|
28
|
+
"1": {
|
29
|
+
"name": "keyword.function.mlir"
|
30
|
+
},
|
31
|
+
"2": {
|
32
|
+
"name": "entity.name.function.mlir"
|
33
|
+
}
|
34
|
+
}
|
35
|
+
},
|
36
|
+
{
|
37
|
+
"name": "comment.line.double-slash.mlir",
|
38
|
+
"include": "#comment"
|
39
|
+
}
|
40
|
+
],
|
41
|
+
"repository": {
|
42
|
+
"attribute_keywords": {
|
43
|
+
"match": "\\b(dense|none|opaque|sparse)\\b",
|
44
|
+
"captures": {
|
45
|
+
"1": {
|
46
|
+
"name": "keyword.attributes.mlir"
|
47
|
+
}
|
48
|
+
}
|
49
|
+
},
|
50
|
+
"attributes": {
|
51
|
+
"name": "meta.attributes.mlir",
|
52
|
+
"begin": "{",
|
53
|
+
"end": "}",
|
54
|
+
"patterns": [
|
55
|
+
{
|
56
|
+
"include": "#attribute_keywords"
|
57
|
+
},
|
58
|
+
{
|
59
|
+
"include": "#constant"
|
60
|
+
}
|
61
|
+
]
|
62
|
+
},
|
63
|
+
"bool_constant": {
|
64
|
+
"name": "constant.language.mlir",
|
65
|
+
"match": "\\b(true|false)\\b",
|
66
|
+
"captures": {
|
67
|
+
"1": {
|
68
|
+
"name": "constant.language.mlir"
|
69
|
+
}
|
70
|
+
}
|
71
|
+
},
|
72
|
+
"branch_target": {
|
73
|
+
"name": "meta.branch_target.mlir",
|
74
|
+
"begin": "(\\^bb[\\w\\d_$\\.-]+)",
|
75
|
+
"end": "[:,\\n]",
|
76
|
+
"patterns": [
|
77
|
+
{
|
78
|
+
"include": "#branch_target_region"
|
79
|
+
},
|
80
|
+
{
|
81
|
+
"include": "#comment"
|
82
|
+
}
|
83
|
+
],
|
84
|
+
"beginCaptures": {
|
85
|
+
"1": {
|
86
|
+
"name": "entity.name.label.mlir"
|
87
|
+
}
|
88
|
+
}
|
89
|
+
},
|
90
|
+
"branch_target_region": {
|
91
|
+
"name": "meta.branch_target.mlir",
|
92
|
+
"begin": "\\(",
|
93
|
+
"end": "\\)",
|
94
|
+
"patterns": [
|
95
|
+
{
|
96
|
+
"include": "#identifier"
|
97
|
+
},
|
98
|
+
{
|
99
|
+
"include": "#types"
|
100
|
+
}
|
101
|
+
]
|
102
|
+
},
|
103
|
+
"comment": {
|
104
|
+
"name": "comment.line.double-slash.mlir",
|
105
|
+
"match": "//.*$"
|
106
|
+
},
|
107
|
+
"constant": {
|
108
|
+
"name": "constants.other.mlir",
|
109
|
+
"patterns": [
|
110
|
+
{
|
111
|
+
"include": "#bool_constant"
|
112
|
+
},
|
113
|
+
{
|
114
|
+
"include": "#integer"
|
115
|
+
},
|
116
|
+
{
|
117
|
+
"include": "#string"
|
118
|
+
}
|
119
|
+
]
|
120
|
+
},
|
121
|
+
"container": {
|
122
|
+
"name": "meta.types.container.mlir",
|
123
|
+
"begin": "(complex|tuple)\u003c",
|
124
|
+
"end": "\u003e",
|
125
|
+
"patterns": [
|
126
|
+
{
|
127
|
+
"include": "#types"
|
128
|
+
}
|
129
|
+
],
|
130
|
+
"beginCaptures": {
|
131
|
+
"1": {
|
132
|
+
"name": "keyword.container.mlir"
|
133
|
+
}
|
134
|
+
}
|
135
|
+
},
|
136
|
+
"function_attributes": {
|
137
|
+
"name": "meta.attributes.function.mlir",
|
138
|
+
"begin": "(attributes)\\s*{",
|
139
|
+
"end": "}",
|
140
|
+
"patterns": [
|
141
|
+
{
|
142
|
+
"include": "#constant"
|
143
|
+
}
|
144
|
+
],
|
145
|
+
"beginCaptures": {
|
146
|
+
"1": {
|
147
|
+
"name": "keyword.attributes.mlir"
|
148
|
+
}
|
149
|
+
}
|
150
|
+
},
|
151
|
+
"function_params": {
|
152
|
+
"begin": "\\(",
|
153
|
+
"end": "\\)",
|
154
|
+
"patterns": [
|
155
|
+
{
|
156
|
+
"include": "#identifier"
|
157
|
+
},
|
158
|
+
{
|
159
|
+
"include": "#types"
|
160
|
+
}
|
161
|
+
]
|
162
|
+
},
|
163
|
+
"function_results": {
|
164
|
+
"name": "meta.function.results.mlir",
|
165
|
+
"begin": "-\u003e\\s*\\(",
|
166
|
+
"end": "\\)",
|
167
|
+
"patterns": [
|
168
|
+
{
|
169
|
+
"include": "#types"
|
170
|
+
}
|
171
|
+
]
|
172
|
+
},
|
173
|
+
"identifier": {
|
174
|
+
"name": "meta.identifier.mlir",
|
175
|
+
"match": "[\\%#][a-zA-Z0-9][\\w\\d_]*",
|
176
|
+
"captures": {
|
177
|
+
"0": {
|
178
|
+
"name": "variable.mlir"
|
179
|
+
}
|
180
|
+
}
|
181
|
+
},
|
182
|
+
"integer": {
|
183
|
+
"name": "constant.numeric.mlir",
|
184
|
+
"match": "[1-9][0-9]*"
|
185
|
+
},
|
186
|
+
"loc": {
|
187
|
+
"name": "meta.loc.mlir",
|
188
|
+
"begin": "\\b(loc)\\(",
|
189
|
+
"end": "\\)",
|
190
|
+
"patterns": [
|
191
|
+
{
|
192
|
+
"include": "#loc_fusedloc"
|
193
|
+
},
|
194
|
+
{
|
195
|
+
"include": "#loc_nameloc"
|
196
|
+
},
|
197
|
+
{
|
198
|
+
"include": "#op_generic"
|
199
|
+
}
|
200
|
+
],
|
201
|
+
"beginCaptures": {
|
202
|
+
"1": {
|
203
|
+
"name": "keyword.loc.mlir"
|
204
|
+
}
|
205
|
+
}
|
206
|
+
},
|
207
|
+
"loc_fusedloc": {
|
208
|
+
"name": "meta.location.mlir",
|
209
|
+
"begin": "(fused)(\u003c.*\u003e)?\\[",
|
210
|
+
"end": "\\]",
|
211
|
+
"patterns": [
|
212
|
+
{
|
213
|
+
"include": "#string"
|
214
|
+
}
|
215
|
+
],
|
216
|
+
"beginCaptures": {
|
217
|
+
"1": {
|
218
|
+
"name": "keyword.loc.mlir"
|
219
|
+
},
|
220
|
+
"2": {
|
221
|
+
"patterns": [
|
222
|
+
{
|
223
|
+
"include": "#string"
|
224
|
+
}
|
225
|
+
]
|
226
|
+
}
|
227
|
+
}
|
228
|
+
},
|
229
|
+
"loc_nameloc": {
|
230
|
+
"name": "meta.location.mlir",
|
231
|
+
"patterns": [
|
232
|
+
{
|
233
|
+
"include": "#string"
|
234
|
+
}
|
235
|
+
]
|
236
|
+
},
|
237
|
+
"op": {
|
238
|
+
"patterns": [
|
239
|
+
{
|
240
|
+
"include": "#terminator"
|
241
|
+
},
|
242
|
+
{
|
243
|
+
"include": "#op_generic"
|
244
|
+
}
|
245
|
+
]
|
246
|
+
},
|
247
|
+
"op_generic": {
|
248
|
+
"name": "meta.op.generic.mlir",
|
249
|
+
"begin": "((%[\\w\\d_]*)\\s*)=\\s*(?=\")",
|
250
|
+
"end": "\\n",
|
251
|
+
"patterns": [
|
252
|
+
{
|
253
|
+
"include": "#comment"
|
254
|
+
},
|
255
|
+
{
|
256
|
+
"include": "#attributes"
|
257
|
+
},
|
258
|
+
{
|
259
|
+
"include": "#identifier"
|
260
|
+
},
|
261
|
+
{
|
262
|
+
"include": "#loc"
|
263
|
+
},
|
264
|
+
{
|
265
|
+
"include": "#string"
|
266
|
+
},
|
267
|
+
{
|
268
|
+
"include": "#types"
|
269
|
+
}
|
270
|
+
],
|
271
|
+
"beginCaptures": {
|
272
|
+
"2": {
|
273
|
+
"name": "variable.mlir"
|
274
|
+
}
|
275
|
+
}
|
276
|
+
},
|
277
|
+
"region": {
|
278
|
+
"name": "meta.region.mlir",
|
279
|
+
"begin": "{",
|
280
|
+
"end": "(?=})",
|
281
|
+
"patterns": [
|
282
|
+
{
|
283
|
+
"include": "#branch_target"
|
284
|
+
},
|
285
|
+
{
|
286
|
+
"include": "#op"
|
287
|
+
},
|
288
|
+
{
|
289
|
+
"include": "#attributes"
|
290
|
+
},
|
291
|
+
{
|
292
|
+
"include": "#comment"
|
293
|
+
},
|
294
|
+
{
|
295
|
+
"include": "#string"
|
296
|
+
}
|
297
|
+
]
|
298
|
+
},
|
299
|
+
"shaped_container": {
|
300
|
+
"name": "meta.types.standard.shaped_container.mlir",
|
301
|
+
"begin": "(memref|tensor|vector)\u003c",
|
302
|
+
"end": "\u003e",
|
303
|
+
"patterns": [
|
304
|
+
{
|
305
|
+
"include": "#types"
|
306
|
+
}
|
307
|
+
],
|
308
|
+
"beginCaptures": {
|
309
|
+
"1": {
|
310
|
+
"name": "keyword.shaped_container.mlir"
|
311
|
+
}
|
312
|
+
}
|
313
|
+
},
|
314
|
+
"standard_simple_types": {
|
315
|
+
"name": "meta.types.standard.simple.mlir",
|
316
|
+
"match": "\\b(index|i[1-9]\\d*|f16|bf16|f32|f64)\\b",
|
317
|
+
"captures": {
|
318
|
+
"1": {
|
319
|
+
"name": "keyword.types.standard.simple.mlir"
|
320
|
+
}
|
321
|
+
}
|
322
|
+
},
|
323
|
+
"string": {
|
324
|
+
"name": "string.quoted.double.mlir",
|
325
|
+
"begin": "\"",
|
326
|
+
"end": "\"",
|
327
|
+
"patterns": [
|
328
|
+
{
|
329
|
+
"name": "constant.character.escape.mlir",
|
330
|
+
"match": "\\\\[nt\"]"
|
331
|
+
},
|
332
|
+
{
|
333
|
+
"name": "invalid.illegal.mlir",
|
334
|
+
"match": "\\\\."
|
335
|
+
}
|
336
|
+
],
|
337
|
+
"beginCaptures": {
|
338
|
+
"0": {
|
339
|
+
"name": "punctuation.definition.string.begin.mlir"
|
340
|
+
}
|
341
|
+
},
|
342
|
+
"endCaptures": {
|
343
|
+
"0": {
|
344
|
+
"name": "punctuation.definition.string.end.mlir"
|
345
|
+
}
|
346
|
+
}
|
347
|
+
},
|
348
|
+
"terminator": {
|
349
|
+
"begin": "(br|cond_br|return)",
|
350
|
+
"end": "\\n",
|
351
|
+
"patterns": [
|
352
|
+
{
|
353
|
+
"include": "#comment"
|
354
|
+
},
|
355
|
+
{
|
356
|
+
"include": "#branch_target"
|
357
|
+
},
|
358
|
+
{
|
359
|
+
"include": "#identifier"
|
360
|
+
},
|
361
|
+
{
|
362
|
+
"include": "#types"
|
363
|
+
},
|
364
|
+
{
|
365
|
+
"include": "#loc"
|
366
|
+
}
|
367
|
+
],
|
368
|
+
"beginCaptures": {
|
369
|
+
"1": {
|
370
|
+
"name": "keyword.control.mlir"
|
371
|
+
}
|
372
|
+
}
|
373
|
+
},
|
374
|
+
"types": {
|
375
|
+
"name": "meta.types.mlir",
|
376
|
+
"patterns": [
|
377
|
+
{
|
378
|
+
"include": "#container"
|
379
|
+
},
|
380
|
+
{
|
381
|
+
"include": "#shaped_container"
|
382
|
+
},
|
383
|
+
{
|
384
|
+
"include": "#standard_simple_types"
|
385
|
+
}
|
386
|
+
]
|
387
|
+
}
|
388
|
+
}
|
389
|
+
}
|