@boundaryml/baml-grammar 0.1.0
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.
- package/LICENSE +201 -0
- package/README.md +56 -0
- package/dist/index.d.ts +10 -0
- package/dist/index.js +4781 -0
- package/grammars/baml.tmLanguage.json +4774 -0
- package/language-configuration.json +34 -0
- package/package.json +40 -0
|
@@ -0,0 +1,4774 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://raw.githubusercontent.com/martinring/tmlanguage/master/tmlanguage.json",
|
|
3
|
+
"name": "baml",
|
|
4
|
+
"scopeName": "source.baml",
|
|
5
|
+
"fileTypes": [
|
|
6
|
+
"baml"
|
|
7
|
+
],
|
|
8
|
+
"patterns": [
|
|
9
|
+
{
|
|
10
|
+
"include": "#comments"
|
|
11
|
+
},
|
|
12
|
+
{
|
|
13
|
+
"include": "#client"
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
"include": "#retry-policy"
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
"include": "#generator"
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
"include": "#template-string"
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
"include": "#block-attribute"
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
"include": "#enum"
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
"include": "#type-alias"
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
"include": "#implements-for"
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
"include": "#interface"
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
"include": "#class"
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
"include": "#function"
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
"include": "#testset"
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
"include": "#test"
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
"include": "#let-statement"
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
"include": "#semicolon"
|
|
56
|
+
}
|
|
57
|
+
],
|
|
58
|
+
"repository": {
|
|
59
|
+
"accessor-dot": {
|
|
60
|
+
"name": "punctuation.accessor.baml",
|
|
61
|
+
"match": "\\."
|
|
62
|
+
},
|
|
63
|
+
"array-destructure-pattern": {
|
|
64
|
+
"name": "meta.pattern.destructure.array.baml",
|
|
65
|
+
"begin": "(?:\\b((?:let|const))\\b\\s*)?(\\[)",
|
|
66
|
+
"beginCaptures": {
|
|
67
|
+
"1": {
|
|
68
|
+
"name": "keyword.declaration.binding.baml"
|
|
69
|
+
},
|
|
70
|
+
"2": {
|
|
71
|
+
"name": "punctuation.definition.array.begin.baml"
|
|
72
|
+
}
|
|
73
|
+
},
|
|
74
|
+
"end": "(\\])(?:\\s*(:)\\s*((?:(?!\\s*(?:in\\b|if\\b|=>|=|[,}\\)])).)+))?",
|
|
75
|
+
"endCaptures": {
|
|
76
|
+
"1": {
|
|
77
|
+
"name": "punctuation.definition.array.end.baml"
|
|
78
|
+
},
|
|
79
|
+
"2": {
|
|
80
|
+
"name": "punctuation.separator.colon.baml"
|
|
81
|
+
},
|
|
82
|
+
"3": {
|
|
83
|
+
"patterns": [
|
|
84
|
+
{
|
|
85
|
+
"include": "#comments"
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
"include": "#type-expression"
|
|
89
|
+
}
|
|
90
|
+
]
|
|
91
|
+
}
|
|
92
|
+
},
|
|
93
|
+
"patterns": [
|
|
94
|
+
{
|
|
95
|
+
"include": "#comments"
|
|
96
|
+
},
|
|
97
|
+
{
|
|
98
|
+
"include": "#array-destructure-rest-operator"
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
"include": "#pattern"
|
|
102
|
+
},
|
|
103
|
+
{
|
|
104
|
+
"include": "#comma"
|
|
105
|
+
}
|
|
106
|
+
]
|
|
107
|
+
},
|
|
108
|
+
"array-destructure-rest-operator": {
|
|
109
|
+
"name": "keyword.operator.rest.baml",
|
|
110
|
+
"match": "\\.\\."
|
|
111
|
+
},
|
|
112
|
+
"array-expression": {
|
|
113
|
+
"name": "meta.expression.array.baml",
|
|
114
|
+
"begin": "\\[",
|
|
115
|
+
"beginCaptures": {
|
|
116
|
+
"0": {
|
|
117
|
+
"name": "punctuation.definition.array.begin.baml"
|
|
118
|
+
}
|
|
119
|
+
},
|
|
120
|
+
"end": "\\]",
|
|
121
|
+
"endCaptures": {
|
|
122
|
+
"0": {
|
|
123
|
+
"name": "punctuation.definition.array.end.baml"
|
|
124
|
+
}
|
|
125
|
+
},
|
|
126
|
+
"patterns": [
|
|
127
|
+
{
|
|
128
|
+
"include": "#comments"
|
|
129
|
+
},
|
|
130
|
+
{
|
|
131
|
+
"include": "#expression"
|
|
132
|
+
},
|
|
133
|
+
{
|
|
134
|
+
"include": "#comma"
|
|
135
|
+
}
|
|
136
|
+
]
|
|
137
|
+
},
|
|
138
|
+
"assignment-operator": {
|
|
139
|
+
"name": "keyword.operator.assignment.baml",
|
|
140
|
+
"match": "="
|
|
141
|
+
},
|
|
142
|
+
"associated-type": {
|
|
143
|
+
"name": "meta.associated-type.baml",
|
|
144
|
+
"begin": "(?:^\\s*|(?<=\\{)\\s*)(type)\\s+(\\$?[A-Za-z_][A-Za-z0-9_-]*(?:\\$[A-Za-z_][A-Za-z0-9_-]*)*)\\b",
|
|
145
|
+
"beginCaptures": {
|
|
146
|
+
"1": {
|
|
147
|
+
"name": "keyword.declaration.associated-type.baml"
|
|
148
|
+
},
|
|
149
|
+
"2": {
|
|
150
|
+
"name": "entity.name.type.associated.baml"
|
|
151
|
+
}
|
|
152
|
+
},
|
|
153
|
+
"end": "(?<=;)|(?=\\r?\\n|\\})",
|
|
154
|
+
"patterns": [
|
|
155
|
+
{
|
|
156
|
+
"include": "#comments"
|
|
157
|
+
},
|
|
158
|
+
{
|
|
159
|
+
"include": "#associated-type-extends"
|
|
160
|
+
},
|
|
161
|
+
{
|
|
162
|
+
"include": "#assignment-operator"
|
|
163
|
+
},
|
|
164
|
+
{
|
|
165
|
+
"include": "#type-expression"
|
|
166
|
+
},
|
|
167
|
+
{
|
|
168
|
+
"include": "#semicolon"
|
|
169
|
+
}
|
|
170
|
+
]
|
|
171
|
+
},
|
|
172
|
+
"associated-type-extends": {
|
|
173
|
+
"name": "keyword.operator.extends.baml",
|
|
174
|
+
"match": "\\bextends\\b"
|
|
175
|
+
},
|
|
176
|
+
"associated-type-projection": {
|
|
177
|
+
"name": "meta.type.associated-projection.baml",
|
|
178
|
+
"begin": "\\((?=[^)\\r\\n]*\\bas\\b)",
|
|
179
|
+
"beginCaptures": {
|
|
180
|
+
"0": {
|
|
181
|
+
"name": "punctuation.definition.type.begin.baml"
|
|
182
|
+
}
|
|
183
|
+
},
|
|
184
|
+
"end": "(\\))\\s*(\\.)\\s*(\\$?[A-Za-z_][A-Za-z0-9_-]*(?:\\$[A-Za-z_][A-Za-z0-9_-]*)*)\\b",
|
|
185
|
+
"endCaptures": {
|
|
186
|
+
"1": {
|
|
187
|
+
"name": "punctuation.definition.type.end.baml"
|
|
188
|
+
},
|
|
189
|
+
"2": {
|
|
190
|
+
"name": "punctuation.accessor.baml"
|
|
191
|
+
},
|
|
192
|
+
"3": {
|
|
193
|
+
"name": "entity.name.type.associated.baml"
|
|
194
|
+
}
|
|
195
|
+
},
|
|
196
|
+
"patterns": [
|
|
197
|
+
{
|
|
198
|
+
"include": "#comments"
|
|
199
|
+
},
|
|
200
|
+
{
|
|
201
|
+
"include": "#type-as-operator"
|
|
202
|
+
},
|
|
203
|
+
{
|
|
204
|
+
"include": "#type-expression"
|
|
205
|
+
}
|
|
206
|
+
]
|
|
207
|
+
},
|
|
208
|
+
"attribute": {
|
|
209
|
+
"name": "meta.attribute.baml",
|
|
210
|
+
"begin": "(@)(?!@)\\s*(\\$?[A-Za-z_][A-Za-z0-9_-]*(?:\\$[A-Za-z_][A-Za-z0-9_-]*)*(?:\\s*\\.\\s*\\$?[A-Za-z_][A-Za-z0-9_-]*(?:\\$[A-Za-z_][A-Za-z0-9_-]*)*)*)\\b",
|
|
211
|
+
"beginCaptures": {
|
|
212
|
+
"1": {
|
|
213
|
+
"name": "punctuation.definition.annotation.baml storage.type.annotation.baml"
|
|
214
|
+
},
|
|
215
|
+
"2": {
|
|
216
|
+
"patterns": [
|
|
217
|
+
{
|
|
218
|
+
"include": "#accessor-dot"
|
|
219
|
+
},
|
|
220
|
+
{
|
|
221
|
+
"include": "#attribute-path-segment"
|
|
222
|
+
}
|
|
223
|
+
]
|
|
224
|
+
}
|
|
225
|
+
},
|
|
226
|
+
"end": "(?<=\\))|(?=\\s*@|\\s*,|\\s*\\}|\\s+\\$?[A-Za-z_][A-Za-z0-9_-]*(?:\\$[A-Za-z_][A-Za-z0-9_-]*)*\\b|\\r?\\n\\s*(?:\\$?[A-Za-z_][A-Za-z0-9_-]*(?:\\$[A-Za-z_][A-Za-z0-9_-]*)*\\b|@@|\\}))",
|
|
227
|
+
"patterns": [
|
|
228
|
+
{
|
|
229
|
+
"include": "#comments"
|
|
230
|
+
},
|
|
231
|
+
{
|
|
232
|
+
"include": "#attribute-arguments"
|
|
233
|
+
}
|
|
234
|
+
]
|
|
235
|
+
},
|
|
236
|
+
"attribute-arguments": {
|
|
237
|
+
"name": "meta.attribute.arguments.baml",
|
|
238
|
+
"begin": "\\(",
|
|
239
|
+
"beginCaptures": {
|
|
240
|
+
"0": {
|
|
241
|
+
"name": "punctuation.definition.annotation-arguments.begin.bracket.round.baml"
|
|
242
|
+
}
|
|
243
|
+
},
|
|
244
|
+
"end": "\\)",
|
|
245
|
+
"endCaptures": {
|
|
246
|
+
"0": {
|
|
247
|
+
"name": "punctuation.definition.annotation-arguments.end.bracket.round.baml"
|
|
248
|
+
}
|
|
249
|
+
},
|
|
250
|
+
"patterns": [
|
|
251
|
+
{
|
|
252
|
+
"include": "#comments"
|
|
253
|
+
},
|
|
254
|
+
{
|
|
255
|
+
"include": "#attribute-expression-block"
|
|
256
|
+
},
|
|
257
|
+
{
|
|
258
|
+
"include": "#literal"
|
|
259
|
+
},
|
|
260
|
+
{
|
|
261
|
+
"include": "#attribute-unquoted-string"
|
|
262
|
+
},
|
|
263
|
+
{
|
|
264
|
+
"include": "#comma"
|
|
265
|
+
}
|
|
266
|
+
]
|
|
267
|
+
},
|
|
268
|
+
"attribute-expression-block": {
|
|
269
|
+
"name": "meta.attribute.expression.baml",
|
|
270
|
+
"begin": "\\{\\{",
|
|
271
|
+
"beginCaptures": {
|
|
272
|
+
"0": {
|
|
273
|
+
"name": "punctuation.section.expression.begin.baml"
|
|
274
|
+
}
|
|
275
|
+
},
|
|
276
|
+
"end": "\\}\\}",
|
|
277
|
+
"endCaptures": {
|
|
278
|
+
"0": {
|
|
279
|
+
"name": "punctuation.section.expression.end.baml"
|
|
280
|
+
}
|
|
281
|
+
},
|
|
282
|
+
"patterns": [
|
|
283
|
+
{
|
|
284
|
+
"include": "#comments"
|
|
285
|
+
},
|
|
286
|
+
{
|
|
287
|
+
"include": "#expression"
|
|
288
|
+
}
|
|
289
|
+
]
|
|
290
|
+
},
|
|
291
|
+
"attribute-path-segment": {
|
|
292
|
+
"name": "storage.type.annotation.baml",
|
|
293
|
+
"match": "\\b\\$?[A-Za-z_][A-Za-z0-9_-]*(?:\\$[A-Za-z_][A-Za-z0-9_-]*)*\\b"
|
|
294
|
+
},
|
|
295
|
+
"attribute-unquoted-string": {
|
|
296
|
+
"name": "string.unquoted.baml",
|
|
297
|
+
"match": "\\b\\$?[A-Za-z_][A-Za-z0-9_-]*(?:\\$[A-Za-z_][A-Za-z0-9_-]*)*\\b"
|
|
298
|
+
},
|
|
299
|
+
"await-expression": {
|
|
300
|
+
"name": "keyword.operator.await.baml",
|
|
301
|
+
"match": "\\bawait\\b"
|
|
302
|
+
},
|
|
303
|
+
"backtick-else": {
|
|
304
|
+
"name": "meta.interpolation.control.else.baml",
|
|
305
|
+
"match": "(\\$\\{)\\s*(else)\\s*(\\})",
|
|
306
|
+
"captures": {
|
|
307
|
+
"1": {
|
|
308
|
+
"name": "punctuation.section.interpolation.begin.baml"
|
|
309
|
+
},
|
|
310
|
+
"2": {
|
|
311
|
+
"name": "keyword.control.conditional.baml"
|
|
312
|
+
},
|
|
313
|
+
"3": {
|
|
314
|
+
"name": "punctuation.section.interpolation.end.baml"
|
|
315
|
+
}
|
|
316
|
+
}
|
|
317
|
+
},
|
|
318
|
+
"backtick-else-if": {
|
|
319
|
+
"name": "meta.interpolation.control.else-if.baml",
|
|
320
|
+
"begin": "(\\$\\{)\\s*(else)\\b\\s*(if)\\b",
|
|
321
|
+
"beginCaptures": {
|
|
322
|
+
"1": {
|
|
323
|
+
"name": "punctuation.section.interpolation.begin.baml"
|
|
324
|
+
},
|
|
325
|
+
"2": {
|
|
326
|
+
"name": "keyword.control.conditional.baml"
|
|
327
|
+
},
|
|
328
|
+
"3": {
|
|
329
|
+
"name": "keyword.control.conditional.baml"
|
|
330
|
+
}
|
|
331
|
+
},
|
|
332
|
+
"end": "\\}",
|
|
333
|
+
"endCaptures": {
|
|
334
|
+
"0": {
|
|
335
|
+
"name": "punctuation.section.interpolation.end.baml"
|
|
336
|
+
}
|
|
337
|
+
},
|
|
338
|
+
"patterns": [
|
|
339
|
+
{
|
|
340
|
+
"include": "#comments"
|
|
341
|
+
},
|
|
342
|
+
{
|
|
343
|
+
"include": "#backtick-else-if-condition"
|
|
344
|
+
}
|
|
345
|
+
]
|
|
346
|
+
},
|
|
347
|
+
"backtick-else-if-condition": {
|
|
348
|
+
"name": "meta.if.condition.baml",
|
|
349
|
+
"begin": "\\G\\s*",
|
|
350
|
+
"end": "(?=\\})",
|
|
351
|
+
"patterns": [
|
|
352
|
+
{
|
|
353
|
+
"include": "#comments"
|
|
354
|
+
},
|
|
355
|
+
{
|
|
356
|
+
"include": "#condition-expression"
|
|
357
|
+
}
|
|
358
|
+
]
|
|
359
|
+
},
|
|
360
|
+
"backtick-endfor": {
|
|
361
|
+
"name": "meta.interpolation.control.endfor.baml",
|
|
362
|
+
"match": "(\\$\\{)\\s*(endfor)\\s*(\\})",
|
|
363
|
+
"captures": {
|
|
364
|
+
"1": {
|
|
365
|
+
"name": "punctuation.section.interpolation.begin.baml"
|
|
366
|
+
},
|
|
367
|
+
"2": {
|
|
368
|
+
"name": "keyword.control.loop.endfor.baml"
|
|
369
|
+
},
|
|
370
|
+
"3": {
|
|
371
|
+
"name": "punctuation.section.interpolation.end.baml"
|
|
372
|
+
}
|
|
373
|
+
}
|
|
374
|
+
},
|
|
375
|
+
"backtick-endif": {
|
|
376
|
+
"name": "meta.interpolation.control.endif.baml",
|
|
377
|
+
"match": "(\\$\\{)\\s*(endif)\\s*(\\})",
|
|
378
|
+
"captures": {
|
|
379
|
+
"1": {
|
|
380
|
+
"name": "punctuation.section.interpolation.begin.baml"
|
|
381
|
+
},
|
|
382
|
+
"2": {
|
|
383
|
+
"name": "keyword.control.conditional.endif.baml"
|
|
384
|
+
},
|
|
385
|
+
"3": {
|
|
386
|
+
"name": "punctuation.section.interpolation.end.baml"
|
|
387
|
+
}
|
|
388
|
+
}
|
|
389
|
+
},
|
|
390
|
+
"backtick-expression-interpolation": {
|
|
391
|
+
"name": "meta.interpolation.baml",
|
|
392
|
+
"begin": "(\\$\\{)",
|
|
393
|
+
"beginCaptures": {
|
|
394
|
+
"1": {
|
|
395
|
+
"name": "punctuation.section.interpolation.begin.baml"
|
|
396
|
+
}
|
|
397
|
+
},
|
|
398
|
+
"end": "\\}",
|
|
399
|
+
"endCaptures": {
|
|
400
|
+
"0": {
|
|
401
|
+
"name": "punctuation.section.interpolation.end.baml"
|
|
402
|
+
}
|
|
403
|
+
},
|
|
404
|
+
"patterns": [
|
|
405
|
+
{
|
|
406
|
+
"include": "#comments"
|
|
407
|
+
},
|
|
408
|
+
{
|
|
409
|
+
"include": "#backtick-interpolation-let-statement"
|
|
410
|
+
},
|
|
411
|
+
{
|
|
412
|
+
"include": "#block-contents"
|
|
413
|
+
},
|
|
414
|
+
{
|
|
415
|
+
"include": "#expression"
|
|
416
|
+
},
|
|
417
|
+
{
|
|
418
|
+
"include": "#semicolon"
|
|
419
|
+
}
|
|
420
|
+
]
|
|
421
|
+
},
|
|
422
|
+
"backtick-for-c-style-let-initializer": {
|
|
423
|
+
"name": "meta.for.initializer.baml",
|
|
424
|
+
"begin": "(?=(?:let|const)\\b)",
|
|
425
|
+
"end": "(?=;)",
|
|
426
|
+
"patterns": [
|
|
427
|
+
{
|
|
428
|
+
"include": "#comments"
|
|
429
|
+
},
|
|
430
|
+
{
|
|
431
|
+
"include": "#pattern"
|
|
432
|
+
},
|
|
433
|
+
{
|
|
434
|
+
"include": "#let-else-clause"
|
|
435
|
+
},
|
|
436
|
+
{
|
|
437
|
+
"include": "#expression"
|
|
438
|
+
}
|
|
439
|
+
]
|
|
440
|
+
},
|
|
441
|
+
"backtick-for-open": {
|
|
442
|
+
"name": "meta.interpolation.control.for.baml",
|
|
443
|
+
"begin": "(\\$\\{)\\s*(for)\\b",
|
|
444
|
+
"beginCaptures": {
|
|
445
|
+
"1": {
|
|
446
|
+
"name": "punctuation.section.interpolation.begin.baml"
|
|
447
|
+
},
|
|
448
|
+
"2": {
|
|
449
|
+
"name": "keyword.control.loop.for.baml"
|
|
450
|
+
}
|
|
451
|
+
},
|
|
452
|
+
"end": "\\}",
|
|
453
|
+
"endCaptures": {
|
|
454
|
+
"0": {
|
|
455
|
+
"name": "punctuation.section.interpolation.end.baml"
|
|
456
|
+
}
|
|
457
|
+
},
|
|
458
|
+
"patterns": [
|
|
459
|
+
{
|
|
460
|
+
"include": "#comments"
|
|
461
|
+
},
|
|
462
|
+
{
|
|
463
|
+
"include": "#backtick-for-parenthesized-in-header"
|
|
464
|
+
},
|
|
465
|
+
{
|
|
466
|
+
"include": "#backtick-for-parenthesized-c-style-header"
|
|
467
|
+
},
|
|
468
|
+
{
|
|
469
|
+
"include": "#backtick-for-unparenthesized-header"
|
|
470
|
+
}
|
|
471
|
+
]
|
|
472
|
+
},
|
|
473
|
+
"backtick-for-parenthesized-c-style-header": {
|
|
474
|
+
"name": "meta.for.header.baml",
|
|
475
|
+
"begin": "\\G\\s*(\\()",
|
|
476
|
+
"beginCaptures": {
|
|
477
|
+
"1": {
|
|
478
|
+
"name": "punctuation.definition.for-header.begin.baml"
|
|
479
|
+
}
|
|
480
|
+
},
|
|
481
|
+
"end": "\\)(?=\\s*\\})",
|
|
482
|
+
"endCaptures": {
|
|
483
|
+
"0": {
|
|
484
|
+
"name": "punctuation.definition.for-header.end.baml"
|
|
485
|
+
}
|
|
486
|
+
},
|
|
487
|
+
"patterns": [
|
|
488
|
+
{
|
|
489
|
+
"include": "#comments"
|
|
490
|
+
},
|
|
491
|
+
{
|
|
492
|
+
"include": "#backtick-for-c-style-let-initializer"
|
|
493
|
+
},
|
|
494
|
+
{
|
|
495
|
+
"include": "#semicolon"
|
|
496
|
+
},
|
|
497
|
+
{
|
|
498
|
+
"include": "#expression"
|
|
499
|
+
}
|
|
500
|
+
]
|
|
501
|
+
},
|
|
502
|
+
"backtick-for-parenthesized-in-header": {
|
|
503
|
+
"name": "meta.for.header.baml",
|
|
504
|
+
"begin": "\\G\\s*(\\()(?=\\s*(?:let|const)\\b(?:(?![=;]).)*\\bin\\b)",
|
|
505
|
+
"beginCaptures": {
|
|
506
|
+
"1": {
|
|
507
|
+
"name": "punctuation.definition.for-header.begin.baml"
|
|
508
|
+
}
|
|
509
|
+
},
|
|
510
|
+
"end": "\\)(?=\\s*\\})",
|
|
511
|
+
"endCaptures": {
|
|
512
|
+
"0": {
|
|
513
|
+
"name": "punctuation.definition.for-header.end.baml"
|
|
514
|
+
}
|
|
515
|
+
},
|
|
516
|
+
"patterns": [
|
|
517
|
+
{
|
|
518
|
+
"include": "#comments"
|
|
519
|
+
},
|
|
520
|
+
{
|
|
521
|
+
"include": "#for-in-pattern"
|
|
522
|
+
},
|
|
523
|
+
{
|
|
524
|
+
"include": "#for-in-keyword"
|
|
525
|
+
},
|
|
526
|
+
{
|
|
527
|
+
"include": "#expression"
|
|
528
|
+
}
|
|
529
|
+
]
|
|
530
|
+
},
|
|
531
|
+
"backtick-for-unparenthesized-header": {
|
|
532
|
+
"name": "meta.for.header.baml",
|
|
533
|
+
"begin": "\\G\\s*(?=(?:let|const)\\b)",
|
|
534
|
+
"end": "(?=\\})",
|
|
535
|
+
"patterns": [
|
|
536
|
+
{
|
|
537
|
+
"include": "#comments"
|
|
538
|
+
},
|
|
539
|
+
{
|
|
540
|
+
"include": "#for-in-pattern"
|
|
541
|
+
},
|
|
542
|
+
{
|
|
543
|
+
"include": "#for-in-keyword"
|
|
544
|
+
},
|
|
545
|
+
{
|
|
546
|
+
"include": "#condition-expression"
|
|
547
|
+
}
|
|
548
|
+
]
|
|
549
|
+
},
|
|
550
|
+
"backtick-if-condition": {
|
|
551
|
+
"name": "meta.if.condition.baml",
|
|
552
|
+
"begin": "\\G\\s*",
|
|
553
|
+
"end": "(?=\\})",
|
|
554
|
+
"patterns": [
|
|
555
|
+
{
|
|
556
|
+
"include": "#comments"
|
|
557
|
+
},
|
|
558
|
+
{
|
|
559
|
+
"include": "#condition-expression"
|
|
560
|
+
}
|
|
561
|
+
]
|
|
562
|
+
},
|
|
563
|
+
"backtick-if-open": {
|
|
564
|
+
"name": "meta.interpolation.control.if.baml",
|
|
565
|
+
"begin": "(\\$\\{)\\s*(if)\\b(?=(?:(?![\\{\\}]).)*\\})",
|
|
566
|
+
"beginCaptures": {
|
|
567
|
+
"1": {
|
|
568
|
+
"name": "punctuation.section.interpolation.begin.baml"
|
|
569
|
+
},
|
|
570
|
+
"2": {
|
|
571
|
+
"name": "keyword.control.conditional.baml"
|
|
572
|
+
}
|
|
573
|
+
},
|
|
574
|
+
"end": "\\}",
|
|
575
|
+
"endCaptures": {
|
|
576
|
+
"0": {
|
|
577
|
+
"name": "punctuation.section.interpolation.end.baml"
|
|
578
|
+
}
|
|
579
|
+
},
|
|
580
|
+
"patterns": [
|
|
581
|
+
{
|
|
582
|
+
"include": "#comments"
|
|
583
|
+
},
|
|
584
|
+
{
|
|
585
|
+
"include": "#backtick-if-condition"
|
|
586
|
+
}
|
|
587
|
+
]
|
|
588
|
+
},
|
|
589
|
+
"backtick-interpolation": {
|
|
590
|
+
"patterns": [
|
|
591
|
+
{
|
|
592
|
+
"include": "#backtick-for-open"
|
|
593
|
+
},
|
|
594
|
+
{
|
|
595
|
+
"include": "#backtick-else-if"
|
|
596
|
+
},
|
|
597
|
+
{
|
|
598
|
+
"include": "#backtick-if-open"
|
|
599
|
+
},
|
|
600
|
+
{
|
|
601
|
+
"include": "#backtick-else"
|
|
602
|
+
},
|
|
603
|
+
{
|
|
604
|
+
"include": "#backtick-endfor"
|
|
605
|
+
},
|
|
606
|
+
{
|
|
607
|
+
"include": "#backtick-endif"
|
|
608
|
+
},
|
|
609
|
+
{
|
|
610
|
+
"include": "#backtick-expression-interpolation"
|
|
611
|
+
}
|
|
612
|
+
]
|
|
613
|
+
},
|
|
614
|
+
"backtick-interpolation-let-pattern": {
|
|
615
|
+
"name": "meta.pattern.statement.baml",
|
|
616
|
+
"begin": "\\G\\s*",
|
|
617
|
+
"end": "(?=\\s*=)",
|
|
618
|
+
"patterns": [
|
|
619
|
+
{
|
|
620
|
+
"include": "#comments"
|
|
621
|
+
},
|
|
622
|
+
{
|
|
623
|
+
"include": "#pattern"
|
|
624
|
+
}
|
|
625
|
+
]
|
|
626
|
+
},
|
|
627
|
+
"backtick-interpolation-let-statement": {
|
|
628
|
+
"name": "meta.statement.let.baml",
|
|
629
|
+
"begin": "(?=(?:let|const)\\b)",
|
|
630
|
+
"end": "(?=;|\\})",
|
|
631
|
+
"patterns": [
|
|
632
|
+
{
|
|
633
|
+
"include": "#comments"
|
|
634
|
+
},
|
|
635
|
+
{
|
|
636
|
+
"include": "#backtick-interpolation-let-pattern"
|
|
637
|
+
},
|
|
638
|
+
{
|
|
639
|
+
"include": "#assignment-operator"
|
|
640
|
+
},
|
|
641
|
+
{
|
|
642
|
+
"include": "#expression"
|
|
643
|
+
}
|
|
644
|
+
]
|
|
645
|
+
},
|
|
646
|
+
"backtick-string": {
|
|
647
|
+
"patterns": [
|
|
648
|
+
{
|
|
649
|
+
"include": "#backtick-string-8"
|
|
650
|
+
},
|
|
651
|
+
{
|
|
652
|
+
"include": "#backtick-string-7"
|
|
653
|
+
},
|
|
654
|
+
{
|
|
655
|
+
"include": "#backtick-string-6"
|
|
656
|
+
},
|
|
657
|
+
{
|
|
658
|
+
"include": "#backtick-string-5"
|
|
659
|
+
},
|
|
660
|
+
{
|
|
661
|
+
"include": "#backtick-string-4"
|
|
662
|
+
},
|
|
663
|
+
{
|
|
664
|
+
"include": "#backtick-string-3"
|
|
665
|
+
},
|
|
666
|
+
{
|
|
667
|
+
"include": "#backtick-string-2"
|
|
668
|
+
},
|
|
669
|
+
{
|
|
670
|
+
"include": "#backtick-string-1"
|
|
671
|
+
}
|
|
672
|
+
]
|
|
673
|
+
},
|
|
674
|
+
"backtick-string-1": {
|
|
675
|
+
"name": "string.interpolated.baml",
|
|
676
|
+
"begin": "(?<!\\`)(\\`{1})(?!\\`)",
|
|
677
|
+
"beginCaptures": {
|
|
678
|
+
"1": {
|
|
679
|
+
"name": "punctuation.definition.string.begin.baml"
|
|
680
|
+
}
|
|
681
|
+
},
|
|
682
|
+
"end": "(?<!\\`)(\\`{1})(?!\\`)",
|
|
683
|
+
"endCaptures": {
|
|
684
|
+
"1": {
|
|
685
|
+
"name": "punctuation.definition.string.end.baml"
|
|
686
|
+
}
|
|
687
|
+
},
|
|
688
|
+
"patterns": [
|
|
689
|
+
{
|
|
690
|
+
"include": "#backtick-interpolation"
|
|
691
|
+
},
|
|
692
|
+
{
|
|
693
|
+
"include": "#backtick-string-escape"
|
|
694
|
+
}
|
|
695
|
+
]
|
|
696
|
+
},
|
|
697
|
+
"backtick-string-2": {
|
|
698
|
+
"name": "string.interpolated.baml",
|
|
699
|
+
"begin": "(?<!\\`)(\\`{2})(?!\\`)",
|
|
700
|
+
"beginCaptures": {
|
|
701
|
+
"1": {
|
|
702
|
+
"name": "punctuation.definition.string.begin.baml"
|
|
703
|
+
}
|
|
704
|
+
},
|
|
705
|
+
"end": "(?<!\\`)(\\`{2})(?!\\`)",
|
|
706
|
+
"endCaptures": {
|
|
707
|
+
"1": {
|
|
708
|
+
"name": "punctuation.definition.string.end.baml"
|
|
709
|
+
}
|
|
710
|
+
},
|
|
711
|
+
"patterns": [
|
|
712
|
+
{
|
|
713
|
+
"include": "#backtick-interpolation"
|
|
714
|
+
},
|
|
715
|
+
{
|
|
716
|
+
"include": "#backtick-string-escape"
|
|
717
|
+
}
|
|
718
|
+
]
|
|
719
|
+
},
|
|
720
|
+
"backtick-string-3": {
|
|
721
|
+
"name": "string.interpolated.baml",
|
|
722
|
+
"begin": "(?<!\\`)(\\`{3})(?!\\`)",
|
|
723
|
+
"beginCaptures": {
|
|
724
|
+
"1": {
|
|
725
|
+
"name": "punctuation.definition.string.begin.baml"
|
|
726
|
+
}
|
|
727
|
+
},
|
|
728
|
+
"end": "(?<!\\`)(\\`{3})(?!\\`)",
|
|
729
|
+
"endCaptures": {
|
|
730
|
+
"1": {
|
|
731
|
+
"name": "punctuation.definition.string.end.baml"
|
|
732
|
+
}
|
|
733
|
+
},
|
|
734
|
+
"patterns": [
|
|
735
|
+
{
|
|
736
|
+
"include": "#backtick-interpolation"
|
|
737
|
+
},
|
|
738
|
+
{
|
|
739
|
+
"include": "#backtick-string-escape"
|
|
740
|
+
}
|
|
741
|
+
]
|
|
742
|
+
},
|
|
743
|
+
"backtick-string-4": {
|
|
744
|
+
"name": "string.interpolated.baml",
|
|
745
|
+
"begin": "(?<!\\`)(\\`{4})(?!\\`)",
|
|
746
|
+
"beginCaptures": {
|
|
747
|
+
"1": {
|
|
748
|
+
"name": "punctuation.definition.string.begin.baml"
|
|
749
|
+
}
|
|
750
|
+
},
|
|
751
|
+
"end": "(?<!\\`)(\\`{4})(?!\\`)",
|
|
752
|
+
"endCaptures": {
|
|
753
|
+
"1": {
|
|
754
|
+
"name": "punctuation.definition.string.end.baml"
|
|
755
|
+
}
|
|
756
|
+
},
|
|
757
|
+
"patterns": [
|
|
758
|
+
{
|
|
759
|
+
"include": "#backtick-interpolation"
|
|
760
|
+
},
|
|
761
|
+
{
|
|
762
|
+
"include": "#backtick-string-escape"
|
|
763
|
+
}
|
|
764
|
+
]
|
|
765
|
+
},
|
|
766
|
+
"backtick-string-5": {
|
|
767
|
+
"name": "string.interpolated.baml",
|
|
768
|
+
"begin": "(?<!\\`)(\\`{5})(?!\\`)",
|
|
769
|
+
"beginCaptures": {
|
|
770
|
+
"1": {
|
|
771
|
+
"name": "punctuation.definition.string.begin.baml"
|
|
772
|
+
}
|
|
773
|
+
},
|
|
774
|
+
"end": "(?<!\\`)(\\`{5})(?!\\`)",
|
|
775
|
+
"endCaptures": {
|
|
776
|
+
"1": {
|
|
777
|
+
"name": "punctuation.definition.string.end.baml"
|
|
778
|
+
}
|
|
779
|
+
},
|
|
780
|
+
"patterns": [
|
|
781
|
+
{
|
|
782
|
+
"include": "#backtick-interpolation"
|
|
783
|
+
},
|
|
784
|
+
{
|
|
785
|
+
"include": "#backtick-string-escape"
|
|
786
|
+
}
|
|
787
|
+
]
|
|
788
|
+
},
|
|
789
|
+
"backtick-string-6": {
|
|
790
|
+
"name": "string.interpolated.baml",
|
|
791
|
+
"begin": "(?<!\\`)(\\`{6})(?!\\`)",
|
|
792
|
+
"beginCaptures": {
|
|
793
|
+
"1": {
|
|
794
|
+
"name": "punctuation.definition.string.begin.baml"
|
|
795
|
+
}
|
|
796
|
+
},
|
|
797
|
+
"end": "(?<!\\`)(\\`{6})(?!\\`)",
|
|
798
|
+
"endCaptures": {
|
|
799
|
+
"1": {
|
|
800
|
+
"name": "punctuation.definition.string.end.baml"
|
|
801
|
+
}
|
|
802
|
+
},
|
|
803
|
+
"patterns": [
|
|
804
|
+
{
|
|
805
|
+
"include": "#backtick-interpolation"
|
|
806
|
+
},
|
|
807
|
+
{
|
|
808
|
+
"include": "#backtick-string-escape"
|
|
809
|
+
}
|
|
810
|
+
]
|
|
811
|
+
},
|
|
812
|
+
"backtick-string-7": {
|
|
813
|
+
"name": "string.interpolated.baml",
|
|
814
|
+
"begin": "(?<!\\`)(\\`{7})(?!\\`)",
|
|
815
|
+
"beginCaptures": {
|
|
816
|
+
"1": {
|
|
817
|
+
"name": "punctuation.definition.string.begin.baml"
|
|
818
|
+
}
|
|
819
|
+
},
|
|
820
|
+
"end": "(?<!\\`)(\\`{7})(?!\\`)",
|
|
821
|
+
"endCaptures": {
|
|
822
|
+
"1": {
|
|
823
|
+
"name": "punctuation.definition.string.end.baml"
|
|
824
|
+
}
|
|
825
|
+
},
|
|
826
|
+
"patterns": [
|
|
827
|
+
{
|
|
828
|
+
"include": "#backtick-interpolation"
|
|
829
|
+
},
|
|
830
|
+
{
|
|
831
|
+
"include": "#backtick-string-escape"
|
|
832
|
+
}
|
|
833
|
+
]
|
|
834
|
+
},
|
|
835
|
+
"backtick-string-8": {
|
|
836
|
+
"name": "string.interpolated.baml",
|
|
837
|
+
"begin": "(?<!\\`)(\\`{8})(?!\\`)",
|
|
838
|
+
"beginCaptures": {
|
|
839
|
+
"1": {
|
|
840
|
+
"name": "punctuation.definition.string.begin.baml"
|
|
841
|
+
}
|
|
842
|
+
},
|
|
843
|
+
"end": "(?<!\\`)(\\`{8})(?!\\`)",
|
|
844
|
+
"endCaptures": {
|
|
845
|
+
"1": {
|
|
846
|
+
"name": "punctuation.definition.string.end.baml"
|
|
847
|
+
}
|
|
848
|
+
},
|
|
849
|
+
"patterns": [
|
|
850
|
+
{
|
|
851
|
+
"include": "#backtick-interpolation"
|
|
852
|
+
},
|
|
853
|
+
{
|
|
854
|
+
"include": "#backtick-string-escape"
|
|
855
|
+
}
|
|
856
|
+
]
|
|
857
|
+
},
|
|
858
|
+
"backtick-string-escape": {
|
|
859
|
+
"patterns": [
|
|
860
|
+
{
|
|
861
|
+
"include": "#string-escape-control"
|
|
862
|
+
},
|
|
863
|
+
{
|
|
864
|
+
"include": "#string-escape-quoted-delimiter"
|
|
865
|
+
},
|
|
866
|
+
{
|
|
867
|
+
"include": "#backtick-string-escape-delimiter"
|
|
868
|
+
},
|
|
869
|
+
{
|
|
870
|
+
"include": "#string-escape-unknown"
|
|
871
|
+
}
|
|
872
|
+
]
|
|
873
|
+
},
|
|
874
|
+
"backtick-string-escape-delimiter": {
|
|
875
|
+
"name": "constant.character.escape.delimiter.baml",
|
|
876
|
+
"match": "\\\\[`$]"
|
|
877
|
+
},
|
|
878
|
+
"bare-attribute": {
|
|
879
|
+
"name": "meta.attribute.baml",
|
|
880
|
+
"match": "(@)(?!@)\\s*(\\$?[A-Za-z_][A-Za-z0-9_-]*(?:\\$[A-Za-z_][A-Za-z0-9_-]*)*\\s*\\.\\s*\\$?[A-Za-z_][A-Za-z0-9_-]*(?:\\$[A-Za-z_][A-Za-z0-9_-]*)*(?:\\s*\\.\\s*\\$?[A-Za-z_][A-Za-z0-9_-]*(?:\\$[A-Za-z_][A-Za-z0-9_-]*)*)*|skip)\\b(?=\\s*(?:@|,|\\}|$|//|/\\*))",
|
|
881
|
+
"captures": {
|
|
882
|
+
"1": {
|
|
883
|
+
"name": "punctuation.definition.annotation.baml storage.type.annotation.baml"
|
|
884
|
+
},
|
|
885
|
+
"2": {
|
|
886
|
+
"patterns": [
|
|
887
|
+
{
|
|
888
|
+
"include": "#accessor-dot"
|
|
889
|
+
},
|
|
890
|
+
{
|
|
891
|
+
"include": "#attribute-path-segment"
|
|
892
|
+
}
|
|
893
|
+
]
|
|
894
|
+
}
|
|
895
|
+
}
|
|
896
|
+
},
|
|
897
|
+
"bare-binding-pattern": {
|
|
898
|
+
"name": "meta.pattern.binding.baml",
|
|
899
|
+
"match": "\\b((?:let|const))\\s+(\\$?[A-Za-z_][A-Za-z0-9_-]*(?:\\$[A-Za-z_][A-Za-z0-9_-]*)*)\\b",
|
|
900
|
+
"captures": {
|
|
901
|
+
"1": {
|
|
902
|
+
"name": "keyword.declaration.binding.baml"
|
|
903
|
+
},
|
|
904
|
+
"2": {
|
|
905
|
+
"name": "variable.other.binding.baml"
|
|
906
|
+
}
|
|
907
|
+
}
|
|
908
|
+
},
|
|
909
|
+
"bigint-literal": {
|
|
910
|
+
"name": "constant.numeric.bigint.baml",
|
|
911
|
+
"match": "\\b[0-9]+n"
|
|
912
|
+
},
|
|
913
|
+
"block-attribute": {
|
|
914
|
+
"name": "meta.attribute.block.baml",
|
|
915
|
+
"begin": "(@@)\\s*(\\$?[A-Za-z_][A-Za-z0-9_-]*(?:\\$[A-Za-z_][A-Za-z0-9_-]*)*(?:\\s*\\.\\s*\\$?[A-Za-z_][A-Za-z0-9_-]*(?:\\$[A-Za-z_][A-Za-z0-9_-]*)*)*)\\b",
|
|
916
|
+
"beginCaptures": {
|
|
917
|
+
"1": {
|
|
918
|
+
"name": "punctuation.definition.annotation.baml storage.type.annotation.baml"
|
|
919
|
+
},
|
|
920
|
+
"2": {
|
|
921
|
+
"patterns": [
|
|
922
|
+
{
|
|
923
|
+
"include": "#accessor-dot"
|
|
924
|
+
},
|
|
925
|
+
{
|
|
926
|
+
"include": "#attribute-path-segment"
|
|
927
|
+
}
|
|
928
|
+
]
|
|
929
|
+
}
|
|
930
|
+
},
|
|
931
|
+
"end": "(?<=\\))|(?=\\s*@@|\\s*@|\\s*,|\\s*\\}|\\s+\\$?[A-Za-z_][A-Za-z0-9_-]*(?:\\$[A-Za-z_][A-Za-z0-9_-]*)*\\b|\\r?\\n\\s*(?:\\$?[A-Za-z_][A-Za-z0-9_-]*(?:\\$[A-Za-z_][A-Za-z0-9_-]*)*\\b|@@|\\}))",
|
|
932
|
+
"patterns": [
|
|
933
|
+
{
|
|
934
|
+
"include": "#comments"
|
|
935
|
+
},
|
|
936
|
+
{
|
|
937
|
+
"include": "#attribute-arguments"
|
|
938
|
+
}
|
|
939
|
+
]
|
|
940
|
+
},
|
|
941
|
+
"block-comment": {
|
|
942
|
+
"name": "comment.block.baml",
|
|
943
|
+
"begin": "/\\*",
|
|
944
|
+
"end": "\\*/"
|
|
945
|
+
},
|
|
946
|
+
"block-contents": {
|
|
947
|
+
"patterns": [
|
|
948
|
+
{
|
|
949
|
+
"include": "#comments"
|
|
950
|
+
},
|
|
951
|
+
{
|
|
952
|
+
"include": "#testset"
|
|
953
|
+
},
|
|
954
|
+
{
|
|
955
|
+
"include": "#test"
|
|
956
|
+
},
|
|
957
|
+
{
|
|
958
|
+
"include": "#watch-statement"
|
|
959
|
+
},
|
|
960
|
+
{
|
|
961
|
+
"include": "#let-statement"
|
|
962
|
+
},
|
|
963
|
+
{
|
|
964
|
+
"include": "#return-statement"
|
|
965
|
+
},
|
|
966
|
+
{
|
|
967
|
+
"include": "#break-statement"
|
|
968
|
+
},
|
|
969
|
+
{
|
|
970
|
+
"include": "#continue-statement"
|
|
971
|
+
},
|
|
972
|
+
{
|
|
973
|
+
"include": "#defer-statement"
|
|
974
|
+
},
|
|
975
|
+
{
|
|
976
|
+
"include": "#if-else-clause"
|
|
977
|
+
},
|
|
978
|
+
{
|
|
979
|
+
"include": "#for-statement"
|
|
980
|
+
},
|
|
981
|
+
{
|
|
982
|
+
"include": "#while-statement"
|
|
983
|
+
},
|
|
984
|
+
{
|
|
985
|
+
"include": "#expression"
|
|
986
|
+
},
|
|
987
|
+
{
|
|
988
|
+
"include": "#semicolon"
|
|
989
|
+
}
|
|
990
|
+
]
|
|
991
|
+
},
|
|
992
|
+
"boolean-literal": {
|
|
993
|
+
"name": "constant.language.boolean.baml",
|
|
994
|
+
"match": "\\b(?:true|false)\\b"
|
|
995
|
+
},
|
|
996
|
+
"break-statement": {
|
|
997
|
+
"name": "meta.statement.break.baml",
|
|
998
|
+
"begin": "(?:^\\s*|\\G\\s*|(?<=[{;}])\\s*)(break)\\b",
|
|
999
|
+
"beginCaptures": {
|
|
1000
|
+
"1": {
|
|
1001
|
+
"name": "keyword.control.flow.break.baml"
|
|
1002
|
+
}
|
|
1003
|
+
},
|
|
1004
|
+
"end": "(?=[;}]|$)",
|
|
1005
|
+
"patterns": [
|
|
1006
|
+
{
|
|
1007
|
+
"include": "#comments"
|
|
1008
|
+
}
|
|
1009
|
+
]
|
|
1010
|
+
},
|
|
1011
|
+
"byte-string-escape": {
|
|
1012
|
+
"patterns": [
|
|
1013
|
+
{
|
|
1014
|
+
"include": "#byte-string-escape-hex"
|
|
1015
|
+
},
|
|
1016
|
+
{
|
|
1017
|
+
"include": "#byte-string-escape-control"
|
|
1018
|
+
},
|
|
1019
|
+
{
|
|
1020
|
+
"include": "#string-escape-quoted-delimiter"
|
|
1021
|
+
},
|
|
1022
|
+
{
|
|
1023
|
+
"include": "#byte-string-escape-invalid-hex"
|
|
1024
|
+
},
|
|
1025
|
+
{
|
|
1026
|
+
"include": "#byte-string-escape-invalid"
|
|
1027
|
+
}
|
|
1028
|
+
]
|
|
1029
|
+
},
|
|
1030
|
+
"byte-string-escape-control": {
|
|
1031
|
+
"name": "constant.character.escape.control.baml",
|
|
1032
|
+
"match": "\\\\[ntr0]"
|
|
1033
|
+
},
|
|
1034
|
+
"byte-string-escape-hex": {
|
|
1035
|
+
"name": "constant.character.escape.hex.baml",
|
|
1036
|
+
"match": "\\\\x[0-9A-Fa-f]{2}"
|
|
1037
|
+
},
|
|
1038
|
+
"byte-string-escape-invalid": {
|
|
1039
|
+
"name": "invalid.illegal.escape.baml",
|
|
1040
|
+
"match": "\\\\."
|
|
1041
|
+
},
|
|
1042
|
+
"byte-string-escape-invalid-hex": {
|
|
1043
|
+
"name": "invalid.illegal.escape.hex.baml",
|
|
1044
|
+
"match": "\\\\x(?:[0-9A-Fa-f]{0,1}(?=[\"\\\\]|$)|[0-9A-Fa-f]?[^0-9A-Fa-f\"\\\\])"
|
|
1045
|
+
},
|
|
1046
|
+
"byte-string-literal": {
|
|
1047
|
+
"name": "string.quoted.binary.double.baml",
|
|
1048
|
+
"begin": "\\b(b)(\")",
|
|
1049
|
+
"beginCaptures": {
|
|
1050
|
+
"1": {
|
|
1051
|
+
"name": "storage.type.string.baml"
|
|
1052
|
+
},
|
|
1053
|
+
"2": {
|
|
1054
|
+
"name": "punctuation.definition.string.begin.baml"
|
|
1055
|
+
}
|
|
1056
|
+
},
|
|
1057
|
+
"end": "\"",
|
|
1058
|
+
"endCaptures": {
|
|
1059
|
+
"0": {
|
|
1060
|
+
"name": "punctuation.definition.string.end.baml"
|
|
1061
|
+
}
|
|
1062
|
+
},
|
|
1063
|
+
"patterns": [
|
|
1064
|
+
{
|
|
1065
|
+
"include": "#byte-string-escape"
|
|
1066
|
+
}
|
|
1067
|
+
]
|
|
1068
|
+
},
|
|
1069
|
+
"call-arguments": {
|
|
1070
|
+
"name": "meta.function-call.arguments.baml",
|
|
1071
|
+
"begin": "\\(",
|
|
1072
|
+
"beginCaptures": {
|
|
1073
|
+
"0": {
|
|
1074
|
+
"name": "punctuation.definition.arguments.begin.baml"
|
|
1075
|
+
}
|
|
1076
|
+
},
|
|
1077
|
+
"end": "\\)",
|
|
1078
|
+
"endCaptures": {
|
|
1079
|
+
"0": {
|
|
1080
|
+
"name": "punctuation.definition.arguments.end.baml"
|
|
1081
|
+
}
|
|
1082
|
+
},
|
|
1083
|
+
"patterns": [
|
|
1084
|
+
{
|
|
1085
|
+
"include": "#comments"
|
|
1086
|
+
},
|
|
1087
|
+
{
|
|
1088
|
+
"include": "#expression"
|
|
1089
|
+
},
|
|
1090
|
+
{
|
|
1091
|
+
"include": "#comma"
|
|
1092
|
+
}
|
|
1093
|
+
]
|
|
1094
|
+
},
|
|
1095
|
+
"catch-binding": {
|
|
1096
|
+
"name": "variable.parameter.catch.baml",
|
|
1097
|
+
"match": "\\b\\$?[A-Za-z_][A-Za-z0-9_-]*(?:\\$[A-Za-z_][A-Za-z0-9_-]*)*\\b"
|
|
1098
|
+
},
|
|
1099
|
+
"catch-binding-list": {
|
|
1100
|
+
"name": "meta.catch.binding-list.baml",
|
|
1101
|
+
"begin": "\\(",
|
|
1102
|
+
"beginCaptures": {
|
|
1103
|
+
"0": {
|
|
1104
|
+
"name": "punctuation.definition.catch-binding.begin.baml"
|
|
1105
|
+
}
|
|
1106
|
+
},
|
|
1107
|
+
"end": "\\)",
|
|
1108
|
+
"endCaptures": {
|
|
1109
|
+
"0": {
|
|
1110
|
+
"name": "punctuation.definition.catch-binding.end.baml"
|
|
1111
|
+
}
|
|
1112
|
+
},
|
|
1113
|
+
"patterns": [
|
|
1114
|
+
{
|
|
1115
|
+
"include": "#comments"
|
|
1116
|
+
},
|
|
1117
|
+
{
|
|
1118
|
+
"include": "#catch-binding"
|
|
1119
|
+
},
|
|
1120
|
+
{
|
|
1121
|
+
"include": "#comma"
|
|
1122
|
+
}
|
|
1123
|
+
]
|
|
1124
|
+
},
|
|
1125
|
+
"catch-block": {
|
|
1126
|
+
"name": "meta.block.catch.baml",
|
|
1127
|
+
"begin": "\\{",
|
|
1128
|
+
"beginCaptures": {
|
|
1129
|
+
"0": {
|
|
1130
|
+
"name": "punctuation.definition.block.begin.baml"
|
|
1131
|
+
}
|
|
1132
|
+
},
|
|
1133
|
+
"end": "\\}",
|
|
1134
|
+
"endCaptures": {
|
|
1135
|
+
"0": {
|
|
1136
|
+
"name": "punctuation.definition.block.end.baml"
|
|
1137
|
+
}
|
|
1138
|
+
},
|
|
1139
|
+
"patterns": [
|
|
1140
|
+
{
|
|
1141
|
+
"include": "#comments"
|
|
1142
|
+
},
|
|
1143
|
+
{
|
|
1144
|
+
"include": "#match-arm"
|
|
1145
|
+
},
|
|
1146
|
+
{
|
|
1147
|
+
"include": "#comma"
|
|
1148
|
+
}
|
|
1149
|
+
]
|
|
1150
|
+
},
|
|
1151
|
+
"catch-expression": {
|
|
1152
|
+
"name": "meta.expression.catch.baml",
|
|
1153
|
+
"begin": "\\b(catch|catch_all)\\b",
|
|
1154
|
+
"beginCaptures": {
|
|
1155
|
+
"1": {
|
|
1156
|
+
"name": "keyword.control.exception.catch.baml"
|
|
1157
|
+
}
|
|
1158
|
+
},
|
|
1159
|
+
"end": "(?<=\\})|(?=,|;|$)",
|
|
1160
|
+
"patterns": [
|
|
1161
|
+
{
|
|
1162
|
+
"include": "#comments"
|
|
1163
|
+
},
|
|
1164
|
+
{
|
|
1165
|
+
"include": "#catch-binding-list"
|
|
1166
|
+
},
|
|
1167
|
+
{
|
|
1168
|
+
"include": "#catch-block"
|
|
1169
|
+
}
|
|
1170
|
+
]
|
|
1171
|
+
},
|
|
1172
|
+
"class": {
|
|
1173
|
+
"name": "meta.class.baml",
|
|
1174
|
+
"begin": "^\\s*(class)\\b",
|
|
1175
|
+
"beginCaptures": {
|
|
1176
|
+
"1": {
|
|
1177
|
+
"name": "keyword.declaration.class.baml"
|
|
1178
|
+
}
|
|
1179
|
+
},
|
|
1180
|
+
"end": "(?<=\\})|(?=^\\s*(?:client|retry_policy|generator|template_string|class|enum|interface|implements|implement|function|testset|test|type)\\b)",
|
|
1181
|
+
"patterns": [
|
|
1182
|
+
{
|
|
1183
|
+
"include": "#comments"
|
|
1184
|
+
},
|
|
1185
|
+
{
|
|
1186
|
+
"include": "#class-header"
|
|
1187
|
+
},
|
|
1188
|
+
{
|
|
1189
|
+
"include": "#class-body"
|
|
1190
|
+
}
|
|
1191
|
+
]
|
|
1192
|
+
},
|
|
1193
|
+
"class-body": {
|
|
1194
|
+
"name": "meta.class.body.baml",
|
|
1195
|
+
"begin": "\\{",
|
|
1196
|
+
"beginCaptures": {
|
|
1197
|
+
"0": {
|
|
1198
|
+
"name": "punctuation.definition.block.begin.baml"
|
|
1199
|
+
}
|
|
1200
|
+
},
|
|
1201
|
+
"end": "\\}",
|
|
1202
|
+
"endCaptures": {
|
|
1203
|
+
"0": {
|
|
1204
|
+
"name": "punctuation.definition.block.end.baml"
|
|
1205
|
+
}
|
|
1206
|
+
},
|
|
1207
|
+
"patterns": [
|
|
1208
|
+
{
|
|
1209
|
+
"include": "#comments"
|
|
1210
|
+
},
|
|
1211
|
+
{
|
|
1212
|
+
"include": "#block-attribute"
|
|
1213
|
+
},
|
|
1214
|
+
{
|
|
1215
|
+
"include": "#bare-attribute"
|
|
1216
|
+
},
|
|
1217
|
+
{
|
|
1218
|
+
"include": "#attribute"
|
|
1219
|
+
},
|
|
1220
|
+
{
|
|
1221
|
+
"include": "#implements-block"
|
|
1222
|
+
},
|
|
1223
|
+
{
|
|
1224
|
+
"include": "#function"
|
|
1225
|
+
},
|
|
1226
|
+
{
|
|
1227
|
+
"include": "#field"
|
|
1228
|
+
},
|
|
1229
|
+
{
|
|
1230
|
+
"include": "#semicolon"
|
|
1231
|
+
}
|
|
1232
|
+
]
|
|
1233
|
+
},
|
|
1234
|
+
"class-destructure-body": {
|
|
1235
|
+
"name": "meta.pattern.destructure.class.body.baml",
|
|
1236
|
+
"begin": "\\{",
|
|
1237
|
+
"beginCaptures": {
|
|
1238
|
+
"0": {
|
|
1239
|
+
"name": "punctuation.definition.pattern.destructure.begin.baml"
|
|
1240
|
+
}
|
|
1241
|
+
},
|
|
1242
|
+
"end": "\\}",
|
|
1243
|
+
"endCaptures": {
|
|
1244
|
+
"0": {
|
|
1245
|
+
"name": "punctuation.definition.pattern.destructure.end.baml"
|
|
1246
|
+
}
|
|
1247
|
+
},
|
|
1248
|
+
"patterns": [
|
|
1249
|
+
{
|
|
1250
|
+
"include": "#comments"
|
|
1251
|
+
},
|
|
1252
|
+
{
|
|
1253
|
+
"include": "#class-destructure-field"
|
|
1254
|
+
},
|
|
1255
|
+
{
|
|
1256
|
+
"include": "#comma"
|
|
1257
|
+
}
|
|
1258
|
+
]
|
|
1259
|
+
},
|
|
1260
|
+
"class-destructure-field": {
|
|
1261
|
+
"name": "meta.pattern.destructure.class.field.baml",
|
|
1262
|
+
"begin": "\\b(\\$?[A-Za-z_][A-Za-z0-9_-]*(?:\\$[A-Za-z_][A-Za-z0-9_-]*)*)\\b\\s*(:)?",
|
|
1263
|
+
"beginCaptures": {
|
|
1264
|
+
"1": {
|
|
1265
|
+
"name": "variable.other.property.baml"
|
|
1266
|
+
},
|
|
1267
|
+
"2": {
|
|
1268
|
+
"name": "punctuation.separator.colon.baml"
|
|
1269
|
+
}
|
|
1270
|
+
},
|
|
1271
|
+
"end": "(?=,|\\})",
|
|
1272
|
+
"patterns": [
|
|
1273
|
+
{
|
|
1274
|
+
"include": "#comments"
|
|
1275
|
+
},
|
|
1276
|
+
{
|
|
1277
|
+
"include": "#pattern"
|
|
1278
|
+
}
|
|
1279
|
+
]
|
|
1280
|
+
},
|
|
1281
|
+
"class-destructure-pattern": {
|
|
1282
|
+
"name": "meta.pattern.destructure.class.baml",
|
|
1283
|
+
"begin": "\\b(?:((?:let|const))\\s+)?(\\$?[A-Za-z_][A-Za-z0-9_-]*(?:\\$[A-Za-z_][A-Za-z0-9_-]*)*(?:\\s*\\.\\s*\\$?[A-Za-z_][A-Za-z0-9_-]*(?:\\$[A-Za-z_][A-Za-z0-9_-]*)*)*)\\b\\s*(?=(?:<[^{}=;\\r\\n]*>\\s*)?\\{)",
|
|
1284
|
+
"beginCaptures": {
|
|
1285
|
+
"1": {
|
|
1286
|
+
"name": "keyword.declaration.binding.baml"
|
|
1287
|
+
},
|
|
1288
|
+
"2": {
|
|
1289
|
+
"patterns": [
|
|
1290
|
+
{
|
|
1291
|
+
"include": "#type-reference"
|
|
1292
|
+
}
|
|
1293
|
+
]
|
|
1294
|
+
}
|
|
1295
|
+
},
|
|
1296
|
+
"end": "(?<=\\})",
|
|
1297
|
+
"patterns": [
|
|
1298
|
+
{
|
|
1299
|
+
"include": "#comments"
|
|
1300
|
+
},
|
|
1301
|
+
{
|
|
1302
|
+
"include": "#type-expression"
|
|
1303
|
+
},
|
|
1304
|
+
{
|
|
1305
|
+
"include": "#class-destructure-body"
|
|
1306
|
+
}
|
|
1307
|
+
]
|
|
1308
|
+
},
|
|
1309
|
+
"class-header": {
|
|
1310
|
+
"name": "meta.class.header.baml",
|
|
1311
|
+
"begin": "\\G\\s*",
|
|
1312
|
+
"end": "(?=\\{)|(?=^\\s*(?:client|retry_policy|generator|template_string|class|enum|interface|implements|implement|function|testset|test|type)\\b)",
|
|
1313
|
+
"patterns": [
|
|
1314
|
+
{
|
|
1315
|
+
"include": "#comments"
|
|
1316
|
+
},
|
|
1317
|
+
{
|
|
1318
|
+
"include": "#declaration-type-parameters"
|
|
1319
|
+
},
|
|
1320
|
+
{
|
|
1321
|
+
"include": "#class-name"
|
|
1322
|
+
}
|
|
1323
|
+
]
|
|
1324
|
+
},
|
|
1325
|
+
"class-name": {
|
|
1326
|
+
"name": "entity.name.type.class.baml",
|
|
1327
|
+
"match": "\\b\\$?[A-Za-z_][A-Za-z0-9_-]*(?:\\$[A-Za-z_][A-Za-z0-9_-]*)*\\b"
|
|
1328
|
+
},
|
|
1329
|
+
"client": {
|
|
1330
|
+
"name": "meta.client.baml",
|
|
1331
|
+
"begin": "^\\s*(client)\\b(?:\\s*(<)\\s*(\\$?[A-Za-z_][A-Za-z0-9_-]*(?:\\$[A-Za-z_][A-Za-z0-9_-]*)*)\\s*(>)\\s*|\\s+)(\\$?[A-Za-z_][A-Za-z0-9_-]*(?:\\$[A-Za-z_][A-Za-z0-9_-]*)*)\\b(?=\\s*\\{)",
|
|
1332
|
+
"beginCaptures": {
|
|
1333
|
+
"1": {
|
|
1334
|
+
"name": "keyword.declaration.client.baml"
|
|
1335
|
+
},
|
|
1336
|
+
"2": {
|
|
1337
|
+
"name": "punctuation.definition.type-parameters.begin.baml"
|
|
1338
|
+
},
|
|
1339
|
+
"3": {
|
|
1340
|
+
"name": "support.type.client.baml"
|
|
1341
|
+
},
|
|
1342
|
+
"4": {
|
|
1343
|
+
"name": "punctuation.definition.type-parameters.end.baml"
|
|
1344
|
+
},
|
|
1345
|
+
"5": {
|
|
1346
|
+
"name": "entity.name.client.baml"
|
|
1347
|
+
}
|
|
1348
|
+
},
|
|
1349
|
+
"end": "(?<=\\})",
|
|
1350
|
+
"patterns": [
|
|
1351
|
+
{
|
|
1352
|
+
"include": "#comments"
|
|
1353
|
+
},
|
|
1354
|
+
{
|
|
1355
|
+
"include": "#config-block"
|
|
1356
|
+
}
|
|
1357
|
+
]
|
|
1358
|
+
},
|
|
1359
|
+
"code-block": {
|
|
1360
|
+
"name": "meta.block.code.baml",
|
|
1361
|
+
"begin": "\\{",
|
|
1362
|
+
"beginCaptures": {
|
|
1363
|
+
"0": {
|
|
1364
|
+
"name": "punctuation.definition.block.begin.baml"
|
|
1365
|
+
}
|
|
1366
|
+
},
|
|
1367
|
+
"end": "\\}",
|
|
1368
|
+
"endCaptures": {
|
|
1369
|
+
"0": {
|
|
1370
|
+
"name": "punctuation.definition.block.end.baml"
|
|
1371
|
+
}
|
|
1372
|
+
},
|
|
1373
|
+
"patterns": [
|
|
1374
|
+
{
|
|
1375
|
+
"include": "#comments"
|
|
1376
|
+
},
|
|
1377
|
+
{
|
|
1378
|
+
"include": "#block-contents"
|
|
1379
|
+
}
|
|
1380
|
+
]
|
|
1381
|
+
},
|
|
1382
|
+
"colon-separator": {
|
|
1383
|
+
"name": "punctuation.separator.colon.baml",
|
|
1384
|
+
"match": ":"
|
|
1385
|
+
},
|
|
1386
|
+
"comma": {
|
|
1387
|
+
"name": "punctuation.separator.comma.baml",
|
|
1388
|
+
"match": ","
|
|
1389
|
+
},
|
|
1390
|
+
"comments": {
|
|
1391
|
+
"patterns": [
|
|
1392
|
+
{
|
|
1393
|
+
"include": "#line-comment"
|
|
1394
|
+
},
|
|
1395
|
+
{
|
|
1396
|
+
"include": "#block-comment"
|
|
1397
|
+
}
|
|
1398
|
+
]
|
|
1399
|
+
},
|
|
1400
|
+
"condition-expression": {
|
|
1401
|
+
"patterns": [
|
|
1402
|
+
{
|
|
1403
|
+
"include": "#literal"
|
|
1404
|
+
},
|
|
1405
|
+
{
|
|
1406
|
+
"include": "#array-expression"
|
|
1407
|
+
},
|
|
1408
|
+
{
|
|
1409
|
+
"include": "#lambda-expression"
|
|
1410
|
+
},
|
|
1411
|
+
{
|
|
1412
|
+
"include": "#parenthesized-expression"
|
|
1413
|
+
},
|
|
1414
|
+
{
|
|
1415
|
+
"include": "#if-expression"
|
|
1416
|
+
},
|
|
1417
|
+
{
|
|
1418
|
+
"include": "#match-expression"
|
|
1419
|
+
},
|
|
1420
|
+
{
|
|
1421
|
+
"include": "#spawn-expression"
|
|
1422
|
+
},
|
|
1423
|
+
{
|
|
1424
|
+
"include": "#map-expression"
|
|
1425
|
+
},
|
|
1426
|
+
{
|
|
1427
|
+
"include": "#code-block"
|
|
1428
|
+
},
|
|
1429
|
+
{
|
|
1430
|
+
"include": "#await-expression"
|
|
1431
|
+
},
|
|
1432
|
+
{
|
|
1433
|
+
"include": "#throw-expression"
|
|
1434
|
+
},
|
|
1435
|
+
{
|
|
1436
|
+
"include": "#catch-expression"
|
|
1437
|
+
},
|
|
1438
|
+
{
|
|
1439
|
+
"include": "#condition-is-pattern-expression"
|
|
1440
|
+
},
|
|
1441
|
+
{
|
|
1442
|
+
"include": "#optional-call-expression"
|
|
1443
|
+
},
|
|
1444
|
+
{
|
|
1445
|
+
"include": "#optional-index-expression"
|
|
1446
|
+
},
|
|
1447
|
+
{
|
|
1448
|
+
"include": "#optional-method-call-expression"
|
|
1449
|
+
},
|
|
1450
|
+
{
|
|
1451
|
+
"include": "#optional-field-access-expression"
|
|
1452
|
+
},
|
|
1453
|
+
{
|
|
1454
|
+
"include": "#upcast-expression"
|
|
1455
|
+
},
|
|
1456
|
+
{
|
|
1457
|
+
"include": "#postfix-method-call-expression"
|
|
1458
|
+
},
|
|
1459
|
+
{
|
|
1460
|
+
"include": "#field-access-expression"
|
|
1461
|
+
},
|
|
1462
|
+
{
|
|
1463
|
+
"include": "#expression-operator"
|
|
1464
|
+
},
|
|
1465
|
+
{
|
|
1466
|
+
"include": "#function-call-expression"
|
|
1467
|
+
},
|
|
1468
|
+
{
|
|
1469
|
+
"include": "#dotted-expression"
|
|
1470
|
+
}
|
|
1471
|
+
]
|
|
1472
|
+
},
|
|
1473
|
+
"condition-is-pattern-expression": {
|
|
1474
|
+
"name": "meta.expression.is.baml",
|
|
1475
|
+
"begin": "\\b(is)\\b",
|
|
1476
|
+
"beginCaptures": {
|
|
1477
|
+
"1": {
|
|
1478
|
+
"name": "keyword.operator.is.baml"
|
|
1479
|
+
}
|
|
1480
|
+
},
|
|
1481
|
+
"end": "(?=\\s*(?:&&|\\|\\||=>|[,);\\]}{]|$))",
|
|
1482
|
+
"patterns": [
|
|
1483
|
+
{
|
|
1484
|
+
"include": "#comments"
|
|
1485
|
+
},
|
|
1486
|
+
{
|
|
1487
|
+
"include": "#condition-pattern"
|
|
1488
|
+
}
|
|
1489
|
+
]
|
|
1490
|
+
},
|
|
1491
|
+
"condition-pattern": {
|
|
1492
|
+
"patterns": [
|
|
1493
|
+
{
|
|
1494
|
+
"include": "#comments"
|
|
1495
|
+
},
|
|
1496
|
+
{
|
|
1497
|
+
"include": "#wildcard-binding-pattern"
|
|
1498
|
+
},
|
|
1499
|
+
{
|
|
1500
|
+
"include": "#typed-binding-pattern"
|
|
1501
|
+
},
|
|
1502
|
+
{
|
|
1503
|
+
"include": "#array-destructure-pattern"
|
|
1504
|
+
},
|
|
1505
|
+
{
|
|
1506
|
+
"include": "#bare-binding-pattern"
|
|
1507
|
+
},
|
|
1508
|
+
{
|
|
1509
|
+
"include": "#wildcard-pattern"
|
|
1510
|
+
},
|
|
1511
|
+
{
|
|
1512
|
+
"include": "#type-expression"
|
|
1513
|
+
}
|
|
1514
|
+
]
|
|
1515
|
+
},
|
|
1516
|
+
"config-array": {
|
|
1517
|
+
"patterns": [
|
|
1518
|
+
{
|
|
1519
|
+
"include": "#config-array-body"
|
|
1520
|
+
}
|
|
1521
|
+
]
|
|
1522
|
+
},
|
|
1523
|
+
"config-array-body": {
|
|
1524
|
+
"name": "meta.config.array.baml",
|
|
1525
|
+
"begin": "\\[",
|
|
1526
|
+
"beginCaptures": {
|
|
1527
|
+
"0": {
|
|
1528
|
+
"name": "punctuation.definition.array.begin.baml"
|
|
1529
|
+
}
|
|
1530
|
+
},
|
|
1531
|
+
"end": "\\]",
|
|
1532
|
+
"endCaptures": {
|
|
1533
|
+
"0": {
|
|
1534
|
+
"name": "punctuation.definition.array.end.baml"
|
|
1535
|
+
}
|
|
1536
|
+
},
|
|
1537
|
+
"patterns": [
|
|
1538
|
+
{
|
|
1539
|
+
"include": "#comments"
|
|
1540
|
+
},
|
|
1541
|
+
{
|
|
1542
|
+
"include": "#config-block"
|
|
1543
|
+
},
|
|
1544
|
+
{
|
|
1545
|
+
"include": "#config-array"
|
|
1546
|
+
},
|
|
1547
|
+
{
|
|
1548
|
+
"include": "#expression"
|
|
1549
|
+
},
|
|
1550
|
+
{
|
|
1551
|
+
"include": "#comma"
|
|
1552
|
+
}
|
|
1553
|
+
]
|
|
1554
|
+
},
|
|
1555
|
+
"config-block": {
|
|
1556
|
+
"patterns": [
|
|
1557
|
+
{
|
|
1558
|
+
"include": "#config-block-body"
|
|
1559
|
+
}
|
|
1560
|
+
]
|
|
1561
|
+
},
|
|
1562
|
+
"config-block-body": {
|
|
1563
|
+
"name": "meta.config.block.baml",
|
|
1564
|
+
"begin": "\\{",
|
|
1565
|
+
"beginCaptures": {
|
|
1566
|
+
"0": {
|
|
1567
|
+
"name": "punctuation.definition.block.begin.baml"
|
|
1568
|
+
}
|
|
1569
|
+
},
|
|
1570
|
+
"end": "\\}",
|
|
1571
|
+
"endCaptures": {
|
|
1572
|
+
"0": {
|
|
1573
|
+
"name": "punctuation.definition.block.end.baml"
|
|
1574
|
+
}
|
|
1575
|
+
},
|
|
1576
|
+
"patterns": [
|
|
1577
|
+
{
|
|
1578
|
+
"include": "#comments"
|
|
1579
|
+
},
|
|
1580
|
+
{
|
|
1581
|
+
"include": "#config-field"
|
|
1582
|
+
},
|
|
1583
|
+
{
|
|
1584
|
+
"include": "#comma"
|
|
1585
|
+
}
|
|
1586
|
+
]
|
|
1587
|
+
},
|
|
1588
|
+
"config-field": {
|
|
1589
|
+
"name": "meta.field.config.baml",
|
|
1590
|
+
"begin": "(?:^\\s*|(?<=[\\{,])\\s*)(?:(\\$?[A-Za-z_][A-Za-z0-9_-]*(?:\\$[A-Za-z_][A-Za-z0-9_-]*)*)\\b|(\"(?:\\\\.|[^\"\\\\])*\"))\\s*(:)?",
|
|
1591
|
+
"beginCaptures": {
|
|
1592
|
+
"1": {
|
|
1593
|
+
"name": "variable.other.property.baml"
|
|
1594
|
+
},
|
|
1595
|
+
"2": {
|
|
1596
|
+
"patterns": [
|
|
1597
|
+
{
|
|
1598
|
+
"include": "#string-literal"
|
|
1599
|
+
}
|
|
1600
|
+
]
|
|
1601
|
+
},
|
|
1602
|
+
"3": {
|
|
1603
|
+
"name": "punctuation.separator.colon.baml"
|
|
1604
|
+
}
|
|
1605
|
+
},
|
|
1606
|
+
"end": "(?=,|\\r?\\n|\\})",
|
|
1607
|
+
"patterns": [
|
|
1608
|
+
{
|
|
1609
|
+
"include": "#comments"
|
|
1610
|
+
},
|
|
1611
|
+
{
|
|
1612
|
+
"include": "#config-block"
|
|
1613
|
+
},
|
|
1614
|
+
{
|
|
1615
|
+
"include": "#config-array"
|
|
1616
|
+
},
|
|
1617
|
+
{
|
|
1618
|
+
"include": "#expression"
|
|
1619
|
+
}
|
|
1620
|
+
]
|
|
1621
|
+
},
|
|
1622
|
+
"constructor-body": {
|
|
1623
|
+
"name": "meta.constructor.body.baml",
|
|
1624
|
+
"begin": "\\{",
|
|
1625
|
+
"beginCaptures": {
|
|
1626
|
+
"0": {
|
|
1627
|
+
"name": "punctuation.definition.constructor.body.begin.baml"
|
|
1628
|
+
}
|
|
1629
|
+
},
|
|
1630
|
+
"end": "\\}",
|
|
1631
|
+
"endCaptures": {
|
|
1632
|
+
"0": {
|
|
1633
|
+
"name": "punctuation.definition.constructor.body.end.baml"
|
|
1634
|
+
}
|
|
1635
|
+
},
|
|
1636
|
+
"patterns": [
|
|
1637
|
+
{
|
|
1638
|
+
"include": "#comments"
|
|
1639
|
+
},
|
|
1640
|
+
{
|
|
1641
|
+
"include": "#constructor-field"
|
|
1642
|
+
},
|
|
1643
|
+
{
|
|
1644
|
+
"include": "#comma"
|
|
1645
|
+
}
|
|
1646
|
+
]
|
|
1647
|
+
},
|
|
1648
|
+
"constructor-expression": {
|
|
1649
|
+
"name": "meta.constructor.expression.baml",
|
|
1650
|
+
"begin": "\\b\\$?[A-Za-z_][A-Za-z0-9_-]*(?:\\$[A-Za-z_][A-Za-z0-9_-]*)*(?:\\s*\\.\\s*\\$?[A-Za-z_][A-Za-z0-9_-]*(?:\\$[A-Za-z_][A-Za-z0-9_-]*)*)*\\b(?=\\s*(?:<[^{}=;\\r\\n]*>\\s*)?\\{)",
|
|
1651
|
+
"beginCaptures": {
|
|
1652
|
+
"0": {
|
|
1653
|
+
"patterns": [
|
|
1654
|
+
{
|
|
1655
|
+
"include": "#accessor-dot"
|
|
1656
|
+
},
|
|
1657
|
+
{
|
|
1658
|
+
"include": "#constructor-type"
|
|
1659
|
+
}
|
|
1660
|
+
]
|
|
1661
|
+
}
|
|
1662
|
+
},
|
|
1663
|
+
"end": "(?<=\\})",
|
|
1664
|
+
"patterns": [
|
|
1665
|
+
{
|
|
1666
|
+
"include": "#comments"
|
|
1667
|
+
},
|
|
1668
|
+
{
|
|
1669
|
+
"include": "#constructor-type-arguments"
|
|
1670
|
+
},
|
|
1671
|
+
{
|
|
1672
|
+
"include": "#constructor-body"
|
|
1673
|
+
}
|
|
1674
|
+
]
|
|
1675
|
+
},
|
|
1676
|
+
"constructor-field": {
|
|
1677
|
+
"name": "meta.constructor.field.baml",
|
|
1678
|
+
"begin": "\\b(\\$?[A-Za-z_][A-Za-z0-9_-]*(?:\\$[A-Za-z_][A-Za-z0-9_-]*)*)\\s*(:)",
|
|
1679
|
+
"beginCaptures": {
|
|
1680
|
+
"1": {
|
|
1681
|
+
"name": "variable.other.property.baml"
|
|
1682
|
+
},
|
|
1683
|
+
"2": {
|
|
1684
|
+
"name": "punctuation.separator.colon.baml"
|
|
1685
|
+
}
|
|
1686
|
+
},
|
|
1687
|
+
"end": "(?=,|\\})",
|
|
1688
|
+
"patterns": [
|
|
1689
|
+
{
|
|
1690
|
+
"include": "#comments"
|
|
1691
|
+
},
|
|
1692
|
+
{
|
|
1693
|
+
"include": "#expression"
|
|
1694
|
+
}
|
|
1695
|
+
]
|
|
1696
|
+
},
|
|
1697
|
+
"constructor-type": {
|
|
1698
|
+
"name": "entity.name.type.baml",
|
|
1699
|
+
"match": "\\b\\$?[A-Za-z_][A-Za-z0-9_-]*(?:\\$[A-Za-z_][A-Za-z0-9_-]*)*\\b"
|
|
1700
|
+
},
|
|
1701
|
+
"constructor-type-arguments": {
|
|
1702
|
+
"name": "meta.type-arguments.baml",
|
|
1703
|
+
"begin": "<",
|
|
1704
|
+
"beginCaptures": {
|
|
1705
|
+
"0": {
|
|
1706
|
+
"name": "punctuation.definition.type-arguments.begin.baml"
|
|
1707
|
+
}
|
|
1708
|
+
},
|
|
1709
|
+
"end": ">(?=\\s*\\{)",
|
|
1710
|
+
"endCaptures": {
|
|
1711
|
+
"0": {
|
|
1712
|
+
"name": "punctuation.definition.type-arguments.end.baml"
|
|
1713
|
+
}
|
|
1714
|
+
},
|
|
1715
|
+
"patterns": [
|
|
1716
|
+
{
|
|
1717
|
+
"include": "#comments"
|
|
1718
|
+
},
|
|
1719
|
+
{
|
|
1720
|
+
"include": "#type-expression"
|
|
1721
|
+
}
|
|
1722
|
+
]
|
|
1723
|
+
},
|
|
1724
|
+
"continue-statement": {
|
|
1725
|
+
"name": "meta.statement.continue.baml",
|
|
1726
|
+
"begin": "(?:^\\s*|\\G\\s*|(?<=[{;}])\\s*)(continue)\\b",
|
|
1727
|
+
"beginCaptures": {
|
|
1728
|
+
"1": {
|
|
1729
|
+
"name": "keyword.control.flow.continue.baml"
|
|
1730
|
+
}
|
|
1731
|
+
},
|
|
1732
|
+
"end": "(?=[;}]|$)",
|
|
1733
|
+
"patterns": [
|
|
1734
|
+
{
|
|
1735
|
+
"include": "#comments"
|
|
1736
|
+
}
|
|
1737
|
+
]
|
|
1738
|
+
},
|
|
1739
|
+
"declaration-type-parameter": {
|
|
1740
|
+
"name": "meta.type-parameter.baml",
|
|
1741
|
+
"begin": "\\b(\\$?[A-Za-z_][A-Za-z0-9_-]*(?:\\$[A-Za-z_][A-Za-z0-9_-]*)*)\\b",
|
|
1742
|
+
"beginCaptures": {
|
|
1743
|
+
"1": {
|
|
1744
|
+
"name": "entity.name.type.parameter.baml"
|
|
1745
|
+
}
|
|
1746
|
+
},
|
|
1747
|
+
"end": "(?=,|>(?=\\s*(?:\\(|\\{|requires\\b|\\$?[A-Za-z_][A-Za-z0-9_-]*(?:\\$[A-Za-z_][A-Za-z0-9_-]*)*)))",
|
|
1748
|
+
"patterns": [
|
|
1749
|
+
{
|
|
1750
|
+
"include": "#comments"
|
|
1751
|
+
},
|
|
1752
|
+
{
|
|
1753
|
+
"include": "#declaration-type-parameter-extends"
|
|
1754
|
+
},
|
|
1755
|
+
{
|
|
1756
|
+
"include": "#declaration-type-parameter-intersection"
|
|
1757
|
+
},
|
|
1758
|
+
{
|
|
1759
|
+
"include": "#type-expression"
|
|
1760
|
+
}
|
|
1761
|
+
]
|
|
1762
|
+
},
|
|
1763
|
+
"declaration-type-parameter-extends": {
|
|
1764
|
+
"name": "keyword.operator.extends.baml",
|
|
1765
|
+
"match": "\\bextends\\b"
|
|
1766
|
+
},
|
|
1767
|
+
"declaration-type-parameter-intersection": {
|
|
1768
|
+
"name": "keyword.operator.type.baml",
|
|
1769
|
+
"match": "&"
|
|
1770
|
+
},
|
|
1771
|
+
"declaration-type-parameters": {
|
|
1772
|
+
"name": "meta.type-parameters.baml",
|
|
1773
|
+
"begin": "<",
|
|
1774
|
+
"beginCaptures": {
|
|
1775
|
+
"0": {
|
|
1776
|
+
"name": "punctuation.definition.type-parameters.begin.baml"
|
|
1777
|
+
}
|
|
1778
|
+
},
|
|
1779
|
+
"end": ">(?=\\s*(?:\\(|\\{|requires\\b|\\$?[A-Za-z_][A-Za-z0-9_-]*(?:\\$[A-Za-z_][A-Za-z0-9_-]*)*))",
|
|
1780
|
+
"endCaptures": {
|
|
1781
|
+
"0": {
|
|
1782
|
+
"name": "punctuation.definition.type-parameters.end.baml"
|
|
1783
|
+
}
|
|
1784
|
+
},
|
|
1785
|
+
"patterns": [
|
|
1786
|
+
{
|
|
1787
|
+
"include": "#comments"
|
|
1788
|
+
},
|
|
1789
|
+
{
|
|
1790
|
+
"include": "#declaration-type-parameter"
|
|
1791
|
+
},
|
|
1792
|
+
{
|
|
1793
|
+
"include": "#comma"
|
|
1794
|
+
}
|
|
1795
|
+
]
|
|
1796
|
+
},
|
|
1797
|
+
"defer-statement": {
|
|
1798
|
+
"name": "meta.statement.defer.baml",
|
|
1799
|
+
"begin": "(?:^\\s*|\\G\\s*|(?<=[{;}])\\s*)(defer)\\b",
|
|
1800
|
+
"beginCaptures": {
|
|
1801
|
+
"1": {
|
|
1802
|
+
"name": "keyword.control.flow.defer.baml"
|
|
1803
|
+
}
|
|
1804
|
+
},
|
|
1805
|
+
"end": "(?<=\\})",
|
|
1806
|
+
"patterns": [
|
|
1807
|
+
{
|
|
1808
|
+
"include": "#comments"
|
|
1809
|
+
},
|
|
1810
|
+
{
|
|
1811
|
+
"include": "#code-block"
|
|
1812
|
+
}
|
|
1813
|
+
]
|
|
1814
|
+
},
|
|
1815
|
+
"dotted-expression": {
|
|
1816
|
+
"name": "meta.dotted-expression.baml",
|
|
1817
|
+
"match": "\\b(\\$?[A-Za-z_][A-Za-z0-9_-]*(?:\\$[A-Za-z_][A-Za-z0-9_-]*)*)((?:\\s*\\.\\s*(?!as\\b\\s*<)\\$?[A-Za-z_][A-Za-z0-9_-]*(?:\\$[A-Za-z_][A-Za-z0-9_-]*)*)*)\\b",
|
|
1818
|
+
"captures": {
|
|
1819
|
+
"1": {
|
|
1820
|
+
"patterns": [
|
|
1821
|
+
{
|
|
1822
|
+
"include": "#namespace-root"
|
|
1823
|
+
},
|
|
1824
|
+
{
|
|
1825
|
+
"include": "#environment-expression-root"
|
|
1826
|
+
},
|
|
1827
|
+
{
|
|
1828
|
+
"include": "#self-expression-root"
|
|
1829
|
+
},
|
|
1830
|
+
{
|
|
1831
|
+
"include": "#expression-identifier"
|
|
1832
|
+
}
|
|
1833
|
+
]
|
|
1834
|
+
},
|
|
1835
|
+
"2": {
|
|
1836
|
+
"patterns": [
|
|
1837
|
+
{
|
|
1838
|
+
"include": "#accessor-dot"
|
|
1839
|
+
},
|
|
1840
|
+
{
|
|
1841
|
+
"include": "#expression-identifier"
|
|
1842
|
+
}
|
|
1843
|
+
]
|
|
1844
|
+
}
|
|
1845
|
+
}
|
|
1846
|
+
},
|
|
1847
|
+
"enum": {
|
|
1848
|
+
"name": "meta.enum.baml",
|
|
1849
|
+
"begin": "^\\s*(enum)\\b",
|
|
1850
|
+
"beginCaptures": {
|
|
1851
|
+
"1": {
|
|
1852
|
+
"name": "keyword.declaration.enum.baml"
|
|
1853
|
+
}
|
|
1854
|
+
},
|
|
1855
|
+
"end": "(?<=\\})|(?=^\\s*(?:client|retry_policy|generator|template_string|class|enum|interface|implements|implement|function|testset|test|type)\\b)",
|
|
1856
|
+
"patterns": [
|
|
1857
|
+
{
|
|
1858
|
+
"include": "#comments"
|
|
1859
|
+
},
|
|
1860
|
+
{
|
|
1861
|
+
"include": "#enum-header"
|
|
1862
|
+
},
|
|
1863
|
+
{
|
|
1864
|
+
"include": "#enum-body"
|
|
1865
|
+
}
|
|
1866
|
+
]
|
|
1867
|
+
},
|
|
1868
|
+
"enum-body": {
|
|
1869
|
+
"name": "meta.enum.body.baml",
|
|
1870
|
+
"begin": "\\{",
|
|
1871
|
+
"beginCaptures": {
|
|
1872
|
+
"0": {
|
|
1873
|
+
"name": "punctuation.definition.block.begin.baml"
|
|
1874
|
+
}
|
|
1875
|
+
},
|
|
1876
|
+
"end": "\\}|(?=^\\s*(?:client|retry_policy|generator|template_string|class|enum|interface|implements|implement|function|testset|test|type)\\b)",
|
|
1877
|
+
"endCaptures": {
|
|
1878
|
+
"0": {
|
|
1879
|
+
"name": "punctuation.definition.block.end.baml"
|
|
1880
|
+
}
|
|
1881
|
+
},
|
|
1882
|
+
"patterns": [
|
|
1883
|
+
{
|
|
1884
|
+
"include": "#comments"
|
|
1885
|
+
},
|
|
1886
|
+
{
|
|
1887
|
+
"include": "#block-attribute"
|
|
1888
|
+
},
|
|
1889
|
+
{
|
|
1890
|
+
"include": "#enum-variant"
|
|
1891
|
+
},
|
|
1892
|
+
{
|
|
1893
|
+
"include": "#comma"
|
|
1894
|
+
}
|
|
1895
|
+
]
|
|
1896
|
+
},
|
|
1897
|
+
"enum-header": {
|
|
1898
|
+
"name": "meta.enum.header.baml",
|
|
1899
|
+
"begin": "\\G\\s*",
|
|
1900
|
+
"end": "(?=\\{)|(?=^\\s*(?:client|retry_policy|generator|template_string|class|enum|interface|implements|implement|function|testset|test|type)\\b)",
|
|
1901
|
+
"patterns": [
|
|
1902
|
+
{
|
|
1903
|
+
"include": "#comments"
|
|
1904
|
+
},
|
|
1905
|
+
{
|
|
1906
|
+
"include": "#enum-name"
|
|
1907
|
+
}
|
|
1908
|
+
]
|
|
1909
|
+
},
|
|
1910
|
+
"enum-name": {
|
|
1911
|
+
"name": "entity.name.type.enum.baml",
|
|
1912
|
+
"match": "\\b\\$?[A-Za-z_][A-Za-z0-9_-]*(?:\\$[A-Za-z_][A-Za-z0-9_-]*)*\\b"
|
|
1913
|
+
},
|
|
1914
|
+
"enum-variant": {
|
|
1915
|
+
"name": "meta.enum.variant.baml",
|
|
1916
|
+
"begin": "(?:^\\s*|(?<=[\\{,])\\s*|\\s+)(\\$?[A-Za-z_][A-Za-z0-9_-]*(?:\\$[A-Za-z_][A-Za-z0-9_-]*)*)\\b",
|
|
1917
|
+
"beginCaptures": {
|
|
1918
|
+
"1": {
|
|
1919
|
+
"name": "variable.other.enummember.baml"
|
|
1920
|
+
}
|
|
1921
|
+
},
|
|
1922
|
+
"end": "(?=,|\\s+@@|\\s*\\}|\\s+\\$?[A-Za-z_][A-Za-z0-9_-]*(?:\\$[A-Za-z_][A-Za-z0-9_-]*)*\\b|\\r?\\n\\s*(?:\\$?[A-Za-z_][A-Za-z0-9_-]*(?:\\$[A-Za-z_][A-Za-z0-9_-]*)*\\b|@@|\\}))",
|
|
1923
|
+
"patterns": [
|
|
1924
|
+
{
|
|
1925
|
+
"include": "#comments"
|
|
1926
|
+
},
|
|
1927
|
+
{
|
|
1928
|
+
"include": "#bare-attribute"
|
|
1929
|
+
},
|
|
1930
|
+
{
|
|
1931
|
+
"include": "#attribute"
|
|
1932
|
+
}
|
|
1933
|
+
]
|
|
1934
|
+
},
|
|
1935
|
+
"environment-expression-root": {
|
|
1936
|
+
"name": "support.other.namespace.baml",
|
|
1937
|
+
"match": "\\benv\\b"
|
|
1938
|
+
},
|
|
1939
|
+
"expression": {
|
|
1940
|
+
"patterns": [
|
|
1941
|
+
{
|
|
1942
|
+
"include": "#literal"
|
|
1943
|
+
},
|
|
1944
|
+
{
|
|
1945
|
+
"include": "#array-expression"
|
|
1946
|
+
},
|
|
1947
|
+
{
|
|
1948
|
+
"include": "#lambda-expression"
|
|
1949
|
+
},
|
|
1950
|
+
{
|
|
1951
|
+
"include": "#parenthesized-expression"
|
|
1952
|
+
},
|
|
1953
|
+
{
|
|
1954
|
+
"include": "#if-expression"
|
|
1955
|
+
},
|
|
1956
|
+
{
|
|
1957
|
+
"include": "#match-expression"
|
|
1958
|
+
},
|
|
1959
|
+
{
|
|
1960
|
+
"include": "#spawn-expression"
|
|
1961
|
+
},
|
|
1962
|
+
{
|
|
1963
|
+
"include": "#constructor-expression"
|
|
1964
|
+
},
|
|
1965
|
+
{
|
|
1966
|
+
"include": "#map-expression"
|
|
1967
|
+
},
|
|
1968
|
+
{
|
|
1969
|
+
"include": "#code-block"
|
|
1970
|
+
},
|
|
1971
|
+
{
|
|
1972
|
+
"include": "#await-expression"
|
|
1973
|
+
},
|
|
1974
|
+
{
|
|
1975
|
+
"include": "#throw-expression"
|
|
1976
|
+
},
|
|
1977
|
+
{
|
|
1978
|
+
"include": "#catch-expression"
|
|
1979
|
+
},
|
|
1980
|
+
{
|
|
1981
|
+
"include": "#is-pattern-expression"
|
|
1982
|
+
},
|
|
1983
|
+
{
|
|
1984
|
+
"include": "#optional-call-expression"
|
|
1985
|
+
},
|
|
1986
|
+
{
|
|
1987
|
+
"include": "#optional-index-expression"
|
|
1988
|
+
},
|
|
1989
|
+
{
|
|
1990
|
+
"include": "#optional-method-call-expression"
|
|
1991
|
+
},
|
|
1992
|
+
{
|
|
1993
|
+
"include": "#optional-field-access-expression"
|
|
1994
|
+
},
|
|
1995
|
+
{
|
|
1996
|
+
"include": "#upcast-expression"
|
|
1997
|
+
},
|
|
1998
|
+
{
|
|
1999
|
+
"include": "#postfix-method-call-expression"
|
|
2000
|
+
},
|
|
2001
|
+
{
|
|
2002
|
+
"include": "#field-access-expression"
|
|
2003
|
+
},
|
|
2004
|
+
{
|
|
2005
|
+
"include": "#expression-operator"
|
|
2006
|
+
},
|
|
2007
|
+
{
|
|
2008
|
+
"include": "#function-call-expression"
|
|
2009
|
+
},
|
|
2010
|
+
{
|
|
2011
|
+
"include": "#dotted-expression"
|
|
2012
|
+
}
|
|
2013
|
+
]
|
|
2014
|
+
},
|
|
2015
|
+
"expression-accessor-operator": {
|
|
2016
|
+
"name": "punctuation.accessor.baml",
|
|
2017
|
+
"match": "\\?\\.|\\.|\\$"
|
|
2018
|
+
},
|
|
2019
|
+
"expression-arithmetic-operator": {
|
|
2020
|
+
"name": "keyword.operator.arithmetic.baml",
|
|
2021
|
+
"match": "\\+\\+|--|\\+|-|\\*|/|%"
|
|
2022
|
+
},
|
|
2023
|
+
"expression-arrow-operator": {
|
|
2024
|
+
"name": "keyword.operator.arrow.baml",
|
|
2025
|
+
"match": "=>|->"
|
|
2026
|
+
},
|
|
2027
|
+
"expression-bitwise-operator": {
|
|
2028
|
+
"name": "keyword.operator.bitwise.baml",
|
|
2029
|
+
"match": "&|\\^|~|\\|"
|
|
2030
|
+
},
|
|
2031
|
+
"expression-comparison-operator": {
|
|
2032
|
+
"name": "keyword.operator.comparison.baml",
|
|
2033
|
+
"match": "<=|>=|<|>"
|
|
2034
|
+
},
|
|
2035
|
+
"expression-compound-assignment-operator": {
|
|
2036
|
+
"name": "keyword.operator.assignment.baml",
|
|
2037
|
+
"match": "<<=|>>=|\\+=|-=|\\*=|/=|%=|&=|\\|=|\\^="
|
|
2038
|
+
},
|
|
2039
|
+
"expression-equality-operator": {
|
|
2040
|
+
"name": "keyword.operator.comparison.baml",
|
|
2041
|
+
"match": "==|!="
|
|
2042
|
+
},
|
|
2043
|
+
"expression-identifier": {
|
|
2044
|
+
"name": "variable.other.readwrite.baml",
|
|
2045
|
+
"match": "\\b\\$?[A-Za-z_][A-Za-z0-9_-]*(?:\\$[A-Za-z_][A-Za-z0-9_-]*)*\\b"
|
|
2046
|
+
},
|
|
2047
|
+
"expression-logical-operator": {
|
|
2048
|
+
"name": "keyword.operator.logical.baml",
|
|
2049
|
+
"match": "&&|\\|\\||!"
|
|
2050
|
+
},
|
|
2051
|
+
"expression-nullish-operator": {
|
|
2052
|
+
"name": "keyword.operator.nullish.baml",
|
|
2053
|
+
"match": "\\?\\?"
|
|
2054
|
+
},
|
|
2055
|
+
"expression-operator": {
|
|
2056
|
+
"patterns": [
|
|
2057
|
+
{
|
|
2058
|
+
"include": "#expression-arrow-operator"
|
|
2059
|
+
},
|
|
2060
|
+
{
|
|
2061
|
+
"include": "#expression-compound-assignment-operator"
|
|
2062
|
+
},
|
|
2063
|
+
{
|
|
2064
|
+
"include": "#expression-nullish-operator"
|
|
2065
|
+
},
|
|
2066
|
+
{
|
|
2067
|
+
"include": "#expression-logical-operator"
|
|
2068
|
+
},
|
|
2069
|
+
{
|
|
2070
|
+
"include": "#expression-equality-operator"
|
|
2071
|
+
},
|
|
2072
|
+
{
|
|
2073
|
+
"include": "#expression-shift-operator"
|
|
2074
|
+
},
|
|
2075
|
+
{
|
|
2076
|
+
"include": "#expression-comparison-operator"
|
|
2077
|
+
},
|
|
2078
|
+
{
|
|
2079
|
+
"include": "#expression-bitwise-operator"
|
|
2080
|
+
},
|
|
2081
|
+
{
|
|
2082
|
+
"include": "#expression-arithmetic-operator"
|
|
2083
|
+
},
|
|
2084
|
+
{
|
|
2085
|
+
"include": "#assignment-operator"
|
|
2086
|
+
},
|
|
2087
|
+
{
|
|
2088
|
+
"include": "#expression-spread-operator"
|
|
2089
|
+
},
|
|
2090
|
+
{
|
|
2091
|
+
"include": "#expression-accessor-operator"
|
|
2092
|
+
}
|
|
2093
|
+
]
|
|
2094
|
+
},
|
|
2095
|
+
"expression-shift-operator": {
|
|
2096
|
+
"name": "keyword.operator.bitwise.shift.baml",
|
|
2097
|
+
"match": "<<|>>"
|
|
2098
|
+
},
|
|
2099
|
+
"expression-spread-operator": {
|
|
2100
|
+
"name": "keyword.operator.spread.baml",
|
|
2101
|
+
"match": "\\.\\.\\."
|
|
2102
|
+
},
|
|
2103
|
+
"field": {
|
|
2104
|
+
"name": "meta.field.baml",
|
|
2105
|
+
"begin": "(?:^\\s*|(?<=\\{)\\s*)(?!@)(\\$?[A-Za-z_][A-Za-z0-9_-]*(?:\\$[A-Za-z_][A-Za-z0-9_-]*)*)\\s*(:)?",
|
|
2106
|
+
"beginCaptures": {
|
|
2107
|
+
"1": {
|
|
2108
|
+
"name": "variable.other.property.baml"
|
|
2109
|
+
},
|
|
2110
|
+
"2": {
|
|
2111
|
+
"name": "punctuation.separator.colon.baml"
|
|
2112
|
+
}
|
|
2113
|
+
},
|
|
2114
|
+
"end": "(?=\\})|$",
|
|
2115
|
+
"patterns": [
|
|
2116
|
+
{
|
|
2117
|
+
"include": "#comments"
|
|
2118
|
+
},
|
|
2119
|
+
{
|
|
2120
|
+
"include": "#type-expression"
|
|
2121
|
+
}
|
|
2122
|
+
]
|
|
2123
|
+
},
|
|
2124
|
+
"field-access-expression": {
|
|
2125
|
+
"name": "meta.field-access.baml",
|
|
2126
|
+
"match": "([.$])\\s*(\\$?[A-Za-z_][A-Za-z0-9_-]*(?:\\$[A-Za-z_][A-Za-z0-9_-]*)*)\\b",
|
|
2127
|
+
"captures": {
|
|
2128
|
+
"1": {
|
|
2129
|
+
"name": "punctuation.accessor.baml"
|
|
2130
|
+
},
|
|
2131
|
+
"2": {
|
|
2132
|
+
"name": "variable.other.readwrite.baml"
|
|
2133
|
+
}
|
|
2134
|
+
}
|
|
2135
|
+
},
|
|
2136
|
+
"float-literal": {
|
|
2137
|
+
"name": "constant.numeric.float.baml",
|
|
2138
|
+
"match": "\\b[0-9]+(?:\\.[0-9]+[eE][+-]?[0-9]+|\\.[0-9]+|[eE][+-]?[0-9]+)"
|
|
2139
|
+
},
|
|
2140
|
+
"for-c-style-let-initializer": {
|
|
2141
|
+
"name": "meta.for.initializer.baml",
|
|
2142
|
+
"begin": "(?=(?:let|const)\\b)",
|
|
2143
|
+
"end": "(?=;)",
|
|
2144
|
+
"patterns": [
|
|
2145
|
+
{
|
|
2146
|
+
"include": "#comments"
|
|
2147
|
+
},
|
|
2148
|
+
{
|
|
2149
|
+
"include": "#pattern"
|
|
2150
|
+
},
|
|
2151
|
+
{
|
|
2152
|
+
"include": "#let-else-clause"
|
|
2153
|
+
},
|
|
2154
|
+
{
|
|
2155
|
+
"include": "#expression"
|
|
2156
|
+
}
|
|
2157
|
+
]
|
|
2158
|
+
},
|
|
2159
|
+
"for-in-keyword": {
|
|
2160
|
+
"name": "keyword.operator.in.baml",
|
|
2161
|
+
"match": "\\bin\\b"
|
|
2162
|
+
},
|
|
2163
|
+
"for-in-pattern": {
|
|
2164
|
+
"name": "meta.pattern.for-in.baml",
|
|
2165
|
+
"begin": "(?=(?:let|const)\\b)",
|
|
2166
|
+
"end": "(?=\\s+in\\b)",
|
|
2167
|
+
"patterns": [
|
|
2168
|
+
{
|
|
2169
|
+
"include": "#comments"
|
|
2170
|
+
},
|
|
2171
|
+
{
|
|
2172
|
+
"include": "#pattern"
|
|
2173
|
+
}
|
|
2174
|
+
]
|
|
2175
|
+
},
|
|
2176
|
+
"for-parenthesized-c-style-header": {
|
|
2177
|
+
"name": "meta.for.header.baml",
|
|
2178
|
+
"begin": "\\G\\s*(\\()",
|
|
2179
|
+
"beginCaptures": {
|
|
2180
|
+
"1": {
|
|
2181
|
+
"name": "punctuation.definition.for-header.begin.baml"
|
|
2182
|
+
}
|
|
2183
|
+
},
|
|
2184
|
+
"end": "\\)(?=\\s*\\{)",
|
|
2185
|
+
"endCaptures": {
|
|
2186
|
+
"0": {
|
|
2187
|
+
"name": "punctuation.definition.for-header.end.baml"
|
|
2188
|
+
}
|
|
2189
|
+
},
|
|
2190
|
+
"patterns": [
|
|
2191
|
+
{
|
|
2192
|
+
"include": "#comments"
|
|
2193
|
+
},
|
|
2194
|
+
{
|
|
2195
|
+
"include": "#for-c-style-let-initializer"
|
|
2196
|
+
},
|
|
2197
|
+
{
|
|
2198
|
+
"include": "#semicolon"
|
|
2199
|
+
},
|
|
2200
|
+
{
|
|
2201
|
+
"include": "#expression"
|
|
2202
|
+
}
|
|
2203
|
+
]
|
|
2204
|
+
},
|
|
2205
|
+
"for-parenthesized-in-header": {
|
|
2206
|
+
"name": "meta.for.header.baml",
|
|
2207
|
+
"begin": "\\G\\s*(\\()(?=\\s*(?:let|const)\\b(?:(?![=;]).)*\\bin\\b)",
|
|
2208
|
+
"beginCaptures": {
|
|
2209
|
+
"1": {
|
|
2210
|
+
"name": "punctuation.definition.for-header.begin.baml"
|
|
2211
|
+
}
|
|
2212
|
+
},
|
|
2213
|
+
"end": "\\)(?=\\s*\\{)",
|
|
2214
|
+
"endCaptures": {
|
|
2215
|
+
"0": {
|
|
2216
|
+
"name": "punctuation.definition.for-header.end.baml"
|
|
2217
|
+
}
|
|
2218
|
+
},
|
|
2219
|
+
"patterns": [
|
|
2220
|
+
{
|
|
2221
|
+
"include": "#comments"
|
|
2222
|
+
},
|
|
2223
|
+
{
|
|
2224
|
+
"include": "#for-in-pattern"
|
|
2225
|
+
},
|
|
2226
|
+
{
|
|
2227
|
+
"include": "#for-in-keyword"
|
|
2228
|
+
},
|
|
2229
|
+
{
|
|
2230
|
+
"include": "#expression"
|
|
2231
|
+
}
|
|
2232
|
+
]
|
|
2233
|
+
},
|
|
2234
|
+
"for-statement": {
|
|
2235
|
+
"name": "meta.statement.for.baml",
|
|
2236
|
+
"begin": "\\b(for)\\b",
|
|
2237
|
+
"beginCaptures": {
|
|
2238
|
+
"1": {
|
|
2239
|
+
"name": "keyword.control.loop.for.baml"
|
|
2240
|
+
}
|
|
2241
|
+
},
|
|
2242
|
+
"end": "(?<=\\})(?=\\s*(?:;|$))|(?=;|$)",
|
|
2243
|
+
"patterns": [
|
|
2244
|
+
{
|
|
2245
|
+
"include": "#comments"
|
|
2246
|
+
},
|
|
2247
|
+
{
|
|
2248
|
+
"include": "#for-parenthesized-in-header"
|
|
2249
|
+
},
|
|
2250
|
+
{
|
|
2251
|
+
"include": "#for-parenthesized-c-style-header"
|
|
2252
|
+
},
|
|
2253
|
+
{
|
|
2254
|
+
"include": "#for-unparenthesized-header"
|
|
2255
|
+
},
|
|
2256
|
+
{
|
|
2257
|
+
"include": "#code-block"
|
|
2258
|
+
}
|
|
2259
|
+
]
|
|
2260
|
+
},
|
|
2261
|
+
"for-unparenthesized-header": {
|
|
2262
|
+
"name": "meta.for.header.baml",
|
|
2263
|
+
"begin": "\\G\\s*(?=(?:let|const)\\b)",
|
|
2264
|
+
"end": "(?=\\{)",
|
|
2265
|
+
"patterns": [
|
|
2266
|
+
{
|
|
2267
|
+
"include": "#comments"
|
|
2268
|
+
},
|
|
2269
|
+
{
|
|
2270
|
+
"include": "#for-in-pattern"
|
|
2271
|
+
},
|
|
2272
|
+
{
|
|
2273
|
+
"include": "#for-in-keyword"
|
|
2274
|
+
},
|
|
2275
|
+
{
|
|
2276
|
+
"include": "#condition-expression"
|
|
2277
|
+
}
|
|
2278
|
+
]
|
|
2279
|
+
},
|
|
2280
|
+
"function": {
|
|
2281
|
+
"name": "meta.function.baml",
|
|
2282
|
+
"begin": "^\\s*(function)\\s+(\\$?[A-Za-z_][A-Za-z0-9_-]*(?:\\$[A-Za-z_][A-Za-z0-9_-]*)*)\\b",
|
|
2283
|
+
"beginCaptures": {
|
|
2284
|
+
"1": {
|
|
2285
|
+
"name": "keyword.declaration.function.baml"
|
|
2286
|
+
},
|
|
2287
|
+
"2": {
|
|
2288
|
+
"name": "entity.name.function.baml"
|
|
2289
|
+
}
|
|
2290
|
+
},
|
|
2291
|
+
"end": "(?<=\\})",
|
|
2292
|
+
"patterns": [
|
|
2293
|
+
{
|
|
2294
|
+
"include": "#comments"
|
|
2295
|
+
},
|
|
2296
|
+
{
|
|
2297
|
+
"include": "#declaration-type-parameters"
|
|
2298
|
+
},
|
|
2299
|
+
{
|
|
2300
|
+
"include": "#function-parameters"
|
|
2301
|
+
},
|
|
2302
|
+
{
|
|
2303
|
+
"include": "#function-return-type"
|
|
2304
|
+
},
|
|
2305
|
+
{
|
|
2306
|
+
"include": "#function-block"
|
|
2307
|
+
}
|
|
2308
|
+
]
|
|
2309
|
+
},
|
|
2310
|
+
"function-block": {
|
|
2311
|
+
"name": "meta.block.function.baml",
|
|
2312
|
+
"begin": "\\{",
|
|
2313
|
+
"beginCaptures": {
|
|
2314
|
+
"0": {
|
|
2315
|
+
"name": "punctuation.definition.block.begin.baml"
|
|
2316
|
+
}
|
|
2317
|
+
},
|
|
2318
|
+
"end": "\\}",
|
|
2319
|
+
"endCaptures": {
|
|
2320
|
+
"0": {
|
|
2321
|
+
"name": "punctuation.definition.block.end.baml"
|
|
2322
|
+
}
|
|
2323
|
+
},
|
|
2324
|
+
"patterns": [
|
|
2325
|
+
{
|
|
2326
|
+
"include": "#llm-client-field"
|
|
2327
|
+
},
|
|
2328
|
+
{
|
|
2329
|
+
"include": "#llm-prompt-field"
|
|
2330
|
+
},
|
|
2331
|
+
{
|
|
2332
|
+
"include": "#block-contents"
|
|
2333
|
+
}
|
|
2334
|
+
]
|
|
2335
|
+
},
|
|
2336
|
+
"function-call-expression": {
|
|
2337
|
+
"name": "meta.function-call.baml",
|
|
2338
|
+
"begin": "\\b(?:(\\$?[A-Za-z_][A-Za-z0-9_-]*(?:\\$[A-Za-z_][A-Za-z0-9_-]*)*)\\s*(\\.)\\s*)?((?:\\$?[A-Za-z_][A-Za-z0-9_-]*(?:\\$[A-Za-z_][A-Za-z0-9_-]*)*\\s*\\.\\s*)*)(\\$?[A-Za-z_][A-Za-z0-9_-]*(?:\\$[A-Za-z_][A-Za-z0-9_-]*)*)\\b(?=\\s*(?:<[^(){};]*>\\s*)?\\()",
|
|
2339
|
+
"beginCaptures": {
|
|
2340
|
+
"1": {
|
|
2341
|
+
"patterns": [
|
|
2342
|
+
{
|
|
2343
|
+
"include": "#namespace-root"
|
|
2344
|
+
},
|
|
2345
|
+
{
|
|
2346
|
+
"include": "#environment-expression-root"
|
|
2347
|
+
},
|
|
2348
|
+
{
|
|
2349
|
+
"include": "#self-expression-root"
|
|
2350
|
+
},
|
|
2351
|
+
{
|
|
2352
|
+
"include": "#expression-identifier"
|
|
2353
|
+
}
|
|
2354
|
+
]
|
|
2355
|
+
},
|
|
2356
|
+
"2": {
|
|
2357
|
+
"name": "punctuation.accessor.baml"
|
|
2358
|
+
},
|
|
2359
|
+
"3": {
|
|
2360
|
+
"patterns": [
|
|
2361
|
+
{
|
|
2362
|
+
"include": "#accessor-dot"
|
|
2363
|
+
},
|
|
2364
|
+
{
|
|
2365
|
+
"include": "#expression-identifier"
|
|
2366
|
+
}
|
|
2367
|
+
]
|
|
2368
|
+
},
|
|
2369
|
+
"4": {
|
|
2370
|
+
"name": "entity.name.function.baml"
|
|
2371
|
+
}
|
|
2372
|
+
},
|
|
2373
|
+
"end": "(?<=\\))",
|
|
2374
|
+
"patterns": [
|
|
2375
|
+
{
|
|
2376
|
+
"include": "#comments"
|
|
2377
|
+
},
|
|
2378
|
+
{
|
|
2379
|
+
"include": "#function-call-type-arguments"
|
|
2380
|
+
},
|
|
2381
|
+
{
|
|
2382
|
+
"include": "#call-arguments"
|
|
2383
|
+
}
|
|
2384
|
+
]
|
|
2385
|
+
},
|
|
2386
|
+
"function-call-type-arguments": {
|
|
2387
|
+
"name": "meta.type-arguments.baml",
|
|
2388
|
+
"begin": "<",
|
|
2389
|
+
"beginCaptures": {
|
|
2390
|
+
"0": {
|
|
2391
|
+
"name": "punctuation.definition.type-arguments.begin.baml"
|
|
2392
|
+
}
|
|
2393
|
+
},
|
|
2394
|
+
"end": ">(?=\\s*\\()",
|
|
2395
|
+
"endCaptures": {
|
|
2396
|
+
"0": {
|
|
2397
|
+
"name": "punctuation.definition.type-arguments.end.baml"
|
|
2398
|
+
}
|
|
2399
|
+
},
|
|
2400
|
+
"patterns": [
|
|
2401
|
+
{
|
|
2402
|
+
"include": "#comments"
|
|
2403
|
+
},
|
|
2404
|
+
{
|
|
2405
|
+
"include": "#type-expression"
|
|
2406
|
+
}
|
|
2407
|
+
]
|
|
2408
|
+
},
|
|
2409
|
+
"function-parameters": {
|
|
2410
|
+
"name": "meta.parameters.baml",
|
|
2411
|
+
"begin": "\\(",
|
|
2412
|
+
"beginCaptures": {
|
|
2413
|
+
"0": {
|
|
2414
|
+
"name": "punctuation.definition.parameters.begin.baml"
|
|
2415
|
+
}
|
|
2416
|
+
},
|
|
2417
|
+
"end": "\\)",
|
|
2418
|
+
"endCaptures": {
|
|
2419
|
+
"0": {
|
|
2420
|
+
"name": "punctuation.definition.parameters.end.baml"
|
|
2421
|
+
}
|
|
2422
|
+
},
|
|
2423
|
+
"patterns": [
|
|
2424
|
+
{
|
|
2425
|
+
"include": "#comments"
|
|
2426
|
+
},
|
|
2427
|
+
{
|
|
2428
|
+
"include": "#self-parameter"
|
|
2429
|
+
},
|
|
2430
|
+
{
|
|
2431
|
+
"include": "#parameter"
|
|
2432
|
+
},
|
|
2433
|
+
{
|
|
2434
|
+
"include": "#comma"
|
|
2435
|
+
}
|
|
2436
|
+
]
|
|
2437
|
+
},
|
|
2438
|
+
"function-return-type": {
|
|
2439
|
+
"name": "meta.return-type.baml",
|
|
2440
|
+
"begin": "(->)",
|
|
2441
|
+
"beginCaptures": {
|
|
2442
|
+
"1": {
|
|
2443
|
+
"name": "keyword.operator.arrow.baml"
|
|
2444
|
+
}
|
|
2445
|
+
},
|
|
2446
|
+
"end": "(?=\\{)",
|
|
2447
|
+
"patterns": [
|
|
2448
|
+
{
|
|
2449
|
+
"include": "#comments"
|
|
2450
|
+
},
|
|
2451
|
+
{
|
|
2452
|
+
"include": "#type-expression"
|
|
2453
|
+
}
|
|
2454
|
+
]
|
|
2455
|
+
},
|
|
2456
|
+
"generator": {
|
|
2457
|
+
"name": "meta.generator.baml",
|
|
2458
|
+
"begin": "^\\s*(generator)\\b(?:\\s+(\\$?[A-Za-z_][A-Za-z0-9_-]*(?:\\$[A-Za-z_][A-Za-z0-9_-]*)*))?\\s*(?=\\{)",
|
|
2459
|
+
"beginCaptures": {
|
|
2460
|
+
"1": {
|
|
2461
|
+
"name": "keyword.declaration.generator.baml"
|
|
2462
|
+
},
|
|
2463
|
+
"2": {
|
|
2464
|
+
"name": "entity.name.generator.baml"
|
|
2465
|
+
}
|
|
2466
|
+
},
|
|
2467
|
+
"end": "(?<=\\})",
|
|
2468
|
+
"patterns": [
|
|
2469
|
+
{
|
|
2470
|
+
"include": "#comments"
|
|
2471
|
+
},
|
|
2472
|
+
{
|
|
2473
|
+
"include": "#config-block"
|
|
2474
|
+
}
|
|
2475
|
+
]
|
|
2476
|
+
},
|
|
2477
|
+
"if-condition": {
|
|
2478
|
+
"name": "meta.if.condition.baml",
|
|
2479
|
+
"begin": "\\G(?!\\s*else\\b)\\s*",
|
|
2480
|
+
"end": "(?=\\{)",
|
|
2481
|
+
"patterns": [
|
|
2482
|
+
{
|
|
2483
|
+
"include": "#comments"
|
|
2484
|
+
},
|
|
2485
|
+
{
|
|
2486
|
+
"include": "#condition-expression"
|
|
2487
|
+
}
|
|
2488
|
+
]
|
|
2489
|
+
},
|
|
2490
|
+
"if-else-clause": {
|
|
2491
|
+
"name": "meta.else.baml",
|
|
2492
|
+
"begin": "(?:^\\s*|\\G\\s*|(?<=[{;}])\\s*)(else)\\b",
|
|
2493
|
+
"beginCaptures": {
|
|
2494
|
+
"1": {
|
|
2495
|
+
"name": "keyword.control.conditional.baml"
|
|
2496
|
+
}
|
|
2497
|
+
},
|
|
2498
|
+
"end": "(?!\\s*else\\b)(?:(?<=\\})(?=\\s*(?:[,);]|$))|(?=,|\\)|;|$))",
|
|
2499
|
+
"patterns": [
|
|
2500
|
+
{
|
|
2501
|
+
"include": "#comments"
|
|
2502
|
+
},
|
|
2503
|
+
{
|
|
2504
|
+
"include": "#if-expression"
|
|
2505
|
+
},
|
|
2506
|
+
{
|
|
2507
|
+
"include": "#code-block"
|
|
2508
|
+
}
|
|
2509
|
+
]
|
|
2510
|
+
},
|
|
2511
|
+
"if-expression": {
|
|
2512
|
+
"name": "meta.expression.if.baml",
|
|
2513
|
+
"begin": "\\b(if)\\b",
|
|
2514
|
+
"beginCaptures": {
|
|
2515
|
+
"1": {
|
|
2516
|
+
"name": "keyword.control.conditional.baml"
|
|
2517
|
+
}
|
|
2518
|
+
},
|
|
2519
|
+
"end": "(?!\\s*else\\b)(?:(?<=\\})(?=\\s*(?:[,);]|$))|(?=,|\\)|;|$))",
|
|
2520
|
+
"patterns": [
|
|
2521
|
+
{
|
|
2522
|
+
"include": "#comments"
|
|
2523
|
+
},
|
|
2524
|
+
{
|
|
2525
|
+
"include": "#if-let-pattern"
|
|
2526
|
+
},
|
|
2527
|
+
{
|
|
2528
|
+
"include": "#assignment-operator"
|
|
2529
|
+
},
|
|
2530
|
+
{
|
|
2531
|
+
"include": "#if-condition"
|
|
2532
|
+
},
|
|
2533
|
+
{
|
|
2534
|
+
"include": "#code-block"
|
|
2535
|
+
},
|
|
2536
|
+
{
|
|
2537
|
+
"include": "#if-else-clause"
|
|
2538
|
+
}
|
|
2539
|
+
]
|
|
2540
|
+
},
|
|
2541
|
+
"if-let-pattern": {
|
|
2542
|
+
"name": "meta.pattern.if-let.baml",
|
|
2543
|
+
"begin": "\\G\\s*(?=(?:let|const)\\b)",
|
|
2544
|
+
"end": "(?=\\s*=)",
|
|
2545
|
+
"patterns": [
|
|
2546
|
+
{
|
|
2547
|
+
"include": "#comments"
|
|
2548
|
+
},
|
|
2549
|
+
{
|
|
2550
|
+
"include": "#pattern"
|
|
2551
|
+
}
|
|
2552
|
+
]
|
|
2553
|
+
},
|
|
2554
|
+
"implements-block": {
|
|
2555
|
+
"name": "meta.implements.baml",
|
|
2556
|
+
"begin": "^\\s*(implements|implement)\\b",
|
|
2557
|
+
"beginCaptures": {
|
|
2558
|
+
"1": {
|
|
2559
|
+
"name": "keyword.declaration.implements.baml"
|
|
2560
|
+
}
|
|
2561
|
+
},
|
|
2562
|
+
"end": "(?<=\\})",
|
|
2563
|
+
"patterns": [
|
|
2564
|
+
{
|
|
2565
|
+
"include": "#comments"
|
|
2566
|
+
},
|
|
2567
|
+
{
|
|
2568
|
+
"include": "#implements-target"
|
|
2569
|
+
},
|
|
2570
|
+
{
|
|
2571
|
+
"include": "#implements-body"
|
|
2572
|
+
}
|
|
2573
|
+
]
|
|
2574
|
+
},
|
|
2575
|
+
"implements-body": {
|
|
2576
|
+
"name": "meta.implements.body.baml",
|
|
2577
|
+
"begin": "\\{",
|
|
2578
|
+
"beginCaptures": {
|
|
2579
|
+
"0": {
|
|
2580
|
+
"name": "punctuation.definition.block.begin.baml"
|
|
2581
|
+
}
|
|
2582
|
+
},
|
|
2583
|
+
"end": "\\}",
|
|
2584
|
+
"endCaptures": {
|
|
2585
|
+
"0": {
|
|
2586
|
+
"name": "punctuation.definition.block.end.baml"
|
|
2587
|
+
}
|
|
2588
|
+
},
|
|
2589
|
+
"patterns": [
|
|
2590
|
+
{
|
|
2591
|
+
"include": "#comments"
|
|
2592
|
+
},
|
|
2593
|
+
{
|
|
2594
|
+
"include": "#function"
|
|
2595
|
+
},
|
|
2596
|
+
{
|
|
2597
|
+
"include": "#associated-type"
|
|
2598
|
+
},
|
|
2599
|
+
{
|
|
2600
|
+
"include": "#interface-field-link"
|
|
2601
|
+
},
|
|
2602
|
+
{
|
|
2603
|
+
"include": "#field"
|
|
2604
|
+
},
|
|
2605
|
+
{
|
|
2606
|
+
"include": "#semicolon"
|
|
2607
|
+
},
|
|
2608
|
+
{
|
|
2609
|
+
"include": "#comma"
|
|
2610
|
+
}
|
|
2611
|
+
]
|
|
2612
|
+
},
|
|
2613
|
+
"implements-for": {
|
|
2614
|
+
"name": "meta.implements-for.baml",
|
|
2615
|
+
"begin": "^\\s*(implements|implement)\\b",
|
|
2616
|
+
"beginCaptures": {
|
|
2617
|
+
"1": {
|
|
2618
|
+
"name": "keyword.declaration.implements.baml"
|
|
2619
|
+
}
|
|
2620
|
+
},
|
|
2621
|
+
"end": "(?<=\\})",
|
|
2622
|
+
"patterns": [
|
|
2623
|
+
{
|
|
2624
|
+
"include": "#comments"
|
|
2625
|
+
},
|
|
2626
|
+
{
|
|
2627
|
+
"include": "#declaration-type-parameters"
|
|
2628
|
+
},
|
|
2629
|
+
{
|
|
2630
|
+
"include": "#implements-for-interface-target"
|
|
2631
|
+
},
|
|
2632
|
+
{
|
|
2633
|
+
"include": "#implements-for-keyword"
|
|
2634
|
+
},
|
|
2635
|
+
{
|
|
2636
|
+
"include": "#implements-for-target"
|
|
2637
|
+
},
|
|
2638
|
+
{
|
|
2639
|
+
"include": "#implements-body"
|
|
2640
|
+
}
|
|
2641
|
+
]
|
|
2642
|
+
},
|
|
2643
|
+
"implements-for-interface-target": {
|
|
2644
|
+
"name": "meta.implements.target.baml",
|
|
2645
|
+
"begin": "\\G\\s*",
|
|
2646
|
+
"end": "(?=\\s+\\bfor\\b)",
|
|
2647
|
+
"patterns": [
|
|
2648
|
+
{
|
|
2649
|
+
"include": "#comments"
|
|
2650
|
+
},
|
|
2651
|
+
{
|
|
2652
|
+
"include": "#type-expression"
|
|
2653
|
+
}
|
|
2654
|
+
]
|
|
2655
|
+
},
|
|
2656
|
+
"implements-for-keyword": {
|
|
2657
|
+
"name": "keyword.declaration.for.baml",
|
|
2658
|
+
"match": "\\bfor\\b"
|
|
2659
|
+
},
|
|
2660
|
+
"implements-for-target": {
|
|
2661
|
+
"name": "meta.implements.for-target.baml",
|
|
2662
|
+
"begin": "\\G\\s*",
|
|
2663
|
+
"end": "(?=\\{)",
|
|
2664
|
+
"patterns": [
|
|
2665
|
+
{
|
|
2666
|
+
"include": "#comments"
|
|
2667
|
+
},
|
|
2668
|
+
{
|
|
2669
|
+
"include": "#type-expression"
|
|
2670
|
+
}
|
|
2671
|
+
]
|
|
2672
|
+
},
|
|
2673
|
+
"implements-target": {
|
|
2674
|
+
"name": "meta.implements.target.baml",
|
|
2675
|
+
"begin": "\\G\\s*",
|
|
2676
|
+
"end": "(?=\\{)",
|
|
2677
|
+
"patterns": [
|
|
2678
|
+
{
|
|
2679
|
+
"include": "#comments"
|
|
2680
|
+
},
|
|
2681
|
+
{
|
|
2682
|
+
"include": "#type-expression"
|
|
2683
|
+
}
|
|
2684
|
+
]
|
|
2685
|
+
},
|
|
2686
|
+
"integer-literal": {
|
|
2687
|
+
"name": "constant.numeric.integer.baml",
|
|
2688
|
+
"match": "\\b[0-9]+\\b"
|
|
2689
|
+
},
|
|
2690
|
+
"interface": {
|
|
2691
|
+
"name": "meta.interface.baml",
|
|
2692
|
+
"begin": "^\\s*(interface)\\s+(\\$?[A-Za-z_][A-Za-z0-9_-]*(?:\\$[A-Za-z_][A-Za-z0-9_-]*)*)\\b",
|
|
2693
|
+
"beginCaptures": {
|
|
2694
|
+
"1": {
|
|
2695
|
+
"name": "keyword.declaration.interface.baml"
|
|
2696
|
+
},
|
|
2697
|
+
"2": {
|
|
2698
|
+
"name": "entity.name.type.interface.baml"
|
|
2699
|
+
}
|
|
2700
|
+
},
|
|
2701
|
+
"end": "(?<=\\})",
|
|
2702
|
+
"patterns": [
|
|
2703
|
+
{
|
|
2704
|
+
"include": "#comments"
|
|
2705
|
+
},
|
|
2706
|
+
{
|
|
2707
|
+
"include": "#declaration-type-parameters"
|
|
2708
|
+
},
|
|
2709
|
+
{
|
|
2710
|
+
"include": "#interface-requires-clause"
|
|
2711
|
+
},
|
|
2712
|
+
{
|
|
2713
|
+
"include": "#interface-body"
|
|
2714
|
+
}
|
|
2715
|
+
]
|
|
2716
|
+
},
|
|
2717
|
+
"interface-body": {
|
|
2718
|
+
"name": "meta.interface.body.baml",
|
|
2719
|
+
"begin": "\\{",
|
|
2720
|
+
"beginCaptures": {
|
|
2721
|
+
"0": {
|
|
2722
|
+
"name": "punctuation.definition.block.begin.baml"
|
|
2723
|
+
}
|
|
2724
|
+
},
|
|
2725
|
+
"end": "\\}",
|
|
2726
|
+
"endCaptures": {
|
|
2727
|
+
"0": {
|
|
2728
|
+
"name": "punctuation.definition.block.end.baml"
|
|
2729
|
+
}
|
|
2730
|
+
},
|
|
2731
|
+
"patterns": [
|
|
2732
|
+
{
|
|
2733
|
+
"include": "#comments"
|
|
2734
|
+
},
|
|
2735
|
+
{
|
|
2736
|
+
"include": "#interface-method-signature"
|
|
2737
|
+
},
|
|
2738
|
+
{
|
|
2739
|
+
"include": "#function"
|
|
2740
|
+
},
|
|
2741
|
+
{
|
|
2742
|
+
"include": "#associated-type"
|
|
2743
|
+
},
|
|
2744
|
+
{
|
|
2745
|
+
"include": "#field"
|
|
2746
|
+
},
|
|
2747
|
+
{
|
|
2748
|
+
"include": "#semicolon"
|
|
2749
|
+
},
|
|
2750
|
+
{
|
|
2751
|
+
"include": "#comma"
|
|
2752
|
+
}
|
|
2753
|
+
]
|
|
2754
|
+
},
|
|
2755
|
+
"interface-field-link": {
|
|
2756
|
+
"name": "meta.interface-field-link.baml",
|
|
2757
|
+
"begin": "(?:^\\s*|(?<=\\{)\\s*)(\\$?[A-Za-z_][A-Za-z0-9_-]*(?:\\$[A-Za-z_][A-Za-z0-9_-]*)*)\\s+(as)\\s+(\\$?[A-Za-z_][A-Za-z0-9_-]*(?:\\$[A-Za-z_][A-Za-z0-9_-]*)*)\\b",
|
|
2758
|
+
"beginCaptures": {
|
|
2759
|
+
"1": {
|
|
2760
|
+
"name": "variable.other.property.interface.baml"
|
|
2761
|
+
},
|
|
2762
|
+
"2": {
|
|
2763
|
+
"name": "keyword.operator.as.baml"
|
|
2764
|
+
},
|
|
2765
|
+
"3": {
|
|
2766
|
+
"name": "variable.other.property.baml"
|
|
2767
|
+
}
|
|
2768
|
+
},
|
|
2769
|
+
"end": "(?<=;)|(?=\\r?\\n|\\})",
|
|
2770
|
+
"patterns": [
|
|
2771
|
+
{
|
|
2772
|
+
"include": "#comments"
|
|
2773
|
+
},
|
|
2774
|
+
{
|
|
2775
|
+
"include": "#semicolon"
|
|
2776
|
+
}
|
|
2777
|
+
]
|
|
2778
|
+
},
|
|
2779
|
+
"interface-method-return-type": {
|
|
2780
|
+
"name": "meta.return-type.baml",
|
|
2781
|
+
"begin": "(->)",
|
|
2782
|
+
"beginCaptures": {
|
|
2783
|
+
"1": {
|
|
2784
|
+
"name": "keyword.operator.arrow.baml"
|
|
2785
|
+
}
|
|
2786
|
+
},
|
|
2787
|
+
"end": "(?=;|\\r?\\n|\\})",
|
|
2788
|
+
"patterns": [
|
|
2789
|
+
{
|
|
2790
|
+
"include": "#comments"
|
|
2791
|
+
},
|
|
2792
|
+
{
|
|
2793
|
+
"include": "#type-expression"
|
|
2794
|
+
}
|
|
2795
|
+
]
|
|
2796
|
+
},
|
|
2797
|
+
"interface-method-signature": {
|
|
2798
|
+
"name": "meta.function.signature.baml",
|
|
2799
|
+
"begin": "^\\s*(function)\\s+(\\$?[A-Za-z_][A-Za-z0-9_-]*(?:\\$[A-Za-z_][A-Za-z0-9_-]*)*)\\b(?=[^{\\r\\n]*(?:\\r?\\n|;|\\}))",
|
|
2800
|
+
"beginCaptures": {
|
|
2801
|
+
"1": {
|
|
2802
|
+
"name": "keyword.declaration.function.baml"
|
|
2803
|
+
},
|
|
2804
|
+
"2": {
|
|
2805
|
+
"name": "entity.name.function.baml"
|
|
2806
|
+
}
|
|
2807
|
+
},
|
|
2808
|
+
"end": "(?<=;)|(?=\\r?\\n|\\})",
|
|
2809
|
+
"patterns": [
|
|
2810
|
+
{
|
|
2811
|
+
"include": "#comments"
|
|
2812
|
+
},
|
|
2813
|
+
{
|
|
2814
|
+
"include": "#declaration-type-parameters"
|
|
2815
|
+
},
|
|
2816
|
+
{
|
|
2817
|
+
"include": "#function-parameters"
|
|
2818
|
+
},
|
|
2819
|
+
{
|
|
2820
|
+
"include": "#interface-method-return-type"
|
|
2821
|
+
},
|
|
2822
|
+
{
|
|
2823
|
+
"include": "#semicolon"
|
|
2824
|
+
}
|
|
2825
|
+
]
|
|
2826
|
+
},
|
|
2827
|
+
"interface-requires-clause": {
|
|
2828
|
+
"name": "meta.interface.requires.baml",
|
|
2829
|
+
"begin": "\\b(requires)\\b",
|
|
2830
|
+
"beginCaptures": {
|
|
2831
|
+
"1": {
|
|
2832
|
+
"name": "keyword.declaration.requires.baml"
|
|
2833
|
+
}
|
|
2834
|
+
},
|
|
2835
|
+
"end": "(?=\\{)",
|
|
2836
|
+
"patterns": [
|
|
2837
|
+
{
|
|
2838
|
+
"include": "#comments"
|
|
2839
|
+
},
|
|
2840
|
+
{
|
|
2841
|
+
"include": "#type-expression"
|
|
2842
|
+
},
|
|
2843
|
+
{
|
|
2844
|
+
"include": "#comma"
|
|
2845
|
+
}
|
|
2846
|
+
]
|
|
2847
|
+
},
|
|
2848
|
+
"is-pattern-expression": {
|
|
2849
|
+
"name": "meta.expression.is.baml",
|
|
2850
|
+
"begin": "\\b(is)\\b",
|
|
2851
|
+
"beginCaptures": {
|
|
2852
|
+
"1": {
|
|
2853
|
+
"name": "keyword.operator.is.baml"
|
|
2854
|
+
}
|
|
2855
|
+
},
|
|
2856
|
+
"end": "(?=\\s*(?:&&|\\|\\||=>|[,);\\]}]|$))",
|
|
2857
|
+
"patterns": [
|
|
2858
|
+
{
|
|
2859
|
+
"include": "#comments"
|
|
2860
|
+
},
|
|
2861
|
+
{
|
|
2862
|
+
"include": "#pattern"
|
|
2863
|
+
}
|
|
2864
|
+
]
|
|
2865
|
+
},
|
|
2866
|
+
"lambda-arrow": {
|
|
2867
|
+
"name": "keyword.operator.arrow.baml",
|
|
2868
|
+
"match": "->|=>"
|
|
2869
|
+
},
|
|
2870
|
+
"lambda-expression": {
|
|
2871
|
+
"name": "meta.expression.lambda.baml",
|
|
2872
|
+
"begin": "(?=\\((?:[^()]|\\([^()]*\\))*\\)\\s*(?:->|=>))",
|
|
2873
|
+
"end": "(?<=\\})",
|
|
2874
|
+
"patterns": [
|
|
2875
|
+
{
|
|
2876
|
+
"include": "#comments"
|
|
2877
|
+
},
|
|
2878
|
+
{
|
|
2879
|
+
"include": "#function-parameters"
|
|
2880
|
+
},
|
|
2881
|
+
{
|
|
2882
|
+
"include": "#lambda-arrow"
|
|
2883
|
+
},
|
|
2884
|
+
{
|
|
2885
|
+
"include": "#lambda-return-type"
|
|
2886
|
+
},
|
|
2887
|
+
{
|
|
2888
|
+
"include": "#lambda-throws-clause"
|
|
2889
|
+
},
|
|
2890
|
+
{
|
|
2891
|
+
"include": "#code-block"
|
|
2892
|
+
}
|
|
2893
|
+
]
|
|
2894
|
+
},
|
|
2895
|
+
"lambda-return-type": {
|
|
2896
|
+
"name": "meta.return-type.lambda.baml",
|
|
2897
|
+
"begin": "(?<=->|=>)\\s*(?!throws\\b)(?=[^\\s\\{])",
|
|
2898
|
+
"end": "(?=\\s*(?:throws\\b|\\{))",
|
|
2899
|
+
"patterns": [
|
|
2900
|
+
{
|
|
2901
|
+
"include": "#comments"
|
|
2902
|
+
},
|
|
2903
|
+
{
|
|
2904
|
+
"include": "#type-expression"
|
|
2905
|
+
}
|
|
2906
|
+
]
|
|
2907
|
+
},
|
|
2908
|
+
"lambda-throws-clause": {
|
|
2909
|
+
"name": "meta.throws.lambda.baml",
|
|
2910
|
+
"begin": "\\b(throws)\\b",
|
|
2911
|
+
"beginCaptures": {
|
|
2912
|
+
"1": {
|
|
2913
|
+
"name": "keyword.operator.throws.baml"
|
|
2914
|
+
}
|
|
2915
|
+
},
|
|
2916
|
+
"end": "(?=\\{)",
|
|
2917
|
+
"patterns": [
|
|
2918
|
+
{
|
|
2919
|
+
"include": "#comments"
|
|
2920
|
+
},
|
|
2921
|
+
{
|
|
2922
|
+
"include": "#type-expression"
|
|
2923
|
+
}
|
|
2924
|
+
]
|
|
2925
|
+
},
|
|
2926
|
+
"let-else-clause": {
|
|
2927
|
+
"name": "meta.statement.let.else.baml",
|
|
2928
|
+
"begin": "\\b(else)\\b(?=\\s*\\{)",
|
|
2929
|
+
"beginCaptures": {
|
|
2930
|
+
"1": {
|
|
2931
|
+
"name": "keyword.control.conditional.else.baml"
|
|
2932
|
+
}
|
|
2933
|
+
},
|
|
2934
|
+
"end": "(?<=\\})",
|
|
2935
|
+
"patterns": [
|
|
2936
|
+
{
|
|
2937
|
+
"include": "#comments"
|
|
2938
|
+
},
|
|
2939
|
+
{
|
|
2940
|
+
"include": "#code-block"
|
|
2941
|
+
}
|
|
2942
|
+
]
|
|
2943
|
+
},
|
|
2944
|
+
"let-statement": {
|
|
2945
|
+
"name": "meta.statement.let.baml",
|
|
2946
|
+
"begin": "(?:^\\s*|\\G\\s*|(?<=[{;}])\\s*)(?=(?:let|const)\\b)",
|
|
2947
|
+
"end": "(?=[;}]|$)",
|
|
2948
|
+
"patterns": [
|
|
2949
|
+
{
|
|
2950
|
+
"include": "#comments"
|
|
2951
|
+
},
|
|
2952
|
+
{
|
|
2953
|
+
"include": "#let-statement-pattern"
|
|
2954
|
+
},
|
|
2955
|
+
{
|
|
2956
|
+
"include": "#assignment-operator"
|
|
2957
|
+
},
|
|
2958
|
+
{
|
|
2959
|
+
"include": "#let-else-clause"
|
|
2960
|
+
},
|
|
2961
|
+
{
|
|
2962
|
+
"include": "#expression"
|
|
2963
|
+
}
|
|
2964
|
+
]
|
|
2965
|
+
},
|
|
2966
|
+
"let-statement-pattern": {
|
|
2967
|
+
"name": "meta.pattern.statement.baml",
|
|
2968
|
+
"begin": "\\G\\s*",
|
|
2969
|
+
"end": "(?=\\s*=)",
|
|
2970
|
+
"patterns": [
|
|
2971
|
+
{
|
|
2972
|
+
"include": "#comments"
|
|
2973
|
+
},
|
|
2974
|
+
{
|
|
2975
|
+
"include": "#pattern"
|
|
2976
|
+
}
|
|
2977
|
+
]
|
|
2978
|
+
},
|
|
2979
|
+
"line-comment": {
|
|
2980
|
+
"name": "comment.line.double-slash.baml",
|
|
2981
|
+
"match": "//.*$"
|
|
2982
|
+
},
|
|
2983
|
+
"literal": {
|
|
2984
|
+
"patterns": [
|
|
2985
|
+
{
|
|
2986
|
+
"include": "#byte-string-literal"
|
|
2987
|
+
},
|
|
2988
|
+
{
|
|
2989
|
+
"include": "#type-literal"
|
|
2990
|
+
}
|
|
2991
|
+
]
|
|
2992
|
+
},
|
|
2993
|
+
"llm-client-field": {
|
|
2994
|
+
"name": "meta.field.llm.client.baml",
|
|
2995
|
+
"begin": "^\\s*(client)\\b\\s*(:)?(?!\\s*\\.)",
|
|
2996
|
+
"beginCaptures": {
|
|
2997
|
+
"1": {
|
|
2998
|
+
"name": "keyword.other.llm.client.baml"
|
|
2999
|
+
},
|
|
3000
|
+
"2": {
|
|
3001
|
+
"name": "punctuation.separator.colon.baml"
|
|
3002
|
+
}
|
|
3003
|
+
},
|
|
3004
|
+
"end": "$",
|
|
3005
|
+
"patterns": [
|
|
3006
|
+
{
|
|
3007
|
+
"include": "#comments"
|
|
3008
|
+
},
|
|
3009
|
+
{
|
|
3010
|
+
"include": "#expression"
|
|
3011
|
+
}
|
|
3012
|
+
]
|
|
3013
|
+
},
|
|
3014
|
+
"llm-prompt-field": {
|
|
3015
|
+
"name": "meta.field.llm.prompt.baml",
|
|
3016
|
+
"begin": "^\\s*(prompt)\\b\\s*(:)?",
|
|
3017
|
+
"beginCaptures": {
|
|
3018
|
+
"1": {
|
|
3019
|
+
"name": "keyword.other.llm.prompt.baml"
|
|
3020
|
+
},
|
|
3021
|
+
"2": {
|
|
3022
|
+
"name": "punctuation.separator.colon.baml"
|
|
3023
|
+
}
|
|
3024
|
+
},
|
|
3025
|
+
"end": "$",
|
|
3026
|
+
"patterns": [
|
|
3027
|
+
{
|
|
3028
|
+
"include": "#comments"
|
|
3029
|
+
},
|
|
3030
|
+
{
|
|
3031
|
+
"include": "#template-string-body"
|
|
3032
|
+
},
|
|
3033
|
+
{
|
|
3034
|
+
"include": "#backtick-string"
|
|
3035
|
+
},
|
|
3036
|
+
{
|
|
3037
|
+
"include": "#expression"
|
|
3038
|
+
}
|
|
3039
|
+
]
|
|
3040
|
+
},
|
|
3041
|
+
"map-entry": {
|
|
3042
|
+
"name": "meta.map.entry.baml",
|
|
3043
|
+
"begin": "\\s*(?=(?:\"|#|\\$?[A-Za-z_][A-Za-z0-9_-]*(?:\\$[A-Za-z_][A-Za-z0-9_-]*)*(?:\\s*\\.\\s*\\$?[A-Za-z_][A-Za-z0-9_-]*(?:\\$[A-Za-z_][A-Za-z0-9_-]*)*)*\\s*:))",
|
|
3044
|
+
"end": "(?=,|\\})",
|
|
3045
|
+
"patterns": [
|
|
3046
|
+
{
|
|
3047
|
+
"include": "#comments"
|
|
3048
|
+
},
|
|
3049
|
+
{
|
|
3050
|
+
"include": "#map-entry-key"
|
|
3051
|
+
},
|
|
3052
|
+
{
|
|
3053
|
+
"include": "#string-literal"
|
|
3054
|
+
},
|
|
3055
|
+
{
|
|
3056
|
+
"include": "#raw-string"
|
|
3057
|
+
},
|
|
3058
|
+
{
|
|
3059
|
+
"include": "#colon-separator"
|
|
3060
|
+
},
|
|
3061
|
+
{
|
|
3062
|
+
"include": "#expression"
|
|
3063
|
+
}
|
|
3064
|
+
]
|
|
3065
|
+
},
|
|
3066
|
+
"map-entry-key": {
|
|
3067
|
+
"name": "meta.map-entry-key.baml",
|
|
3068
|
+
"match": "\\b(\\$?[A-Za-z_][A-Za-z0-9_-]*(?:\\$[A-Za-z_][A-Za-z0-9_-]*)*)((?:\\s*\\.\\s*\\$?[A-Za-z_][A-Za-z0-9_-]*(?:\\$[A-Za-z_][A-Za-z0-9_-]*)*)*)\\b(?=\\s*:)",
|
|
3069
|
+
"captures": {
|
|
3070
|
+
"1": {
|
|
3071
|
+
"name": "variable.other.property.baml"
|
|
3072
|
+
},
|
|
3073
|
+
"2": {
|
|
3074
|
+
"patterns": [
|
|
3075
|
+
{
|
|
3076
|
+
"include": "#accessor-dot"
|
|
3077
|
+
},
|
|
3078
|
+
{
|
|
3079
|
+
"include": "#map-entry-key-segment"
|
|
3080
|
+
}
|
|
3081
|
+
]
|
|
3082
|
+
}
|
|
3083
|
+
}
|
|
3084
|
+
},
|
|
3085
|
+
"map-entry-key-segment": {
|
|
3086
|
+
"name": "variable.other.property.baml",
|
|
3087
|
+
"match": "\\b\\$?[A-Za-z_][A-Za-z0-9_-]*(?:\\$[A-Za-z_][A-Za-z0-9_-]*)*\\b"
|
|
3088
|
+
},
|
|
3089
|
+
"map-expression": {
|
|
3090
|
+
"name": "meta.expression.map.baml",
|
|
3091
|
+
"begin": "\\{(?=\\s*(?:\\}|[\"#]|\\$?[A-Za-z_][A-Za-z0-9_-]*(?:\\$[A-Za-z_][A-Za-z0-9_-]*)*(?:\\s*\\.\\s*\\$?[A-Za-z_][A-Za-z0-9_-]*(?:\\$[A-Za-z_][A-Za-z0-9_-]*)*)*\\s*:))",
|
|
3092
|
+
"beginCaptures": {
|
|
3093
|
+
"0": {
|
|
3094
|
+
"name": "punctuation.definition.map.begin.baml"
|
|
3095
|
+
}
|
|
3096
|
+
},
|
|
3097
|
+
"end": "\\}",
|
|
3098
|
+
"endCaptures": {
|
|
3099
|
+
"0": {
|
|
3100
|
+
"name": "punctuation.definition.map.end.baml"
|
|
3101
|
+
}
|
|
3102
|
+
},
|
|
3103
|
+
"patterns": [
|
|
3104
|
+
{
|
|
3105
|
+
"include": "#comments"
|
|
3106
|
+
},
|
|
3107
|
+
{
|
|
3108
|
+
"include": "#map-entry"
|
|
3109
|
+
},
|
|
3110
|
+
{
|
|
3111
|
+
"include": "#comma"
|
|
3112
|
+
}
|
|
3113
|
+
]
|
|
3114
|
+
},
|
|
3115
|
+
"match-arm": {
|
|
3116
|
+
"name": "meta.match.arm.baml",
|
|
3117
|
+
"begin": "(?=\\S)(?![,}])",
|
|
3118
|
+
"end": "(?=,|\\r?\\n|\\})",
|
|
3119
|
+
"patterns": [
|
|
3120
|
+
{
|
|
3121
|
+
"include": "#comments"
|
|
3122
|
+
},
|
|
3123
|
+
{
|
|
3124
|
+
"include": "#match-arm-pattern"
|
|
3125
|
+
},
|
|
3126
|
+
{
|
|
3127
|
+
"include": "#match-arm-guard"
|
|
3128
|
+
},
|
|
3129
|
+
{
|
|
3130
|
+
"include": "#match-arm-arrow"
|
|
3131
|
+
},
|
|
3132
|
+
{
|
|
3133
|
+
"include": "#expression"
|
|
3134
|
+
}
|
|
3135
|
+
]
|
|
3136
|
+
},
|
|
3137
|
+
"match-arm-arrow": {
|
|
3138
|
+
"name": "keyword.operator.arrow.baml",
|
|
3139
|
+
"match": "=>"
|
|
3140
|
+
},
|
|
3141
|
+
"match-arm-guard": {
|
|
3142
|
+
"name": "meta.match.guard.baml",
|
|
3143
|
+
"begin": "\\b(if)\\b",
|
|
3144
|
+
"beginCaptures": {
|
|
3145
|
+
"1": {
|
|
3146
|
+
"name": "keyword.control.conditional.baml"
|
|
3147
|
+
}
|
|
3148
|
+
},
|
|
3149
|
+
"end": "(?=\\s*=>)",
|
|
3150
|
+
"patterns": [
|
|
3151
|
+
{
|
|
3152
|
+
"include": "#comments"
|
|
3153
|
+
},
|
|
3154
|
+
{
|
|
3155
|
+
"include": "#expression"
|
|
3156
|
+
}
|
|
3157
|
+
]
|
|
3158
|
+
},
|
|
3159
|
+
"match-arm-pattern": {
|
|
3160
|
+
"name": "meta.pattern.match.baml",
|
|
3161
|
+
"begin": "\\G\\s*",
|
|
3162
|
+
"end": "(?=\\s*(?:if\\b|=>))",
|
|
3163
|
+
"patterns": [
|
|
3164
|
+
{
|
|
3165
|
+
"include": "#comments"
|
|
3166
|
+
},
|
|
3167
|
+
{
|
|
3168
|
+
"include": "#pattern"
|
|
3169
|
+
}
|
|
3170
|
+
]
|
|
3171
|
+
},
|
|
3172
|
+
"match-block": {
|
|
3173
|
+
"name": "meta.block.match.baml",
|
|
3174
|
+
"begin": "\\{",
|
|
3175
|
+
"beginCaptures": {
|
|
3176
|
+
"0": {
|
|
3177
|
+
"name": "punctuation.definition.block.begin.baml"
|
|
3178
|
+
}
|
|
3179
|
+
},
|
|
3180
|
+
"end": "\\}",
|
|
3181
|
+
"endCaptures": {
|
|
3182
|
+
"0": {
|
|
3183
|
+
"name": "punctuation.definition.block.end.baml"
|
|
3184
|
+
}
|
|
3185
|
+
},
|
|
3186
|
+
"patterns": [
|
|
3187
|
+
{
|
|
3188
|
+
"include": "#comments"
|
|
3189
|
+
},
|
|
3190
|
+
{
|
|
3191
|
+
"include": "#match-arm"
|
|
3192
|
+
},
|
|
3193
|
+
{
|
|
3194
|
+
"include": "#comma"
|
|
3195
|
+
}
|
|
3196
|
+
]
|
|
3197
|
+
},
|
|
3198
|
+
"match-expression": {
|
|
3199
|
+
"name": "meta.expression.match.baml",
|
|
3200
|
+
"begin": "\\b(match)\\b",
|
|
3201
|
+
"beginCaptures": {
|
|
3202
|
+
"1": {
|
|
3203
|
+
"name": "keyword.control.match.baml"
|
|
3204
|
+
}
|
|
3205
|
+
},
|
|
3206
|
+
"end": "(?<=\\})|(?=,|;|$)",
|
|
3207
|
+
"patterns": [
|
|
3208
|
+
{
|
|
3209
|
+
"include": "#comments"
|
|
3210
|
+
},
|
|
3211
|
+
{
|
|
3212
|
+
"include": "#match-scrutinee-group"
|
|
3213
|
+
},
|
|
3214
|
+
{
|
|
3215
|
+
"include": "#match-block"
|
|
3216
|
+
},
|
|
3217
|
+
{
|
|
3218
|
+
"include": "#match-scrutinee"
|
|
3219
|
+
}
|
|
3220
|
+
]
|
|
3221
|
+
},
|
|
3222
|
+
"match-scrutinee": {
|
|
3223
|
+
"name": "meta.match.scrutinee.baml",
|
|
3224
|
+
"begin": "(?=[^\\s\\{])",
|
|
3225
|
+
"end": "(?=\\{)",
|
|
3226
|
+
"patterns": [
|
|
3227
|
+
{
|
|
3228
|
+
"include": "#comments"
|
|
3229
|
+
},
|
|
3230
|
+
{
|
|
3231
|
+
"include": "#literal"
|
|
3232
|
+
},
|
|
3233
|
+
{
|
|
3234
|
+
"include": "#array-expression"
|
|
3235
|
+
},
|
|
3236
|
+
{
|
|
3237
|
+
"include": "#spawn-expression"
|
|
3238
|
+
},
|
|
3239
|
+
{
|
|
3240
|
+
"include": "#await-expression"
|
|
3241
|
+
},
|
|
3242
|
+
{
|
|
3243
|
+
"include": "#throw-expression"
|
|
3244
|
+
},
|
|
3245
|
+
{
|
|
3246
|
+
"include": "#catch-expression"
|
|
3247
|
+
},
|
|
3248
|
+
{
|
|
3249
|
+
"include": "#expression-operator"
|
|
3250
|
+
},
|
|
3251
|
+
{
|
|
3252
|
+
"include": "#function-call-expression"
|
|
3253
|
+
},
|
|
3254
|
+
{
|
|
3255
|
+
"include": "#dotted-expression"
|
|
3256
|
+
}
|
|
3257
|
+
]
|
|
3258
|
+
},
|
|
3259
|
+
"match-scrutinee-group": {
|
|
3260
|
+
"name": "meta.match.scrutinee.group.baml",
|
|
3261
|
+
"begin": "\\(",
|
|
3262
|
+
"beginCaptures": {
|
|
3263
|
+
"0": {
|
|
3264
|
+
"name": "punctuation.definition.group.begin.baml"
|
|
3265
|
+
}
|
|
3266
|
+
},
|
|
3267
|
+
"end": "\\)",
|
|
3268
|
+
"endCaptures": {
|
|
3269
|
+
"0": {
|
|
3270
|
+
"name": "punctuation.definition.group.end.baml"
|
|
3271
|
+
}
|
|
3272
|
+
},
|
|
3273
|
+
"patterns": [
|
|
3274
|
+
{
|
|
3275
|
+
"include": "#comments"
|
|
3276
|
+
},
|
|
3277
|
+
{
|
|
3278
|
+
"include": "#expression"
|
|
3279
|
+
},
|
|
3280
|
+
{
|
|
3281
|
+
"include": "#type-expression"
|
|
3282
|
+
}
|
|
3283
|
+
]
|
|
3284
|
+
},
|
|
3285
|
+
"namespace-root": {
|
|
3286
|
+
"name": "support.other.namespace.baml",
|
|
3287
|
+
"match": "\\b(?:root|baml)\\b"
|
|
3288
|
+
},
|
|
3289
|
+
"namespace-segment": {
|
|
3290
|
+
"name": "entity.name.namespace.baml",
|
|
3291
|
+
"match": "\\b\\$?[A-Za-z_][A-Za-z0-9_-]*(?:\\$[A-Za-z_][A-Za-z0-9_-]*)*\\b"
|
|
3292
|
+
},
|
|
3293
|
+
"null-literal": {
|
|
3294
|
+
"name": "constant.language.null.baml",
|
|
3295
|
+
"match": "\\bnull\\b"
|
|
3296
|
+
},
|
|
3297
|
+
"numeric-literal": {
|
|
3298
|
+
"patterns": [
|
|
3299
|
+
{
|
|
3300
|
+
"include": "#bigint-literal"
|
|
3301
|
+
},
|
|
3302
|
+
{
|
|
3303
|
+
"include": "#float-literal"
|
|
3304
|
+
},
|
|
3305
|
+
{
|
|
3306
|
+
"include": "#integer-literal"
|
|
3307
|
+
}
|
|
3308
|
+
]
|
|
3309
|
+
},
|
|
3310
|
+
"optional-call-expression": {
|
|
3311
|
+
"name": "meta.function-call.optional.baml",
|
|
3312
|
+
"begin": "(\\?\\.)\\s*(?=\\()",
|
|
3313
|
+
"beginCaptures": {
|
|
3314
|
+
"1": {
|
|
3315
|
+
"name": "punctuation.accessor.baml"
|
|
3316
|
+
}
|
|
3317
|
+
},
|
|
3318
|
+
"end": "(?<=\\))",
|
|
3319
|
+
"patterns": [
|
|
3320
|
+
{
|
|
3321
|
+
"include": "#comments"
|
|
3322
|
+
},
|
|
3323
|
+
{
|
|
3324
|
+
"include": "#call-arguments"
|
|
3325
|
+
}
|
|
3326
|
+
]
|
|
3327
|
+
},
|
|
3328
|
+
"optional-field-access-expression": {
|
|
3329
|
+
"name": "meta.field-access.optional.baml",
|
|
3330
|
+
"match": "(\\?\\.)\\s*(\\$?[A-Za-z_][A-Za-z0-9_-]*(?:\\$[A-Za-z_][A-Za-z0-9_-]*)*)\\b",
|
|
3331
|
+
"captures": {
|
|
3332
|
+
"1": {
|
|
3333
|
+
"name": "punctuation.accessor.baml"
|
|
3334
|
+
},
|
|
3335
|
+
"2": {
|
|
3336
|
+
"name": "variable.other.readwrite.baml"
|
|
3337
|
+
}
|
|
3338
|
+
}
|
|
3339
|
+
},
|
|
3340
|
+
"optional-index-arguments": {
|
|
3341
|
+
"name": "meta.index.arguments.baml",
|
|
3342
|
+
"begin": "\\[",
|
|
3343
|
+
"beginCaptures": {
|
|
3344
|
+
"0": {
|
|
3345
|
+
"name": "punctuation.definition.bracket.begin.baml"
|
|
3346
|
+
}
|
|
3347
|
+
},
|
|
3348
|
+
"end": "\\]",
|
|
3349
|
+
"endCaptures": {
|
|
3350
|
+
"0": {
|
|
3351
|
+
"name": "punctuation.definition.bracket.end.baml"
|
|
3352
|
+
}
|
|
3353
|
+
},
|
|
3354
|
+
"patterns": [
|
|
3355
|
+
{
|
|
3356
|
+
"include": "#comments"
|
|
3357
|
+
},
|
|
3358
|
+
{
|
|
3359
|
+
"include": "#expression"
|
|
3360
|
+
}
|
|
3361
|
+
]
|
|
3362
|
+
},
|
|
3363
|
+
"optional-index-expression": {
|
|
3364
|
+
"name": "meta.index.optional.baml",
|
|
3365
|
+
"begin": "(\\?\\.)\\s*(?=\\[)",
|
|
3366
|
+
"beginCaptures": {
|
|
3367
|
+
"1": {
|
|
3368
|
+
"name": "punctuation.accessor.baml"
|
|
3369
|
+
}
|
|
3370
|
+
},
|
|
3371
|
+
"end": "(?<=\\])",
|
|
3372
|
+
"patterns": [
|
|
3373
|
+
{
|
|
3374
|
+
"include": "#comments"
|
|
3375
|
+
},
|
|
3376
|
+
{
|
|
3377
|
+
"include": "#optional-index-arguments"
|
|
3378
|
+
}
|
|
3379
|
+
]
|
|
3380
|
+
},
|
|
3381
|
+
"optional-method-call-expression": {
|
|
3382
|
+
"name": "meta.function-call.optional.member.baml",
|
|
3383
|
+
"begin": "(\\?\\.)\\s*(\\$?[A-Za-z_][A-Za-z0-9_-]*(?:\\$[A-Za-z_][A-Za-z0-9_-]*)*)\\b(?=\\s*(?:<[^(){};]*>\\s*)?\\()",
|
|
3384
|
+
"beginCaptures": {
|
|
3385
|
+
"1": {
|
|
3386
|
+
"name": "punctuation.accessor.baml"
|
|
3387
|
+
},
|
|
3388
|
+
"2": {
|
|
3389
|
+
"name": "entity.name.function.baml"
|
|
3390
|
+
}
|
|
3391
|
+
},
|
|
3392
|
+
"end": "(?<=\\))",
|
|
3393
|
+
"patterns": [
|
|
3394
|
+
{
|
|
3395
|
+
"include": "#comments"
|
|
3396
|
+
},
|
|
3397
|
+
{
|
|
3398
|
+
"include": "#optional-method-call-type-arguments"
|
|
3399
|
+
},
|
|
3400
|
+
{
|
|
3401
|
+
"include": "#call-arguments"
|
|
3402
|
+
}
|
|
3403
|
+
]
|
|
3404
|
+
},
|
|
3405
|
+
"optional-method-call-type-arguments": {
|
|
3406
|
+
"name": "meta.type-arguments.baml",
|
|
3407
|
+
"begin": "<",
|
|
3408
|
+
"beginCaptures": {
|
|
3409
|
+
"0": {
|
|
3410
|
+
"name": "punctuation.definition.type-arguments.begin.baml"
|
|
3411
|
+
}
|
|
3412
|
+
},
|
|
3413
|
+
"end": ">(?=\\s*\\()",
|
|
3414
|
+
"endCaptures": {
|
|
3415
|
+
"0": {
|
|
3416
|
+
"name": "punctuation.definition.type-arguments.end.baml"
|
|
3417
|
+
}
|
|
3418
|
+
},
|
|
3419
|
+
"patterns": [
|
|
3420
|
+
{
|
|
3421
|
+
"include": "#comments"
|
|
3422
|
+
},
|
|
3423
|
+
{
|
|
3424
|
+
"include": "#type-expression"
|
|
3425
|
+
}
|
|
3426
|
+
]
|
|
3427
|
+
},
|
|
3428
|
+
"optional-operator": {
|
|
3429
|
+
"name": "keyword.operator.optional.baml",
|
|
3430
|
+
"match": "\\?"
|
|
3431
|
+
},
|
|
3432
|
+
"parameter": {
|
|
3433
|
+
"name": "meta.parameter.baml",
|
|
3434
|
+
"begin": "\\b(\\$?[A-Za-z_][A-Za-z0-9_-]*(?:\\$[A-Za-z_][A-Za-z0-9_-]*)*)\\s*(:)?",
|
|
3435
|
+
"beginCaptures": {
|
|
3436
|
+
"1": {
|
|
3437
|
+
"name": "variable.parameter.baml"
|
|
3438
|
+
},
|
|
3439
|
+
"2": {
|
|
3440
|
+
"name": "punctuation.separator.colon.baml"
|
|
3441
|
+
}
|
|
3442
|
+
},
|
|
3443
|
+
"end": "(?=,|\\))",
|
|
3444
|
+
"patterns": [
|
|
3445
|
+
{
|
|
3446
|
+
"include": "#comments"
|
|
3447
|
+
},
|
|
3448
|
+
{
|
|
3449
|
+
"include": "#parameter-type-parens"
|
|
3450
|
+
},
|
|
3451
|
+
{
|
|
3452
|
+
"include": "#parameter-type-arguments"
|
|
3453
|
+
},
|
|
3454
|
+
{
|
|
3455
|
+
"include": "#parameter-default"
|
|
3456
|
+
},
|
|
3457
|
+
{
|
|
3458
|
+
"include": "#type-expression"
|
|
3459
|
+
}
|
|
3460
|
+
]
|
|
3461
|
+
},
|
|
3462
|
+
"parameter-default": {
|
|
3463
|
+
"name": "meta.parameter.default.baml",
|
|
3464
|
+
"begin": "=",
|
|
3465
|
+
"beginCaptures": {
|
|
3466
|
+
"0": {
|
|
3467
|
+
"name": "keyword.operator.assignment.baml"
|
|
3468
|
+
}
|
|
3469
|
+
},
|
|
3470
|
+
"end": "(?=,|\\))",
|
|
3471
|
+
"patterns": [
|
|
3472
|
+
{
|
|
3473
|
+
"include": "#comments"
|
|
3474
|
+
},
|
|
3475
|
+
{
|
|
3476
|
+
"include": "#expression"
|
|
3477
|
+
}
|
|
3478
|
+
]
|
|
3479
|
+
},
|
|
3480
|
+
"parameter-type-arguments": {
|
|
3481
|
+
"name": "meta.type-arguments.baml",
|
|
3482
|
+
"begin": "<",
|
|
3483
|
+
"beginCaptures": {
|
|
3484
|
+
"0": {
|
|
3485
|
+
"name": "punctuation.definition.type-arguments.begin.baml"
|
|
3486
|
+
}
|
|
3487
|
+
},
|
|
3488
|
+
"end": ">",
|
|
3489
|
+
"endCaptures": {
|
|
3490
|
+
"0": {
|
|
3491
|
+
"name": "punctuation.definition.type-arguments.end.baml"
|
|
3492
|
+
}
|
|
3493
|
+
},
|
|
3494
|
+
"patterns": [
|
|
3495
|
+
{
|
|
3496
|
+
"include": "#comments"
|
|
3497
|
+
},
|
|
3498
|
+
{
|
|
3499
|
+
"include": "#type-expression"
|
|
3500
|
+
}
|
|
3501
|
+
]
|
|
3502
|
+
},
|
|
3503
|
+
"parameter-type-parens": {
|
|
3504
|
+
"name": "meta.group.type.baml",
|
|
3505
|
+
"begin": "\\(",
|
|
3506
|
+
"beginCaptures": {
|
|
3507
|
+
"0": {
|
|
3508
|
+
"name": "punctuation.definition.type.begin.baml"
|
|
3509
|
+
}
|
|
3510
|
+
},
|
|
3511
|
+
"end": "\\)",
|
|
3512
|
+
"endCaptures": {
|
|
3513
|
+
"0": {
|
|
3514
|
+
"name": "punctuation.definition.type.end.baml"
|
|
3515
|
+
}
|
|
3516
|
+
},
|
|
3517
|
+
"patterns": [
|
|
3518
|
+
{
|
|
3519
|
+
"include": "#comments"
|
|
3520
|
+
},
|
|
3521
|
+
{
|
|
3522
|
+
"include": "#type-expression"
|
|
3523
|
+
}
|
|
3524
|
+
]
|
|
3525
|
+
},
|
|
3526
|
+
"parenthesized-expression": {
|
|
3527
|
+
"name": "meta.group.expression.baml",
|
|
3528
|
+
"begin": "\\(",
|
|
3529
|
+
"beginCaptures": {
|
|
3530
|
+
"0": {
|
|
3531
|
+
"name": "punctuation.definition.group.begin.baml"
|
|
3532
|
+
}
|
|
3533
|
+
},
|
|
3534
|
+
"end": "\\)",
|
|
3535
|
+
"endCaptures": {
|
|
3536
|
+
"0": {
|
|
3537
|
+
"name": "punctuation.definition.group.end.baml"
|
|
3538
|
+
}
|
|
3539
|
+
},
|
|
3540
|
+
"patterns": [
|
|
3541
|
+
{
|
|
3542
|
+
"include": "#comments"
|
|
3543
|
+
},
|
|
3544
|
+
{
|
|
3545
|
+
"include": "#expression"
|
|
3546
|
+
}
|
|
3547
|
+
]
|
|
3548
|
+
},
|
|
3549
|
+
"pattern": {
|
|
3550
|
+
"patterns": [
|
|
3551
|
+
{
|
|
3552
|
+
"include": "#comments"
|
|
3553
|
+
},
|
|
3554
|
+
{
|
|
3555
|
+
"include": "#wildcard-binding-pattern"
|
|
3556
|
+
},
|
|
3557
|
+
{
|
|
3558
|
+
"include": "#typed-binding-pattern"
|
|
3559
|
+
},
|
|
3560
|
+
{
|
|
3561
|
+
"include": "#class-destructure-pattern"
|
|
3562
|
+
},
|
|
3563
|
+
{
|
|
3564
|
+
"include": "#array-destructure-pattern"
|
|
3565
|
+
},
|
|
3566
|
+
{
|
|
3567
|
+
"include": "#bare-binding-pattern"
|
|
3568
|
+
},
|
|
3569
|
+
{
|
|
3570
|
+
"include": "#wildcard-pattern"
|
|
3571
|
+
},
|
|
3572
|
+
{
|
|
3573
|
+
"include": "#type-expression"
|
|
3574
|
+
}
|
|
3575
|
+
]
|
|
3576
|
+
},
|
|
3577
|
+
"postfix-method-call-expression": {
|
|
3578
|
+
"name": "meta.function-call.member.baml",
|
|
3579
|
+
"begin": "([.$])\\s*(\\$?[A-Za-z_][A-Za-z0-9_-]*(?:\\$[A-Za-z_][A-Za-z0-9_-]*)*)\\b(?=\\s*(?:<[^(){};]*>\\s*)?\\()",
|
|
3580
|
+
"beginCaptures": {
|
|
3581
|
+
"1": {
|
|
3582
|
+
"name": "punctuation.accessor.baml"
|
|
3583
|
+
},
|
|
3584
|
+
"2": {
|
|
3585
|
+
"name": "entity.name.function.baml"
|
|
3586
|
+
}
|
|
3587
|
+
},
|
|
3588
|
+
"end": "(?<=\\))",
|
|
3589
|
+
"patterns": [
|
|
3590
|
+
{
|
|
3591
|
+
"include": "#comments"
|
|
3592
|
+
},
|
|
3593
|
+
{
|
|
3594
|
+
"include": "#postfix-method-call-type-arguments"
|
|
3595
|
+
},
|
|
3596
|
+
{
|
|
3597
|
+
"include": "#call-arguments"
|
|
3598
|
+
}
|
|
3599
|
+
]
|
|
3600
|
+
},
|
|
3601
|
+
"postfix-method-call-type-arguments": {
|
|
3602
|
+
"name": "meta.type-arguments.baml",
|
|
3603
|
+
"begin": "<",
|
|
3604
|
+
"beginCaptures": {
|
|
3605
|
+
"0": {
|
|
3606
|
+
"name": "punctuation.definition.type-arguments.begin.baml"
|
|
3607
|
+
}
|
|
3608
|
+
},
|
|
3609
|
+
"end": ">(?=\\s*\\()",
|
|
3610
|
+
"endCaptures": {
|
|
3611
|
+
"0": {
|
|
3612
|
+
"name": "punctuation.definition.type-arguments.end.baml"
|
|
3613
|
+
}
|
|
3614
|
+
},
|
|
3615
|
+
"patterns": [
|
|
3616
|
+
{
|
|
3617
|
+
"include": "#comments"
|
|
3618
|
+
},
|
|
3619
|
+
{
|
|
3620
|
+
"include": "#type-expression"
|
|
3621
|
+
}
|
|
3622
|
+
]
|
|
3623
|
+
},
|
|
3624
|
+
"primitive-type": {
|
|
3625
|
+
"name": "support.type.primitive.baml",
|
|
3626
|
+
"match": "\\b(?:int|float|bigint|string|bool|image|audio|map|json|unknown|never|Self)\\b"
|
|
3627
|
+
},
|
|
3628
|
+
"raw-string": {
|
|
3629
|
+
"patterns": [
|
|
3630
|
+
{
|
|
3631
|
+
"include": "#raw-string-8"
|
|
3632
|
+
},
|
|
3633
|
+
{
|
|
3634
|
+
"include": "#raw-string-7"
|
|
3635
|
+
},
|
|
3636
|
+
{
|
|
3637
|
+
"include": "#raw-string-6"
|
|
3638
|
+
},
|
|
3639
|
+
{
|
|
3640
|
+
"include": "#raw-string-5"
|
|
3641
|
+
},
|
|
3642
|
+
{
|
|
3643
|
+
"include": "#raw-string-4"
|
|
3644
|
+
},
|
|
3645
|
+
{
|
|
3646
|
+
"include": "#raw-string-3"
|
|
3647
|
+
},
|
|
3648
|
+
{
|
|
3649
|
+
"include": "#raw-string-2"
|
|
3650
|
+
},
|
|
3651
|
+
{
|
|
3652
|
+
"include": "#raw-string-1"
|
|
3653
|
+
}
|
|
3654
|
+
]
|
|
3655
|
+
},
|
|
3656
|
+
"raw-string-1": {
|
|
3657
|
+
"name": "string.quoted.raw.baml",
|
|
3658
|
+
"begin": "(?<!#)(#{1})\"",
|
|
3659
|
+
"beginCaptures": {
|
|
3660
|
+
"1": {
|
|
3661
|
+
"name": "punctuation.definition.string.begin.baml"
|
|
3662
|
+
}
|
|
3663
|
+
},
|
|
3664
|
+
"end": "\"(#{1})",
|
|
3665
|
+
"endCaptures": {
|
|
3666
|
+
"1": {
|
|
3667
|
+
"name": "punctuation.definition.string.end.baml"
|
|
3668
|
+
}
|
|
3669
|
+
}
|
|
3670
|
+
},
|
|
3671
|
+
"raw-string-2": {
|
|
3672
|
+
"name": "string.quoted.raw.baml",
|
|
3673
|
+
"begin": "(?<!#)(#{2})\"",
|
|
3674
|
+
"beginCaptures": {
|
|
3675
|
+
"1": {
|
|
3676
|
+
"name": "punctuation.definition.string.begin.baml"
|
|
3677
|
+
}
|
|
3678
|
+
},
|
|
3679
|
+
"end": "\"(#{2})",
|
|
3680
|
+
"endCaptures": {
|
|
3681
|
+
"1": {
|
|
3682
|
+
"name": "punctuation.definition.string.end.baml"
|
|
3683
|
+
}
|
|
3684
|
+
}
|
|
3685
|
+
},
|
|
3686
|
+
"raw-string-3": {
|
|
3687
|
+
"name": "string.quoted.raw.baml",
|
|
3688
|
+
"begin": "(?<!#)(#{3})\"",
|
|
3689
|
+
"beginCaptures": {
|
|
3690
|
+
"1": {
|
|
3691
|
+
"name": "punctuation.definition.string.begin.baml"
|
|
3692
|
+
}
|
|
3693
|
+
},
|
|
3694
|
+
"end": "\"(#{3})",
|
|
3695
|
+
"endCaptures": {
|
|
3696
|
+
"1": {
|
|
3697
|
+
"name": "punctuation.definition.string.end.baml"
|
|
3698
|
+
}
|
|
3699
|
+
}
|
|
3700
|
+
},
|
|
3701
|
+
"raw-string-4": {
|
|
3702
|
+
"name": "string.quoted.raw.baml",
|
|
3703
|
+
"begin": "(?<!#)(#{4})\"",
|
|
3704
|
+
"beginCaptures": {
|
|
3705
|
+
"1": {
|
|
3706
|
+
"name": "punctuation.definition.string.begin.baml"
|
|
3707
|
+
}
|
|
3708
|
+
},
|
|
3709
|
+
"end": "\"(#{4})",
|
|
3710
|
+
"endCaptures": {
|
|
3711
|
+
"1": {
|
|
3712
|
+
"name": "punctuation.definition.string.end.baml"
|
|
3713
|
+
}
|
|
3714
|
+
}
|
|
3715
|
+
},
|
|
3716
|
+
"raw-string-5": {
|
|
3717
|
+
"name": "string.quoted.raw.baml",
|
|
3718
|
+
"begin": "(?<!#)(#{5})\"",
|
|
3719
|
+
"beginCaptures": {
|
|
3720
|
+
"1": {
|
|
3721
|
+
"name": "punctuation.definition.string.begin.baml"
|
|
3722
|
+
}
|
|
3723
|
+
},
|
|
3724
|
+
"end": "\"(#{5})",
|
|
3725
|
+
"endCaptures": {
|
|
3726
|
+
"1": {
|
|
3727
|
+
"name": "punctuation.definition.string.end.baml"
|
|
3728
|
+
}
|
|
3729
|
+
}
|
|
3730
|
+
},
|
|
3731
|
+
"raw-string-6": {
|
|
3732
|
+
"name": "string.quoted.raw.baml",
|
|
3733
|
+
"begin": "(?<!#)(#{6})\"",
|
|
3734
|
+
"beginCaptures": {
|
|
3735
|
+
"1": {
|
|
3736
|
+
"name": "punctuation.definition.string.begin.baml"
|
|
3737
|
+
}
|
|
3738
|
+
},
|
|
3739
|
+
"end": "\"(#{6})",
|
|
3740
|
+
"endCaptures": {
|
|
3741
|
+
"1": {
|
|
3742
|
+
"name": "punctuation.definition.string.end.baml"
|
|
3743
|
+
}
|
|
3744
|
+
}
|
|
3745
|
+
},
|
|
3746
|
+
"raw-string-7": {
|
|
3747
|
+
"name": "string.quoted.raw.baml",
|
|
3748
|
+
"begin": "(?<!#)(#{7})\"",
|
|
3749
|
+
"beginCaptures": {
|
|
3750
|
+
"1": {
|
|
3751
|
+
"name": "punctuation.definition.string.begin.baml"
|
|
3752
|
+
}
|
|
3753
|
+
},
|
|
3754
|
+
"end": "\"(#{7})",
|
|
3755
|
+
"endCaptures": {
|
|
3756
|
+
"1": {
|
|
3757
|
+
"name": "punctuation.definition.string.end.baml"
|
|
3758
|
+
}
|
|
3759
|
+
}
|
|
3760
|
+
},
|
|
3761
|
+
"raw-string-8": {
|
|
3762
|
+
"name": "string.quoted.raw.baml",
|
|
3763
|
+
"begin": "(?<!#)(#{8})\"",
|
|
3764
|
+
"beginCaptures": {
|
|
3765
|
+
"1": {
|
|
3766
|
+
"name": "punctuation.definition.string.begin.baml"
|
|
3767
|
+
}
|
|
3768
|
+
},
|
|
3769
|
+
"end": "\"(#{8})",
|
|
3770
|
+
"endCaptures": {
|
|
3771
|
+
"1": {
|
|
3772
|
+
"name": "punctuation.definition.string.end.baml"
|
|
3773
|
+
}
|
|
3774
|
+
}
|
|
3775
|
+
},
|
|
3776
|
+
"retry-policy": {
|
|
3777
|
+
"name": "meta.retry-policy.baml",
|
|
3778
|
+
"begin": "^\\s*(retry_policy)\\s+(\\$?[A-Za-z_][A-Za-z0-9_-]*(?:\\$[A-Za-z_][A-Za-z0-9_-]*)*)\\b(?=\\s*\\{)",
|
|
3779
|
+
"beginCaptures": {
|
|
3780
|
+
"1": {
|
|
3781
|
+
"name": "keyword.declaration.retry-policy.baml"
|
|
3782
|
+
},
|
|
3783
|
+
"2": {
|
|
3784
|
+
"name": "entity.name.retry-policy.baml"
|
|
3785
|
+
}
|
|
3786
|
+
},
|
|
3787
|
+
"end": "(?<=\\})",
|
|
3788
|
+
"patterns": [
|
|
3789
|
+
{
|
|
3790
|
+
"include": "#comments"
|
|
3791
|
+
},
|
|
3792
|
+
{
|
|
3793
|
+
"include": "#config-block"
|
|
3794
|
+
}
|
|
3795
|
+
]
|
|
3796
|
+
},
|
|
3797
|
+
"return-statement": {
|
|
3798
|
+
"name": "meta.statement.return.baml",
|
|
3799
|
+
"begin": "(?:^\\s*|\\G\\s*|(?<=[{;}])\\s*)(return)\\b",
|
|
3800
|
+
"beginCaptures": {
|
|
3801
|
+
"1": {
|
|
3802
|
+
"name": "keyword.control.flow.return.baml"
|
|
3803
|
+
}
|
|
3804
|
+
},
|
|
3805
|
+
"end": "(?=[;}]|$)",
|
|
3806
|
+
"patterns": [
|
|
3807
|
+
{
|
|
3808
|
+
"include": "#comments"
|
|
3809
|
+
},
|
|
3810
|
+
{
|
|
3811
|
+
"include": "#expression"
|
|
3812
|
+
}
|
|
3813
|
+
]
|
|
3814
|
+
},
|
|
3815
|
+
"self-expression-root": {
|
|
3816
|
+
"name": "variable.language.self.baml",
|
|
3817
|
+
"match": "\\bself\\b"
|
|
3818
|
+
},
|
|
3819
|
+
"self-parameter": {
|
|
3820
|
+
"name": "meta.parameter.baml",
|
|
3821
|
+
"begin": "\\b(self)\\b(?=\\s*(?:,|\\)))",
|
|
3822
|
+
"beginCaptures": {
|
|
3823
|
+
"1": {
|
|
3824
|
+
"name": "variable.language.self.baml"
|
|
3825
|
+
}
|
|
3826
|
+
},
|
|
3827
|
+
"end": "(?=\\s*(?:,|\\)))",
|
|
3828
|
+
"patterns": [
|
|
3829
|
+
{
|
|
3830
|
+
"include": "#comments"
|
|
3831
|
+
}
|
|
3832
|
+
]
|
|
3833
|
+
},
|
|
3834
|
+
"semicolon": {
|
|
3835
|
+
"name": "punctuation.terminator.statement.baml",
|
|
3836
|
+
"match": ";"
|
|
3837
|
+
},
|
|
3838
|
+
"spawn-expression": {
|
|
3839
|
+
"name": "meta.expression.spawn.baml",
|
|
3840
|
+
"begin": "\\b(spawn)\\b",
|
|
3841
|
+
"beginCaptures": {
|
|
3842
|
+
"1": {
|
|
3843
|
+
"name": "keyword.operator.spawn.baml"
|
|
3844
|
+
}
|
|
3845
|
+
},
|
|
3846
|
+
"end": "(?<=\\})|(?=,|;|$)",
|
|
3847
|
+
"patterns": [
|
|
3848
|
+
{
|
|
3849
|
+
"include": "#comments"
|
|
3850
|
+
},
|
|
3851
|
+
{
|
|
3852
|
+
"include": "#spawn-header"
|
|
3853
|
+
},
|
|
3854
|
+
{
|
|
3855
|
+
"include": "#code-block"
|
|
3856
|
+
}
|
|
3857
|
+
]
|
|
3858
|
+
},
|
|
3859
|
+
"spawn-header": {
|
|
3860
|
+
"name": "meta.spawn.header.baml",
|
|
3861
|
+
"begin": "\\G\\s*",
|
|
3862
|
+
"end": "(?=\\{)",
|
|
3863
|
+
"patterns": [
|
|
3864
|
+
{
|
|
3865
|
+
"include": "#comments"
|
|
3866
|
+
},
|
|
3867
|
+
{
|
|
3868
|
+
"include": "#spawn-name"
|
|
3869
|
+
},
|
|
3870
|
+
{
|
|
3871
|
+
"include": "#spawn-with-clause"
|
|
3872
|
+
}
|
|
3873
|
+
]
|
|
3874
|
+
},
|
|
3875
|
+
"spawn-name": {
|
|
3876
|
+
"name": "meta.spawn.name.baml",
|
|
3877
|
+
"begin": "\\G\\s*(?!with\\b)(?=[^\\{\\r\\n])",
|
|
3878
|
+
"end": "(?=\\s+with\\b|\\s*\\{)",
|
|
3879
|
+
"patterns": [
|
|
3880
|
+
{
|
|
3881
|
+
"include": "#comments"
|
|
3882
|
+
},
|
|
3883
|
+
{
|
|
3884
|
+
"include": "#condition-expression"
|
|
3885
|
+
}
|
|
3886
|
+
]
|
|
3887
|
+
},
|
|
3888
|
+
"spawn-with-clause": {
|
|
3889
|
+
"name": "meta.spawn.options.baml",
|
|
3890
|
+
"begin": "\\b(with)\\b",
|
|
3891
|
+
"beginCaptures": {
|
|
3892
|
+
"1": {
|
|
3893
|
+
"name": "keyword.operator.with.baml"
|
|
3894
|
+
}
|
|
3895
|
+
},
|
|
3896
|
+
"end": "(?=\\{)",
|
|
3897
|
+
"patterns": [
|
|
3898
|
+
{
|
|
3899
|
+
"include": "#comments"
|
|
3900
|
+
},
|
|
3901
|
+
{
|
|
3902
|
+
"include": "#condition-expression"
|
|
3903
|
+
},
|
|
3904
|
+
{
|
|
3905
|
+
"include": "#comma"
|
|
3906
|
+
}
|
|
3907
|
+
]
|
|
3908
|
+
},
|
|
3909
|
+
"string-escape": {
|
|
3910
|
+
"patterns": [
|
|
3911
|
+
{
|
|
3912
|
+
"include": "#string-escape-control"
|
|
3913
|
+
},
|
|
3914
|
+
{
|
|
3915
|
+
"include": "#string-escape-quoted-delimiter"
|
|
3916
|
+
},
|
|
3917
|
+
{
|
|
3918
|
+
"include": "#string-escape-unknown"
|
|
3919
|
+
}
|
|
3920
|
+
]
|
|
3921
|
+
},
|
|
3922
|
+
"string-escape-control": {
|
|
3923
|
+
"name": "constant.character.escape.control.baml",
|
|
3924
|
+
"match": "\\\\[ntr0bvf]"
|
|
3925
|
+
},
|
|
3926
|
+
"string-escape-quoted-delimiter": {
|
|
3927
|
+
"name": "constant.character.escape.delimiter.baml",
|
|
3928
|
+
"match": "\\\\[\"\\\\]"
|
|
3929
|
+
},
|
|
3930
|
+
"string-escape-unknown": {
|
|
3931
|
+
"name": "constant.character.escape.unknown.baml",
|
|
3932
|
+
"match": "\\\\."
|
|
3933
|
+
},
|
|
3934
|
+
"string-literal": {
|
|
3935
|
+
"name": "string.quoted.double.baml",
|
|
3936
|
+
"begin": "\"",
|
|
3937
|
+
"beginCaptures": {
|
|
3938
|
+
"0": {
|
|
3939
|
+
"name": "punctuation.definition.string.begin.baml"
|
|
3940
|
+
}
|
|
3941
|
+
},
|
|
3942
|
+
"end": "\"",
|
|
3943
|
+
"endCaptures": {
|
|
3944
|
+
"0": {
|
|
3945
|
+
"name": "punctuation.definition.string.end.baml"
|
|
3946
|
+
}
|
|
3947
|
+
},
|
|
3948
|
+
"patterns": [
|
|
3949
|
+
{
|
|
3950
|
+
"include": "#string-escape"
|
|
3951
|
+
}
|
|
3952
|
+
]
|
|
3953
|
+
},
|
|
3954
|
+
"template-comment": {
|
|
3955
|
+
"name": "comment.block.template.baml",
|
|
3956
|
+
"begin": "\\{#",
|
|
3957
|
+
"beginCaptures": {
|
|
3958
|
+
"0": {
|
|
3959
|
+
"name": "punctuation.definition.comment.begin.baml"
|
|
3960
|
+
}
|
|
3961
|
+
},
|
|
3962
|
+
"end": "#\\}",
|
|
3963
|
+
"endCaptures": {
|
|
3964
|
+
"0": {
|
|
3965
|
+
"name": "punctuation.definition.comment.end.baml"
|
|
3966
|
+
}
|
|
3967
|
+
}
|
|
3968
|
+
},
|
|
3969
|
+
"template-control": {
|
|
3970
|
+
"name": "meta.template.control.baml",
|
|
3971
|
+
"begin": "\\{%",
|
|
3972
|
+
"beginCaptures": {
|
|
3973
|
+
"0": {
|
|
3974
|
+
"name": "punctuation.section.template.begin.baml"
|
|
3975
|
+
}
|
|
3976
|
+
},
|
|
3977
|
+
"end": "%\\}",
|
|
3978
|
+
"endCaptures": {
|
|
3979
|
+
"0": {
|
|
3980
|
+
"name": "punctuation.section.template.end.baml"
|
|
3981
|
+
}
|
|
3982
|
+
},
|
|
3983
|
+
"patterns": [
|
|
3984
|
+
{
|
|
3985
|
+
"include": "#comments"
|
|
3986
|
+
},
|
|
3987
|
+
{
|
|
3988
|
+
"include": "#template-keyword"
|
|
3989
|
+
},
|
|
3990
|
+
{
|
|
3991
|
+
"include": "#expression"
|
|
3992
|
+
}
|
|
3993
|
+
]
|
|
3994
|
+
},
|
|
3995
|
+
"template-interpolation": {
|
|
3996
|
+
"name": "meta.template.interpolation.baml",
|
|
3997
|
+
"begin": "\\{\\{",
|
|
3998
|
+
"beginCaptures": {
|
|
3999
|
+
"0": {
|
|
4000
|
+
"name": "punctuation.section.interpolation.begin.baml"
|
|
4001
|
+
}
|
|
4002
|
+
},
|
|
4003
|
+
"end": "\\}\\}",
|
|
4004
|
+
"endCaptures": {
|
|
4005
|
+
"0": {
|
|
4006
|
+
"name": "punctuation.section.interpolation.end.baml"
|
|
4007
|
+
}
|
|
4008
|
+
},
|
|
4009
|
+
"patterns": [
|
|
4010
|
+
{
|
|
4011
|
+
"include": "#comments"
|
|
4012
|
+
},
|
|
4013
|
+
{
|
|
4014
|
+
"include": "#template-keyword"
|
|
4015
|
+
},
|
|
4016
|
+
{
|
|
4017
|
+
"include": "#expression"
|
|
4018
|
+
}
|
|
4019
|
+
]
|
|
4020
|
+
},
|
|
4021
|
+
"template-keyword": {
|
|
4022
|
+
"name": "keyword.control.template.baml",
|
|
4023
|
+
"match": "\\b(?:for|endfor|if|elif|else|endif|in|set|filter|endfilter|macro|endmacro|raw|endraw)\\b"
|
|
4024
|
+
},
|
|
4025
|
+
"template-quoted-string-body": {
|
|
4026
|
+
"name": "string.quoted.double.template.baml",
|
|
4027
|
+
"begin": "\"",
|
|
4028
|
+
"beginCaptures": {
|
|
4029
|
+
"0": {
|
|
4030
|
+
"name": "punctuation.definition.string.begin.baml"
|
|
4031
|
+
}
|
|
4032
|
+
},
|
|
4033
|
+
"end": "\"",
|
|
4034
|
+
"endCaptures": {
|
|
4035
|
+
"0": {
|
|
4036
|
+
"name": "punctuation.definition.string.end.baml"
|
|
4037
|
+
}
|
|
4038
|
+
},
|
|
4039
|
+
"patterns": [
|
|
4040
|
+
{
|
|
4041
|
+
"include": "#template-comment"
|
|
4042
|
+
},
|
|
4043
|
+
{
|
|
4044
|
+
"include": "#template-control"
|
|
4045
|
+
},
|
|
4046
|
+
{
|
|
4047
|
+
"include": "#template-interpolation"
|
|
4048
|
+
},
|
|
4049
|
+
{
|
|
4050
|
+
"include": "#string-escape"
|
|
4051
|
+
}
|
|
4052
|
+
]
|
|
4053
|
+
},
|
|
4054
|
+
"template-raw-string-body-1": {
|
|
4055
|
+
"name": "string.quoted.raw.template.baml",
|
|
4056
|
+
"begin": "(?<!#)(#{1})(\")",
|
|
4057
|
+
"beginCaptures": {
|
|
4058
|
+
"1": {
|
|
4059
|
+
"name": "punctuation.definition.string.begin.baml"
|
|
4060
|
+
},
|
|
4061
|
+
"2": {
|
|
4062
|
+
"name": "punctuation.definition.string.begin.baml"
|
|
4063
|
+
}
|
|
4064
|
+
},
|
|
4065
|
+
"end": "(\")(#{1})",
|
|
4066
|
+
"endCaptures": {
|
|
4067
|
+
"1": {
|
|
4068
|
+
"name": "punctuation.definition.string.end.baml"
|
|
4069
|
+
},
|
|
4070
|
+
"2": {
|
|
4071
|
+
"name": "punctuation.definition.string.end.baml"
|
|
4072
|
+
}
|
|
4073
|
+
},
|
|
4074
|
+
"patterns": [
|
|
4075
|
+
{
|
|
4076
|
+
"include": "#template-comment"
|
|
4077
|
+
},
|
|
4078
|
+
{
|
|
4079
|
+
"include": "#template-control"
|
|
4080
|
+
},
|
|
4081
|
+
{
|
|
4082
|
+
"include": "#template-interpolation"
|
|
4083
|
+
}
|
|
4084
|
+
]
|
|
4085
|
+
},
|
|
4086
|
+
"template-raw-string-body-2": {
|
|
4087
|
+
"name": "string.quoted.raw.template.baml",
|
|
4088
|
+
"begin": "(?<!#)(#{2})(\")",
|
|
4089
|
+
"beginCaptures": {
|
|
4090
|
+
"1": {
|
|
4091
|
+
"name": "punctuation.definition.string.begin.baml"
|
|
4092
|
+
},
|
|
4093
|
+
"2": {
|
|
4094
|
+
"name": "punctuation.definition.string.begin.baml"
|
|
4095
|
+
}
|
|
4096
|
+
},
|
|
4097
|
+
"end": "(\")(#{2})",
|
|
4098
|
+
"endCaptures": {
|
|
4099
|
+
"1": {
|
|
4100
|
+
"name": "punctuation.definition.string.end.baml"
|
|
4101
|
+
},
|
|
4102
|
+
"2": {
|
|
4103
|
+
"name": "punctuation.definition.string.end.baml"
|
|
4104
|
+
}
|
|
4105
|
+
},
|
|
4106
|
+
"patterns": [
|
|
4107
|
+
{
|
|
4108
|
+
"include": "#template-comment"
|
|
4109
|
+
},
|
|
4110
|
+
{
|
|
4111
|
+
"include": "#template-control"
|
|
4112
|
+
},
|
|
4113
|
+
{
|
|
4114
|
+
"include": "#template-interpolation"
|
|
4115
|
+
}
|
|
4116
|
+
]
|
|
4117
|
+
},
|
|
4118
|
+
"template-raw-string-body-3": {
|
|
4119
|
+
"name": "string.quoted.raw.template.baml",
|
|
4120
|
+
"begin": "(?<!#)(#{3})(\")",
|
|
4121
|
+
"beginCaptures": {
|
|
4122
|
+
"1": {
|
|
4123
|
+
"name": "punctuation.definition.string.begin.baml"
|
|
4124
|
+
},
|
|
4125
|
+
"2": {
|
|
4126
|
+
"name": "punctuation.definition.string.begin.baml"
|
|
4127
|
+
}
|
|
4128
|
+
},
|
|
4129
|
+
"end": "(\")(#{3})",
|
|
4130
|
+
"endCaptures": {
|
|
4131
|
+
"1": {
|
|
4132
|
+
"name": "punctuation.definition.string.end.baml"
|
|
4133
|
+
},
|
|
4134
|
+
"2": {
|
|
4135
|
+
"name": "punctuation.definition.string.end.baml"
|
|
4136
|
+
}
|
|
4137
|
+
},
|
|
4138
|
+
"patterns": [
|
|
4139
|
+
{
|
|
4140
|
+
"include": "#template-comment"
|
|
4141
|
+
},
|
|
4142
|
+
{
|
|
4143
|
+
"include": "#template-control"
|
|
4144
|
+
},
|
|
4145
|
+
{
|
|
4146
|
+
"include": "#template-interpolation"
|
|
4147
|
+
}
|
|
4148
|
+
]
|
|
4149
|
+
},
|
|
4150
|
+
"template-raw-string-body-4": {
|
|
4151
|
+
"name": "string.quoted.raw.template.baml",
|
|
4152
|
+
"begin": "(?<!#)(#{4})(\")",
|
|
4153
|
+
"beginCaptures": {
|
|
4154
|
+
"1": {
|
|
4155
|
+
"name": "punctuation.definition.string.begin.baml"
|
|
4156
|
+
},
|
|
4157
|
+
"2": {
|
|
4158
|
+
"name": "punctuation.definition.string.begin.baml"
|
|
4159
|
+
}
|
|
4160
|
+
},
|
|
4161
|
+
"end": "(\")(#{4})",
|
|
4162
|
+
"endCaptures": {
|
|
4163
|
+
"1": {
|
|
4164
|
+
"name": "punctuation.definition.string.end.baml"
|
|
4165
|
+
},
|
|
4166
|
+
"2": {
|
|
4167
|
+
"name": "punctuation.definition.string.end.baml"
|
|
4168
|
+
}
|
|
4169
|
+
},
|
|
4170
|
+
"patterns": [
|
|
4171
|
+
{
|
|
4172
|
+
"include": "#template-comment"
|
|
4173
|
+
},
|
|
4174
|
+
{
|
|
4175
|
+
"include": "#template-control"
|
|
4176
|
+
},
|
|
4177
|
+
{
|
|
4178
|
+
"include": "#template-interpolation"
|
|
4179
|
+
}
|
|
4180
|
+
]
|
|
4181
|
+
},
|
|
4182
|
+
"template-raw-string-body-5": {
|
|
4183
|
+
"name": "string.quoted.raw.template.baml",
|
|
4184
|
+
"begin": "(?<!#)(#{5})(\")",
|
|
4185
|
+
"beginCaptures": {
|
|
4186
|
+
"1": {
|
|
4187
|
+
"name": "punctuation.definition.string.begin.baml"
|
|
4188
|
+
},
|
|
4189
|
+
"2": {
|
|
4190
|
+
"name": "punctuation.definition.string.begin.baml"
|
|
4191
|
+
}
|
|
4192
|
+
},
|
|
4193
|
+
"end": "(\")(#{5})",
|
|
4194
|
+
"endCaptures": {
|
|
4195
|
+
"1": {
|
|
4196
|
+
"name": "punctuation.definition.string.end.baml"
|
|
4197
|
+
},
|
|
4198
|
+
"2": {
|
|
4199
|
+
"name": "punctuation.definition.string.end.baml"
|
|
4200
|
+
}
|
|
4201
|
+
},
|
|
4202
|
+
"patterns": [
|
|
4203
|
+
{
|
|
4204
|
+
"include": "#template-comment"
|
|
4205
|
+
},
|
|
4206
|
+
{
|
|
4207
|
+
"include": "#template-control"
|
|
4208
|
+
},
|
|
4209
|
+
{
|
|
4210
|
+
"include": "#template-interpolation"
|
|
4211
|
+
}
|
|
4212
|
+
]
|
|
4213
|
+
},
|
|
4214
|
+
"template-raw-string-body-6": {
|
|
4215
|
+
"name": "string.quoted.raw.template.baml",
|
|
4216
|
+
"begin": "(?<!#)(#{6})(\")",
|
|
4217
|
+
"beginCaptures": {
|
|
4218
|
+
"1": {
|
|
4219
|
+
"name": "punctuation.definition.string.begin.baml"
|
|
4220
|
+
},
|
|
4221
|
+
"2": {
|
|
4222
|
+
"name": "punctuation.definition.string.begin.baml"
|
|
4223
|
+
}
|
|
4224
|
+
},
|
|
4225
|
+
"end": "(\")(#{6})",
|
|
4226
|
+
"endCaptures": {
|
|
4227
|
+
"1": {
|
|
4228
|
+
"name": "punctuation.definition.string.end.baml"
|
|
4229
|
+
},
|
|
4230
|
+
"2": {
|
|
4231
|
+
"name": "punctuation.definition.string.end.baml"
|
|
4232
|
+
}
|
|
4233
|
+
},
|
|
4234
|
+
"patterns": [
|
|
4235
|
+
{
|
|
4236
|
+
"include": "#template-comment"
|
|
4237
|
+
},
|
|
4238
|
+
{
|
|
4239
|
+
"include": "#template-control"
|
|
4240
|
+
},
|
|
4241
|
+
{
|
|
4242
|
+
"include": "#template-interpolation"
|
|
4243
|
+
}
|
|
4244
|
+
]
|
|
4245
|
+
},
|
|
4246
|
+
"template-raw-string-body-7": {
|
|
4247
|
+
"name": "string.quoted.raw.template.baml",
|
|
4248
|
+
"begin": "(?<!#)(#{7})(\")",
|
|
4249
|
+
"beginCaptures": {
|
|
4250
|
+
"1": {
|
|
4251
|
+
"name": "punctuation.definition.string.begin.baml"
|
|
4252
|
+
},
|
|
4253
|
+
"2": {
|
|
4254
|
+
"name": "punctuation.definition.string.begin.baml"
|
|
4255
|
+
}
|
|
4256
|
+
},
|
|
4257
|
+
"end": "(\")(#{7})",
|
|
4258
|
+
"endCaptures": {
|
|
4259
|
+
"1": {
|
|
4260
|
+
"name": "punctuation.definition.string.end.baml"
|
|
4261
|
+
},
|
|
4262
|
+
"2": {
|
|
4263
|
+
"name": "punctuation.definition.string.end.baml"
|
|
4264
|
+
}
|
|
4265
|
+
},
|
|
4266
|
+
"patterns": [
|
|
4267
|
+
{
|
|
4268
|
+
"include": "#template-comment"
|
|
4269
|
+
},
|
|
4270
|
+
{
|
|
4271
|
+
"include": "#template-control"
|
|
4272
|
+
},
|
|
4273
|
+
{
|
|
4274
|
+
"include": "#template-interpolation"
|
|
4275
|
+
}
|
|
4276
|
+
]
|
|
4277
|
+
},
|
|
4278
|
+
"template-raw-string-body-8": {
|
|
4279
|
+
"name": "string.quoted.raw.template.baml",
|
|
4280
|
+
"begin": "(?<!#)(#{8})(\")",
|
|
4281
|
+
"beginCaptures": {
|
|
4282
|
+
"1": {
|
|
4283
|
+
"name": "punctuation.definition.string.begin.baml"
|
|
4284
|
+
},
|
|
4285
|
+
"2": {
|
|
4286
|
+
"name": "punctuation.definition.string.begin.baml"
|
|
4287
|
+
}
|
|
4288
|
+
},
|
|
4289
|
+
"end": "(\")(#{8})",
|
|
4290
|
+
"endCaptures": {
|
|
4291
|
+
"1": {
|
|
4292
|
+
"name": "punctuation.definition.string.end.baml"
|
|
4293
|
+
},
|
|
4294
|
+
"2": {
|
|
4295
|
+
"name": "punctuation.definition.string.end.baml"
|
|
4296
|
+
}
|
|
4297
|
+
},
|
|
4298
|
+
"patterns": [
|
|
4299
|
+
{
|
|
4300
|
+
"include": "#template-comment"
|
|
4301
|
+
},
|
|
4302
|
+
{
|
|
4303
|
+
"include": "#template-control"
|
|
4304
|
+
},
|
|
4305
|
+
{
|
|
4306
|
+
"include": "#template-interpolation"
|
|
4307
|
+
}
|
|
4308
|
+
]
|
|
4309
|
+
},
|
|
4310
|
+
"template-string": {
|
|
4311
|
+
"name": "meta.template-string.baml",
|
|
4312
|
+
"begin": "^\\s*(template_string)\\b",
|
|
4313
|
+
"beginCaptures": {
|
|
4314
|
+
"1": {
|
|
4315
|
+
"name": "keyword.declaration.template-string.baml"
|
|
4316
|
+
}
|
|
4317
|
+
},
|
|
4318
|
+
"end": "(?:(?<=#)|(?<=\"))(?=\\s*(?:\\r?\\n|$))|(?=^\\s*(?:client|retry_policy|generator|template_string|class|enum|interface|implements|implement|function|testset|test|type)\\b)",
|
|
4319
|
+
"patterns": [
|
|
4320
|
+
{
|
|
4321
|
+
"include": "#comments"
|
|
4322
|
+
},
|
|
4323
|
+
{
|
|
4324
|
+
"include": "#template-string-name"
|
|
4325
|
+
},
|
|
4326
|
+
{
|
|
4327
|
+
"include": "#function-parameters"
|
|
4328
|
+
},
|
|
4329
|
+
{
|
|
4330
|
+
"include": "#template-string-body"
|
|
4331
|
+
}
|
|
4332
|
+
]
|
|
4333
|
+
},
|
|
4334
|
+
"template-string-body": {
|
|
4335
|
+
"patterns": [
|
|
4336
|
+
{
|
|
4337
|
+
"include": "#template-raw-string-body-8"
|
|
4338
|
+
},
|
|
4339
|
+
{
|
|
4340
|
+
"include": "#template-raw-string-body-7"
|
|
4341
|
+
},
|
|
4342
|
+
{
|
|
4343
|
+
"include": "#template-raw-string-body-6"
|
|
4344
|
+
},
|
|
4345
|
+
{
|
|
4346
|
+
"include": "#template-raw-string-body-5"
|
|
4347
|
+
},
|
|
4348
|
+
{
|
|
4349
|
+
"include": "#template-raw-string-body-4"
|
|
4350
|
+
},
|
|
4351
|
+
{
|
|
4352
|
+
"include": "#template-raw-string-body-3"
|
|
4353
|
+
},
|
|
4354
|
+
{
|
|
4355
|
+
"include": "#template-raw-string-body-2"
|
|
4356
|
+
},
|
|
4357
|
+
{
|
|
4358
|
+
"include": "#template-raw-string-body-1"
|
|
4359
|
+
},
|
|
4360
|
+
{
|
|
4361
|
+
"include": "#template-quoted-string-body"
|
|
4362
|
+
}
|
|
4363
|
+
]
|
|
4364
|
+
},
|
|
4365
|
+
"template-string-name": {
|
|
4366
|
+
"name": "entity.name.function.template-string.baml",
|
|
4367
|
+
"match": "\\b\\$?[A-Za-z_][A-Za-z0-9_-]*(?:\\$[A-Za-z_][A-Za-z0-9_-]*)*\\b"
|
|
4368
|
+
},
|
|
4369
|
+
"test": {
|
|
4370
|
+
"name": "meta.test.baml",
|
|
4371
|
+
"begin": "^\\s*(test)\\b(?!(?:[^\\S\\r\\n]+\\$?[A-Za-z_][A-Za-z0-9_-]*(?:\\$[A-Za-z_][A-Za-z0-9_-]*)*[^\\S\\r\\n]*\\{[^\\S\\r\\n]*(?:functions|type_builder)\\b))",
|
|
4372
|
+
"beginCaptures": {
|
|
4373
|
+
"1": {
|
|
4374
|
+
"name": "keyword.declaration.test.baml"
|
|
4375
|
+
}
|
|
4376
|
+
},
|
|
4377
|
+
"end": "(?<=\\})",
|
|
4378
|
+
"patterns": [
|
|
4379
|
+
{
|
|
4380
|
+
"include": "#comments"
|
|
4381
|
+
},
|
|
4382
|
+
{
|
|
4383
|
+
"include": "#test-header"
|
|
4384
|
+
},
|
|
4385
|
+
{
|
|
4386
|
+
"include": "#code-block"
|
|
4387
|
+
}
|
|
4388
|
+
]
|
|
4389
|
+
},
|
|
4390
|
+
"test-header": {
|
|
4391
|
+
"name": "meta.test.header.baml",
|
|
4392
|
+
"begin": "\\G\\s*",
|
|
4393
|
+
"end": "(?=\\{)",
|
|
4394
|
+
"patterns": [
|
|
4395
|
+
{
|
|
4396
|
+
"include": "#comments"
|
|
4397
|
+
},
|
|
4398
|
+
{
|
|
4399
|
+
"include": "#test-with-keyword"
|
|
4400
|
+
},
|
|
4401
|
+
{
|
|
4402
|
+
"include": "#condition-expression"
|
|
4403
|
+
}
|
|
4404
|
+
]
|
|
4405
|
+
},
|
|
4406
|
+
"test-with-keyword": {
|
|
4407
|
+
"name": "keyword.operator.with.baml",
|
|
4408
|
+
"match": "\\bwith\\b"
|
|
4409
|
+
},
|
|
4410
|
+
"testset": {
|
|
4411
|
+
"name": "meta.testset.baml",
|
|
4412
|
+
"begin": "^\\s*(testset)\\b",
|
|
4413
|
+
"beginCaptures": {
|
|
4414
|
+
"1": {
|
|
4415
|
+
"name": "keyword.declaration.testset.baml"
|
|
4416
|
+
}
|
|
4417
|
+
},
|
|
4418
|
+
"end": "(?<=\\})",
|
|
4419
|
+
"patterns": [
|
|
4420
|
+
{
|
|
4421
|
+
"include": "#comments"
|
|
4422
|
+
},
|
|
4423
|
+
{
|
|
4424
|
+
"include": "#test-header"
|
|
4425
|
+
},
|
|
4426
|
+
{
|
|
4427
|
+
"include": "#testset-body"
|
|
4428
|
+
}
|
|
4429
|
+
]
|
|
4430
|
+
},
|
|
4431
|
+
"testset-body": {
|
|
4432
|
+
"name": "meta.testset.body.baml",
|
|
4433
|
+
"begin": "\\{",
|
|
4434
|
+
"beginCaptures": {
|
|
4435
|
+
"0": {
|
|
4436
|
+
"name": "punctuation.definition.block.begin.baml"
|
|
4437
|
+
}
|
|
4438
|
+
},
|
|
4439
|
+
"end": "\\}",
|
|
4440
|
+
"endCaptures": {
|
|
4441
|
+
"0": {
|
|
4442
|
+
"name": "punctuation.definition.block.end.baml"
|
|
4443
|
+
}
|
|
4444
|
+
},
|
|
4445
|
+
"patterns": [
|
|
4446
|
+
{
|
|
4447
|
+
"include": "#comments"
|
|
4448
|
+
},
|
|
4449
|
+
{
|
|
4450
|
+
"include": "#block-contents"
|
|
4451
|
+
}
|
|
4452
|
+
]
|
|
4453
|
+
},
|
|
4454
|
+
"throw-expression": {
|
|
4455
|
+
"name": "keyword.control.flow.throw.baml",
|
|
4456
|
+
"match": "\\bthrow\\b"
|
|
4457
|
+
},
|
|
4458
|
+
"type-alias": {
|
|
4459
|
+
"name": "meta.type-alias.baml",
|
|
4460
|
+
"begin": "^\\s*(type)\\s+(\\$?[A-Za-z_][A-Za-z0-9_-]*(?:\\$[A-Za-z_][A-Za-z0-9_-]*)*)\\s*(=)",
|
|
4461
|
+
"beginCaptures": {
|
|
4462
|
+
"1": {
|
|
4463
|
+
"name": "keyword.declaration.type-alias.baml"
|
|
4464
|
+
},
|
|
4465
|
+
"2": {
|
|
4466
|
+
"name": "entity.name.type.alias.baml"
|
|
4467
|
+
},
|
|
4468
|
+
"3": {
|
|
4469
|
+
"name": "keyword.operator.assignment.baml"
|
|
4470
|
+
}
|
|
4471
|
+
},
|
|
4472
|
+
"end": "(?<=;)|(?=^\\s*(?:client|retry_policy|generator|template_string|class|enum|interface|implements|implement|function|testset|test|type)\\b)",
|
|
4473
|
+
"patterns": [
|
|
4474
|
+
{
|
|
4475
|
+
"include": "#comments"
|
|
4476
|
+
},
|
|
4477
|
+
{
|
|
4478
|
+
"include": "#type-expression"
|
|
4479
|
+
},
|
|
4480
|
+
{
|
|
4481
|
+
"include": "#semicolon"
|
|
4482
|
+
}
|
|
4483
|
+
]
|
|
4484
|
+
},
|
|
4485
|
+
"type-arrow-operator": {
|
|
4486
|
+
"name": "keyword.operator.arrow.baml",
|
|
4487
|
+
"match": "->"
|
|
4488
|
+
},
|
|
4489
|
+
"type-as-operator": {
|
|
4490
|
+
"name": "keyword.operator.as.baml",
|
|
4491
|
+
"match": "\\bas\\b"
|
|
4492
|
+
},
|
|
4493
|
+
"type-expression": {
|
|
4494
|
+
"patterns": [
|
|
4495
|
+
{
|
|
4496
|
+
"include": "#comments"
|
|
4497
|
+
},
|
|
4498
|
+
{
|
|
4499
|
+
"include": "#primitive-type"
|
|
4500
|
+
},
|
|
4501
|
+
{
|
|
4502
|
+
"include": "#type-literal"
|
|
4503
|
+
},
|
|
4504
|
+
{
|
|
4505
|
+
"include": "#type-arrow-operator"
|
|
4506
|
+
},
|
|
4507
|
+
{
|
|
4508
|
+
"include": "#type-throws-operator"
|
|
4509
|
+
},
|
|
4510
|
+
{
|
|
4511
|
+
"include": "#associated-type-projection"
|
|
4512
|
+
},
|
|
4513
|
+
{
|
|
4514
|
+
"include": "#type-reference"
|
|
4515
|
+
},
|
|
4516
|
+
{
|
|
4517
|
+
"include": "#bare-attribute"
|
|
4518
|
+
},
|
|
4519
|
+
{
|
|
4520
|
+
"include": "#attribute"
|
|
4521
|
+
},
|
|
4522
|
+
{
|
|
4523
|
+
"include": "#type-as-operator"
|
|
4524
|
+
},
|
|
4525
|
+
{
|
|
4526
|
+
"include": "#assignment-operator"
|
|
4527
|
+
},
|
|
4528
|
+
{
|
|
4529
|
+
"include": "#optional-operator"
|
|
4530
|
+
},
|
|
4531
|
+
{
|
|
4532
|
+
"include": "#union-operator"
|
|
4533
|
+
},
|
|
4534
|
+
{
|
|
4535
|
+
"include": "#type-punctuation"
|
|
4536
|
+
},
|
|
4537
|
+
{
|
|
4538
|
+
"include": "#colon-separator"
|
|
4539
|
+
}
|
|
4540
|
+
]
|
|
4541
|
+
},
|
|
4542
|
+
"type-literal": {
|
|
4543
|
+
"patterns": [
|
|
4544
|
+
{
|
|
4545
|
+
"include": "#boolean-literal"
|
|
4546
|
+
},
|
|
4547
|
+
{
|
|
4548
|
+
"include": "#null-literal"
|
|
4549
|
+
},
|
|
4550
|
+
{
|
|
4551
|
+
"include": "#numeric-literal"
|
|
4552
|
+
},
|
|
4553
|
+
{
|
|
4554
|
+
"include": "#string-literal"
|
|
4555
|
+
},
|
|
4556
|
+
{
|
|
4557
|
+
"include": "#raw-string"
|
|
4558
|
+
},
|
|
4559
|
+
{
|
|
4560
|
+
"include": "#backtick-string"
|
|
4561
|
+
}
|
|
4562
|
+
]
|
|
4563
|
+
},
|
|
4564
|
+
"type-punctuation": {
|
|
4565
|
+
"name": "punctuation.definition.type.baml",
|
|
4566
|
+
"match": "[\\[\\]<>,()]"
|
|
4567
|
+
},
|
|
4568
|
+
"type-reference": {
|
|
4569
|
+
"name": "meta.type-reference.baml",
|
|
4570
|
+
"match": "\\b(?:(\\$?[A-Za-z_][A-Za-z0-9_-]*(?:\\$[A-Za-z_][A-Za-z0-9_-]*)*)\\s*(\\.)\\s*)?((?:\\$?[A-Za-z_][A-Za-z0-9_-]*(?:\\$[A-Za-z_][A-Za-z0-9_-]*)*\\s*\\.\\s*)*)(\\$?[A-Za-z_][A-Za-z0-9_-]*(?:\\$[A-Za-z_][A-Za-z0-9_-]*)*)\\b",
|
|
4571
|
+
"captures": {
|
|
4572
|
+
"1": {
|
|
4573
|
+
"patterns": [
|
|
4574
|
+
{
|
|
4575
|
+
"include": "#namespace-root"
|
|
4576
|
+
},
|
|
4577
|
+
{
|
|
4578
|
+
"include": "#namespace-segment"
|
|
4579
|
+
}
|
|
4580
|
+
]
|
|
4581
|
+
},
|
|
4582
|
+
"2": {
|
|
4583
|
+
"name": "punctuation.accessor.baml"
|
|
4584
|
+
},
|
|
4585
|
+
"3": {
|
|
4586
|
+
"patterns": [
|
|
4587
|
+
{
|
|
4588
|
+
"include": "#namespace-segment"
|
|
4589
|
+
},
|
|
4590
|
+
{
|
|
4591
|
+
"include": "#accessor-dot"
|
|
4592
|
+
}
|
|
4593
|
+
]
|
|
4594
|
+
},
|
|
4595
|
+
"4": {
|
|
4596
|
+
"name": "entity.name.type.baml"
|
|
4597
|
+
}
|
|
4598
|
+
}
|
|
4599
|
+
},
|
|
4600
|
+
"type-throws-operator": {
|
|
4601
|
+
"name": "keyword.operator.throws.baml",
|
|
4602
|
+
"match": "\\bthrows\\b"
|
|
4603
|
+
},
|
|
4604
|
+
"typed-binding-pattern": {
|
|
4605
|
+
"name": "meta.pattern.binding.baml",
|
|
4606
|
+
"match": "\\b((?:let|const))\\s+(\\$?[A-Za-z_][A-Za-z0-9_-]*(?:\\$[A-Za-z_][A-Za-z0-9_-]*)*)\\b\\s*(:)",
|
|
4607
|
+
"captures": {
|
|
4608
|
+
"1": {
|
|
4609
|
+
"name": "keyword.declaration.binding.baml"
|
|
4610
|
+
},
|
|
4611
|
+
"2": {
|
|
4612
|
+
"name": "variable.other.binding.baml"
|
|
4613
|
+
},
|
|
4614
|
+
"3": {
|
|
4615
|
+
"name": "punctuation.separator.colon.baml"
|
|
4616
|
+
}
|
|
4617
|
+
}
|
|
4618
|
+
},
|
|
4619
|
+
"union-operator": {
|
|
4620
|
+
"name": "keyword.operator.type.baml",
|
|
4621
|
+
"match": "\\|"
|
|
4622
|
+
},
|
|
4623
|
+
"upcast-expression": {
|
|
4624
|
+
"name": "meta.expression.upcast.baml",
|
|
4625
|
+
"begin": "(\\.)\\s*(as)\\b(?=\\s*<)",
|
|
4626
|
+
"beginCaptures": {
|
|
4627
|
+
"1": {
|
|
4628
|
+
"name": "punctuation.accessor.baml"
|
|
4629
|
+
},
|
|
4630
|
+
"2": {
|
|
4631
|
+
"name": "keyword.operator.as.baml"
|
|
4632
|
+
}
|
|
4633
|
+
},
|
|
4634
|
+
"end": "(?<=>)",
|
|
4635
|
+
"patterns": [
|
|
4636
|
+
{
|
|
4637
|
+
"include": "#comments"
|
|
4638
|
+
},
|
|
4639
|
+
{
|
|
4640
|
+
"include": "#upcast-type-arguments"
|
|
4641
|
+
}
|
|
4642
|
+
]
|
|
4643
|
+
},
|
|
4644
|
+
"upcast-type-arguments": {
|
|
4645
|
+
"name": "meta.type-arguments.baml",
|
|
4646
|
+
"begin": "<",
|
|
4647
|
+
"beginCaptures": {
|
|
4648
|
+
"0": {
|
|
4649
|
+
"name": "punctuation.definition.type-arguments.begin.baml"
|
|
4650
|
+
}
|
|
4651
|
+
},
|
|
4652
|
+
"end": ">",
|
|
4653
|
+
"endCaptures": {
|
|
4654
|
+
"0": {
|
|
4655
|
+
"name": "punctuation.definition.type-arguments.end.baml"
|
|
4656
|
+
}
|
|
4657
|
+
},
|
|
4658
|
+
"patterns": [
|
|
4659
|
+
{
|
|
4660
|
+
"include": "#comments"
|
|
4661
|
+
},
|
|
4662
|
+
{
|
|
4663
|
+
"include": "#type-expression"
|
|
4664
|
+
}
|
|
4665
|
+
]
|
|
4666
|
+
},
|
|
4667
|
+
"watch-statement": {
|
|
4668
|
+
"name": "meta.statement.watch.baml",
|
|
4669
|
+
"begin": "(?:^\\s*|\\G\\s*|(?<=[{;}])\\s*)(watch)\\b",
|
|
4670
|
+
"beginCaptures": {
|
|
4671
|
+
"1": {
|
|
4672
|
+
"name": "keyword.control.watch.baml"
|
|
4673
|
+
}
|
|
4674
|
+
},
|
|
4675
|
+
"end": "(?=[;}]|$)",
|
|
4676
|
+
"patterns": [
|
|
4677
|
+
{
|
|
4678
|
+
"include": "#comments"
|
|
4679
|
+
},
|
|
4680
|
+
{
|
|
4681
|
+
"include": "#watch-statement-pattern"
|
|
4682
|
+
},
|
|
4683
|
+
{
|
|
4684
|
+
"include": "#assignment-operator"
|
|
4685
|
+
},
|
|
4686
|
+
{
|
|
4687
|
+
"include": "#expression"
|
|
4688
|
+
}
|
|
4689
|
+
]
|
|
4690
|
+
},
|
|
4691
|
+
"watch-statement-pattern": {
|
|
4692
|
+
"name": "meta.pattern.watch.baml",
|
|
4693
|
+
"begin": "\\G\\s*(?=(?:let|const)\\b)",
|
|
4694
|
+
"end": "(?=\\s*=)",
|
|
4695
|
+
"patterns": [
|
|
4696
|
+
{
|
|
4697
|
+
"include": "#comments"
|
|
4698
|
+
},
|
|
4699
|
+
{
|
|
4700
|
+
"include": "#pattern"
|
|
4701
|
+
}
|
|
4702
|
+
]
|
|
4703
|
+
},
|
|
4704
|
+
"while-condition": {
|
|
4705
|
+
"name": "meta.while.condition.baml",
|
|
4706
|
+
"begin": "\\G\\s*",
|
|
4707
|
+
"end": "(?=\\{)",
|
|
4708
|
+
"patterns": [
|
|
4709
|
+
{
|
|
4710
|
+
"include": "#comments"
|
|
4711
|
+
},
|
|
4712
|
+
{
|
|
4713
|
+
"include": "#condition-expression"
|
|
4714
|
+
}
|
|
4715
|
+
]
|
|
4716
|
+
},
|
|
4717
|
+
"while-let-pattern": {
|
|
4718
|
+
"name": "meta.pattern.while-let.baml",
|
|
4719
|
+
"begin": "\\G\\s*(?=(?:let|const)\\b)",
|
|
4720
|
+
"end": "(?=\\s*=)",
|
|
4721
|
+
"patterns": [
|
|
4722
|
+
{
|
|
4723
|
+
"include": "#comments"
|
|
4724
|
+
},
|
|
4725
|
+
{
|
|
4726
|
+
"include": "#pattern"
|
|
4727
|
+
}
|
|
4728
|
+
]
|
|
4729
|
+
},
|
|
4730
|
+
"while-statement": {
|
|
4731
|
+
"name": "meta.statement.while.baml",
|
|
4732
|
+
"begin": "\\b(while)\\b",
|
|
4733
|
+
"beginCaptures": {
|
|
4734
|
+
"1": {
|
|
4735
|
+
"name": "keyword.control.loop.while.baml"
|
|
4736
|
+
}
|
|
4737
|
+
},
|
|
4738
|
+
"end": "(?<=\\})(?=\\s*(?:;|$))|(?=;|$)",
|
|
4739
|
+
"patterns": [
|
|
4740
|
+
{
|
|
4741
|
+
"include": "#comments"
|
|
4742
|
+
},
|
|
4743
|
+
{
|
|
4744
|
+
"include": "#while-let-pattern"
|
|
4745
|
+
},
|
|
4746
|
+
{
|
|
4747
|
+
"include": "#assignment-operator"
|
|
4748
|
+
},
|
|
4749
|
+
{
|
|
4750
|
+
"include": "#while-condition"
|
|
4751
|
+
},
|
|
4752
|
+
{
|
|
4753
|
+
"include": "#code-block"
|
|
4754
|
+
}
|
|
4755
|
+
]
|
|
4756
|
+
},
|
|
4757
|
+
"wildcard-binding-pattern": {
|
|
4758
|
+
"name": "meta.pattern.wildcard.baml",
|
|
4759
|
+
"match": "\\b((?:let|const))\\s+(_)\\b",
|
|
4760
|
+
"captures": {
|
|
4761
|
+
"1": {
|
|
4762
|
+
"name": "keyword.declaration.binding.baml"
|
|
4763
|
+
},
|
|
4764
|
+
"2": {
|
|
4765
|
+
"name": "variable.language.wildcard.baml"
|
|
4766
|
+
}
|
|
4767
|
+
}
|
|
4768
|
+
},
|
|
4769
|
+
"wildcard-pattern": {
|
|
4770
|
+
"name": "variable.language.wildcard.baml",
|
|
4771
|
+
"match": "\\b_\\b"
|
|
4772
|
+
}
|
|
4773
|
+
}
|
|
4774
|
+
}
|