tm-grammars 1.24.25 → 1.25.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,268 @@
1
+ {
2
+ "displayName": "Hurl",
3
+ "name": "hurl",
4
+ "patterns": [
5
+ {
6
+ "include": "#comments"
7
+ },
8
+ {
9
+ "include": "#sections"
10
+ },
11
+ {
12
+ "include": "#http"
13
+ },
14
+ {
15
+ "include": "#strings"
16
+ },
17
+ {
18
+ "include": "#body"
19
+ },
20
+ {
21
+ "include": "#request"
22
+ }
23
+ ],
24
+ "repository": {
25
+ "body": {
26
+ "patterns": [
27
+ {
28
+ "begin": "```graphql(,\\w+)*$",
29
+ "beginCaptures": {
30
+ "1": {
31
+ "name": "support.type"
32
+ }
33
+ },
34
+ "end": "```$",
35
+ "name": "meta.embedded.block.graphql.hurl",
36
+ "patterns": [
37
+ {
38
+ "include": "source.graphql"
39
+ }
40
+ ]
41
+ },
42
+ {
43
+ "begin": "```xml(,\\w+)*$",
44
+ "beginCaptures": {
45
+ "1": {
46
+ "name": "support.type"
47
+ }
48
+ },
49
+ "end": "```$",
50
+ "name": "meta.embedded.block.xml.hurl",
51
+ "patterns": [
52
+ {
53
+ "include": "text.xml"
54
+ }
55
+ ]
56
+ },
57
+ {
58
+ "begin": "```json(,\\w+)*$",
59
+ "beginCaptures": {
60
+ "1": {
61
+ "name": "support.type"
62
+ }
63
+ },
64
+ "end": "```$",
65
+ "name": "meta.embedded.block.json.hurl",
66
+ "patterns": [
67
+ {
68
+ "include": "text.json"
69
+ }
70
+ ]
71
+ },
72
+ {
73
+ "begin": "```csv(,\\w+)*$",
74
+ "beginCaptures": {
75
+ "1": {
76
+ "name": "support.type"
77
+ }
78
+ },
79
+ "end": "```$",
80
+ "name": "meta.embedded.block.csv.hurl",
81
+ "patterns": [
82
+ {
83
+ "include": "text.csv"
84
+ }
85
+ ]
86
+ },
87
+ {
88
+ "begin": "```hex(,\\w+)*$",
89
+ "beginCaptures": {
90
+ "1": {
91
+ "name": "support.type"
92
+ }
93
+ },
94
+ "contentName": "text.plain",
95
+ "end": "```$",
96
+ "name": "string.quoted.multiline.hurl"
97
+ },
98
+ {
99
+ "begin": "```base64(,\\w+)*$",
100
+ "beginCaptures": {
101
+ "1": {
102
+ "name": "support.type"
103
+ }
104
+ },
105
+ "contentName": "text.plain",
106
+ "end": "```$",
107
+ "name": "string.quoted.multiline.hurl"
108
+ },
109
+ {
110
+ "begin": "```([^,]*)(,\\w+)*$",
111
+ "beginCaptures": {
112
+ "1": {
113
+ "name": "support.type"
114
+ },
115
+ "2": {
116
+ "name": "support.type"
117
+ }
118
+ },
119
+ "end": "```$",
120
+ "name": "string.quoted.multiline.hurl"
121
+ },
122
+ {
123
+ "match": "`(\\\\.|[^\\\\`])*`",
124
+ "name": "string.quoted.backtick.hurl",
125
+ "patterns": [
126
+ {
127
+ "include": "#escapes"
128
+ }
129
+ ]
130
+ },
131
+ {
132
+ "begin": "\\b(base64|hex),",
133
+ "beginCaptures": {
134
+ "1": {
135
+ "name": "support.function.name"
136
+ }
137
+ },
138
+ "contentName": "text.plain",
139
+ "end": ";",
140
+ "endCaptures": {
141
+ "0": {
142
+ "name": "support.function"
143
+ }
144
+ },
145
+ "name": "support.function",
146
+ "patterns": [
147
+ {
148
+ "include": "#placeholders"
149
+ }
150
+ ]
151
+ }
152
+ ]
153
+ },
154
+ "comments": {
155
+ "patterns": [
156
+ {
157
+ "match": "#.*$",
158
+ "name": "comment.line.number-sign.hurl"
159
+ }
160
+ ]
161
+ },
162
+ "escapes": {
163
+ "patterns": [
164
+ {
165
+ "match": "\\\\[\"#\\\\`bnrtu]",
166
+ "name": "constant.character.escape.hurl"
167
+ }
168
+ ]
169
+ },
170
+ "http": {
171
+ "patterns": [
172
+ {
173
+ "captures": {
174
+ "1": {
175
+ "name": "constant.language.version.hurl"
176
+ },
177
+ "3": {
178
+ "name": "constant.numeric.status.hurl"
179
+ }
180
+ },
181
+ "match": "\\b(HTTP(/(?:1\\.0|1\\.1|2))?)([\\t ]+([0-9]{3}))?\\b"
182
+ }
183
+ ]
184
+ },
185
+ "placeholders": {
186
+ "patterns": [
187
+ {
188
+ "begin": "(\\{\\{)\\s*",
189
+ "beginCaptures": {
190
+ "1": {
191
+ "name": "string.interpolated.hurl"
192
+ }
193
+ },
194
+ "contentName": "variable.other.hurl",
195
+ "end": "\\s*(}})",
196
+ "endCaptures": {
197
+ "1": {
198
+ "name": "string.interpolated.hurl"
199
+ }
200
+ }
201
+ }
202
+ ]
203
+ },
204
+ "request": {
205
+ "patterns": [
206
+ {
207
+ "match": "\\b(GET|POST|PUT|DELETE|PATCH|HEAD|OPTIONS|TRACE|CONNECT)\\b",
208
+ "name": "keyword.control.method.hurl"
209
+ },
210
+ {
211
+ "captures": {
212
+ "1": {
213
+ "name": "string.unquoted.url.hurl",
214
+ "patterns": [
215
+ {
216
+ "include": "#placeholders"
217
+ }
218
+ ]
219
+ }
220
+ },
221
+ "match": "(https?://[^\\t\\n]+)\\s*$",
222
+ "name": "string.unquoted.url.hurl"
223
+ },
224
+ {
225
+ "begin": "^([-0-9A-Za-z]+)(:)\\s*",
226
+ "beginCaptures": {
227
+ "1": {
228
+ "name": "entity.name.tag.header.hurl"
229
+ },
230
+ "2": {
231
+ "name": "punctuation.separator.key-value.hurl"
232
+ }
233
+ },
234
+ "contentName": "string.unquoted.hurl",
235
+ "end": "$",
236
+ "name": "entity.name.tag.header.hurl",
237
+ "patterns": [
238
+ {
239
+ "include": "#placeholders"
240
+ }
241
+ ]
242
+ }
243
+ ]
244
+ },
245
+ "sections": {
246
+ "patterns": [
247
+ {
248
+ "match": "^\\s*\\[(QueryStringParams|Query|FormParams|Form|MultipartFormData|Multipart|Cookies|Captures|Asserts|BasicAuth|Options)]",
249
+ "name": "entity.name.section.hurl"
250
+ }
251
+ ]
252
+ },
253
+ "strings": {
254
+ "patterns": [
255
+ {
256
+ "match": "\"(\\\\.|[^\"\\\\])*\"",
257
+ "name": "string.quoted.double.hurl",
258
+ "patterns": [
259
+ {
260
+ "include": "#escapes"
261
+ }
262
+ ]
263
+ }
264
+ ]
265
+ }
266
+ },
267
+ "scopeName": "source.hurl"
268
+ }
@@ -0,0 +1,213 @@
1
+ {
2
+ "displayName": "KDL",
3
+ "name": "kdl",
4
+ "patterns": [
5
+ {
6
+ "include": "#forbidden_ident"
7
+ },
8
+ {
9
+ "include": "#null"
10
+ },
11
+ {
12
+ "include": "#boolean"
13
+ },
14
+ {
15
+ "include": "#float_keyword"
16
+ },
17
+ {
18
+ "include": "#float_fraction"
19
+ },
20
+ {
21
+ "include": "#float_exp"
22
+ },
23
+ {
24
+ "include": "#decimal"
25
+ },
26
+ {
27
+ "include": "#hexadecimal"
28
+ },
29
+ {
30
+ "include": "#octal"
31
+ },
32
+ {
33
+ "include": "#binary"
34
+ },
35
+ {
36
+ "include": "#raw-string"
37
+ },
38
+ {
39
+ "include": "#string_multi_line"
40
+ },
41
+ {
42
+ "include": "#string_single_line"
43
+ },
44
+ {
45
+ "include": "#block_comment"
46
+ },
47
+ {
48
+ "include": "#block_doc_comment"
49
+ },
50
+ {
51
+ "include": "#slashdash_block_comment"
52
+ },
53
+ {
54
+ "include": "#slashdash_comment"
55
+ },
56
+ {
57
+ "include": "#slashdash_node_comment"
58
+ },
59
+ {
60
+ "include": "#slashdash_node_with_children_comment"
61
+ },
62
+ {
63
+ "include": "#line_comment"
64
+ },
65
+ {
66
+ "include": "#attribute"
67
+ },
68
+ {
69
+ "include": "#node_name"
70
+ },
71
+ {
72
+ "include": "#ident_string"
73
+ }
74
+ ],
75
+ "repository": {
76
+ "attribute": {
77
+ "captures": {
78
+ "1": {
79
+ "name": "punctuation.separator.key-value.kdl"
80
+ }
81
+ },
82
+ "match": "(?![]#/;=\\[\\\\{}])[!$-.:<>?@^_`|~\\w]+\\d*[!$-.:<>?@^_`|~\\w]*(=)",
83
+ "name": "entity.other.attribute-name.kdl"
84
+ },
85
+ "binary": {
86
+ "match": "\\b0b[01][01_]*\\b",
87
+ "name": "constant.numeric.integer.binary.rust"
88
+ },
89
+ "block_comment": {
90
+ "begin": "/\\*",
91
+ "end": "\\*/",
92
+ "name": "comment.block.kdl",
93
+ "patterns": [
94
+ {
95
+ "include": "#block_doc_comment"
96
+ },
97
+ {
98
+ "include": "#block_comment"
99
+ }
100
+ ]
101
+ },
102
+ "block_doc_comment": {
103
+ "begin": "/\\*[!*](?![*/])",
104
+ "end": "\\*/",
105
+ "name": "comment.block.documentation.kdl",
106
+ "patterns": [
107
+ {
108
+ "include": "#block_doc_comment"
109
+ },
110
+ {
111
+ "include": "#block_comment"
112
+ }
113
+ ]
114
+ },
115
+ "boolean": {
116
+ "match": "#(?:true|false)",
117
+ "name": "constant.language.boolean.kdl"
118
+ },
119
+ "decimal": {
120
+ "match": "\\b[-+0-9][0-9_]*\\b",
121
+ "name": "constant.numeric.integer.decimal.rust"
122
+ },
123
+ "float_exp": {
124
+ "match": "\\b[0-9][0-9_]*(\\.[0-9][0-9_]*)?[Ee][-+]?[0-9_]+\\b",
125
+ "name": "constant.numeric.float.rust"
126
+ },
127
+ "float_fraction": {
128
+ "match": "\\b([-+0-9])[0-9_]*\\.[0-9][0-9_]*([Ee][-+]?[0-9_]+)?\\b",
129
+ "name": "constant.numeric.float.rust"
130
+ },
131
+ "float_keyword": {
132
+ "match": "#(?:nan|inf|-inf)",
133
+ "name": "constant.language.other.kdl"
134
+ },
135
+ "forbidden_ident": {
136
+ "match": "(?<!#)(?:true|false|null|nan|-?inf)",
137
+ "name": "invalid.illegal.kdl.bad-ident"
138
+ },
139
+ "hexadecimal": {
140
+ "match": "\\b0x\\h[_\\h]*\\b",
141
+ "name": "constant.numeric.integer.hexadecimal.rust"
142
+ },
143
+ "ident_string": {
144
+ "match": "(?![]#/;=\\[\\\\{}])[!$-.:<>?@^_`|~\\w]+\\d*[!$-.:<>?@^_`|~\\w]*",
145
+ "name": "string.unquoted"
146
+ },
147
+ "line_comment": {
148
+ "begin": "//",
149
+ "end": "$",
150
+ "name": "comment.line.double-slash.kdl"
151
+ },
152
+ "node_name": {
153
+ "match": "((?<=[;{])|^)\\s*(?![]#/;=\\[\\\\{}])[!$-.:<>?@^_`|~\\w]+\\d*[!$-.:<>?@^_`|~\\w]*",
154
+ "name": "entity.name.tag"
155
+ },
156
+ "null": {
157
+ "match": "#null",
158
+ "name": "constant.language.null.kdl"
159
+ },
160
+ "octal": {
161
+ "match": "\\b0o[0-7][0-7_]*\\b",
162
+ "name": "constant.numeric.integer.octal.rust"
163
+ },
164
+ "raw-string": {
165
+ "begin": "(#+)(\"(?:\"\"|))",
166
+ "end": "\\2\\1",
167
+ "name": "string.quoted.other.raw.kdl"
168
+ },
169
+ "slashdash_block_comment": {
170
+ "begin": "/-\\s*\\{",
171
+ "end": "}",
172
+ "name": "comment.block.slashdash.kdl"
173
+ },
174
+ "slashdash_comment": {
175
+ "begin": "(?<!^)\\s*/-\\s*",
176
+ "end": "\\s",
177
+ "name": "comment.block.slashdash.kdl"
178
+ },
179
+ "slashdash_node_comment": {
180
+ "begin": "(?<=^)\\s*/-[^{]+$",
181
+ "end": ";|(?<!\\\\)$",
182
+ "name": "comment.block.slashdash.kdl"
183
+ },
184
+ "slashdash_node_with_children_comment": {
185
+ "begin": "(?<=^)\\s*/-[^{]+\\{",
186
+ "end": "}",
187
+ "name": "comment.block.slashdash.kdl"
188
+ },
189
+ "string_multi_line": {
190
+ "begin": "\"\"\"",
191
+ "end": "\"\"\"",
192
+ "name": "string.quoted.triple.kdl",
193
+ "patterns": [
194
+ {
195
+ "match": "\\\\(:?[\"\\\\bfnrst]|u\\{\\h{1,6}})",
196
+ "name": "constant.character.escape.kdl"
197
+ }
198
+ ]
199
+ },
200
+ "string_single_line": {
201
+ "begin": "\"",
202
+ "end": "\"",
203
+ "name": "string.quoted.double.kdl",
204
+ "patterns": [
205
+ {
206
+ "match": "\\\\(:?[\"\\\\bfnrst]|u\\{\\h{1,6}})",
207
+ "name": "constant.character.escape.kdl"
208
+ }
209
+ ]
210
+ }
211
+ },
212
+ "scopeName": "source.kdl"
213
+ }