@iyio/syn-taxi 0.7.29 → 0.7.33
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/esm/src/lib/grammar/convo.d.ts +220 -27
- package/esm/src/lib/grammar/convo.js +198 -41
- package/esm/src/lib/grammar/convo.js.map +1 -1
- package/package.json +5 -5
- package/src/lib/grammar/convo.d.ts +220 -27
- package/src/lib/grammar/convo.js +198 -41
- package/src/lib/grammar/convo.js.map +1 -1
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Convo-Lang grammar
|
|
3
|
+
*/
|
|
1
4
|
export declare const convoGrammar: {
|
|
2
5
|
$schema: string;
|
|
3
6
|
name: string;
|
|
@@ -48,6 +51,42 @@ export declare const convoGrammar: {
|
|
|
48
51
|
};
|
|
49
52
|
};
|
|
50
53
|
};
|
|
54
|
+
thinkingRole: {
|
|
55
|
+
match: string;
|
|
56
|
+
captures: {
|
|
57
|
+
"1": {
|
|
58
|
+
name: string;
|
|
59
|
+
};
|
|
60
|
+
"2": {
|
|
61
|
+
name: string;
|
|
62
|
+
};
|
|
63
|
+
"3": {
|
|
64
|
+
name: string;
|
|
65
|
+
patterns: {
|
|
66
|
+
include: string;
|
|
67
|
+
}[];
|
|
68
|
+
};
|
|
69
|
+
"5": {
|
|
70
|
+
name: string;
|
|
71
|
+
};
|
|
72
|
+
"6": {
|
|
73
|
+
patterns: {
|
|
74
|
+
include: string;
|
|
75
|
+
}[];
|
|
76
|
+
};
|
|
77
|
+
"7": {
|
|
78
|
+
name: string;
|
|
79
|
+
};
|
|
80
|
+
};
|
|
81
|
+
};
|
|
82
|
+
thinkingRoleTrigger: {
|
|
83
|
+
match: string;
|
|
84
|
+
captures: {
|
|
85
|
+
"1": {
|
|
86
|
+
name: string;
|
|
87
|
+
};
|
|
88
|
+
};
|
|
89
|
+
};
|
|
51
90
|
embedEscape: {
|
|
52
91
|
match: string;
|
|
53
92
|
captures: {
|
|
@@ -192,14 +231,96 @@ export declare const convoGrammar: {
|
|
|
192
231
|
}[];
|
|
193
232
|
};
|
|
194
233
|
functionCall: {
|
|
234
|
+
patterns: {
|
|
235
|
+
include: string;
|
|
236
|
+
}[];
|
|
237
|
+
};
|
|
238
|
+
functionCallSystem: {
|
|
239
|
+
begin: string;
|
|
240
|
+
end: string;
|
|
241
|
+
beginCaptures: {
|
|
242
|
+
"1": {
|
|
243
|
+
name: string;
|
|
244
|
+
};
|
|
245
|
+
"2": {
|
|
246
|
+
name: string;
|
|
247
|
+
};
|
|
248
|
+
};
|
|
249
|
+
endCaptures: {
|
|
250
|
+
"0": {
|
|
251
|
+
name: string;
|
|
252
|
+
};
|
|
253
|
+
};
|
|
254
|
+
patterns: {
|
|
255
|
+
include: string;
|
|
256
|
+
}[];
|
|
257
|
+
};
|
|
258
|
+
functionCallOperator: {
|
|
259
|
+
begin: string;
|
|
260
|
+
end: string;
|
|
261
|
+
beginCaptures: {
|
|
262
|
+
"1": {
|
|
263
|
+
name: string;
|
|
264
|
+
};
|
|
265
|
+
"2": {
|
|
266
|
+
name: string;
|
|
267
|
+
};
|
|
268
|
+
};
|
|
269
|
+
endCaptures: {
|
|
270
|
+
"0": {
|
|
271
|
+
name: string;
|
|
272
|
+
};
|
|
273
|
+
};
|
|
274
|
+
patterns: {
|
|
275
|
+
include: string;
|
|
276
|
+
}[];
|
|
277
|
+
};
|
|
278
|
+
functionCallType: {
|
|
279
|
+
begin: string;
|
|
280
|
+
end: string;
|
|
281
|
+
beginCaptures: {
|
|
282
|
+
"1": {
|
|
283
|
+
name: string;
|
|
284
|
+
};
|
|
285
|
+
"2": {
|
|
286
|
+
name: string;
|
|
287
|
+
};
|
|
288
|
+
};
|
|
289
|
+
endCaptures: {
|
|
290
|
+
"0": {
|
|
291
|
+
name: string;
|
|
292
|
+
};
|
|
293
|
+
};
|
|
294
|
+
patterns: {
|
|
295
|
+
include: string;
|
|
296
|
+
}[];
|
|
297
|
+
};
|
|
298
|
+
functionCallLogic: {
|
|
299
|
+
begin: string;
|
|
300
|
+
end: string;
|
|
301
|
+
beginCaptures: {
|
|
302
|
+
"1": {
|
|
303
|
+
name: string;
|
|
304
|
+
};
|
|
305
|
+
"2": {
|
|
306
|
+
name: string;
|
|
307
|
+
};
|
|
308
|
+
};
|
|
309
|
+
endCaptures: {
|
|
310
|
+
"0": {
|
|
311
|
+
name: string;
|
|
312
|
+
};
|
|
313
|
+
};
|
|
314
|
+
patterns: {
|
|
315
|
+
include: string;
|
|
316
|
+
}[];
|
|
317
|
+
};
|
|
318
|
+
functionCallDefault: {
|
|
195
319
|
begin: string;
|
|
196
320
|
end: string;
|
|
197
321
|
beginCaptures: {
|
|
198
322
|
"1": {
|
|
199
323
|
name: string;
|
|
200
|
-
patterns: {
|
|
201
|
-
include: string;
|
|
202
|
-
}[];
|
|
203
324
|
};
|
|
204
325
|
"2": {
|
|
205
326
|
name: string;
|
|
@@ -214,6 +335,21 @@ export declare const convoGrammar: {
|
|
|
214
335
|
include: string;
|
|
215
336
|
}[];
|
|
216
337
|
};
|
|
338
|
+
bodyComment: {
|
|
339
|
+
patterns: ({
|
|
340
|
+
match: string;
|
|
341
|
+
name: string;
|
|
342
|
+
captures?: undefined;
|
|
343
|
+
} | {
|
|
344
|
+
match: string;
|
|
345
|
+
name: string;
|
|
346
|
+
captures: {
|
|
347
|
+
"0": {
|
|
348
|
+
name: string;
|
|
349
|
+
};
|
|
350
|
+
};
|
|
351
|
+
})[];
|
|
352
|
+
};
|
|
217
353
|
comment: {
|
|
218
354
|
patterns: ({
|
|
219
355
|
match: string;
|
|
@@ -230,7 +366,6 @@ export declare const convoGrammar: {
|
|
|
230
366
|
})[];
|
|
231
367
|
};
|
|
232
368
|
tag: {
|
|
233
|
-
_match: string;
|
|
234
369
|
match: string;
|
|
235
370
|
captures: {
|
|
236
371
|
"1": {
|
|
@@ -240,23 +375,58 @@ export declare const convoGrammar: {
|
|
|
240
375
|
name: string;
|
|
241
376
|
};
|
|
242
377
|
"4": {
|
|
243
|
-
|
|
378
|
+
patterns: {
|
|
379
|
+
include: string;
|
|
380
|
+
}[];
|
|
244
381
|
};
|
|
245
382
|
"5": {
|
|
246
383
|
name: string;
|
|
247
384
|
};
|
|
248
|
-
"
|
|
385
|
+
"6": {
|
|
249
386
|
name: string;
|
|
250
387
|
};
|
|
251
|
-
"
|
|
388
|
+
"8": {
|
|
389
|
+
name: string;
|
|
390
|
+
};
|
|
391
|
+
"10": {
|
|
252
392
|
patterns: {
|
|
253
393
|
include: string;
|
|
254
394
|
}[];
|
|
255
395
|
};
|
|
256
|
-
"
|
|
396
|
+
"12": {
|
|
257
397
|
name: string;
|
|
258
398
|
};
|
|
259
|
-
"
|
|
399
|
+
"13": {
|
|
400
|
+
name: string;
|
|
401
|
+
};
|
|
402
|
+
};
|
|
403
|
+
};
|
|
404
|
+
tagEvent: {
|
|
405
|
+
match: string;
|
|
406
|
+
captures: {
|
|
407
|
+
"1": {
|
|
408
|
+
name: string;
|
|
409
|
+
};
|
|
410
|
+
"2": {
|
|
411
|
+
name: string;
|
|
412
|
+
};
|
|
413
|
+
"5": {
|
|
414
|
+
patterns: {
|
|
415
|
+
include: string;
|
|
416
|
+
}[];
|
|
417
|
+
};
|
|
418
|
+
"6": {
|
|
419
|
+
name: string;
|
|
420
|
+
};
|
|
421
|
+
};
|
|
422
|
+
};
|
|
423
|
+
tagEventFallback: {
|
|
424
|
+
match: string;
|
|
425
|
+
captures: {
|
|
426
|
+
"1": {
|
|
427
|
+
name: string;
|
|
428
|
+
};
|
|
429
|
+
"2": {
|
|
260
430
|
name: string;
|
|
261
431
|
};
|
|
262
432
|
};
|
|
@@ -331,23 +501,6 @@ export declare const convoGrammar: {
|
|
|
331
501
|
include: string;
|
|
332
502
|
}[];
|
|
333
503
|
};
|
|
334
|
-
stringPromptMods: {
|
|
335
|
-
match: string;
|
|
336
|
-
captures: {
|
|
337
|
-
"2": {
|
|
338
|
-
name: string;
|
|
339
|
-
};
|
|
340
|
-
"3": {
|
|
341
|
-
name: string;
|
|
342
|
-
};
|
|
343
|
-
"5": {
|
|
344
|
-
name: string;
|
|
345
|
-
};
|
|
346
|
-
"6": {
|
|
347
|
-
name: string;
|
|
348
|
-
};
|
|
349
|
-
};
|
|
350
|
-
};
|
|
351
504
|
stringEmbed: {
|
|
352
505
|
begin: string;
|
|
353
506
|
end: string;
|
|
@@ -359,7 +512,9 @@ export declare const convoGrammar: {
|
|
|
359
512
|
name: string;
|
|
360
513
|
};
|
|
361
514
|
"4": {
|
|
362
|
-
|
|
515
|
+
patterns: {
|
|
516
|
+
include: string;
|
|
517
|
+
}[];
|
|
363
518
|
};
|
|
364
519
|
"5": {
|
|
365
520
|
name: string;
|
|
@@ -374,6 +529,44 @@ export declare const convoGrammar: {
|
|
|
374
529
|
include: string;
|
|
375
530
|
}[];
|
|
376
531
|
};
|
|
532
|
+
stringMods: {
|
|
533
|
+
match: string;
|
|
534
|
+
captures: {
|
|
535
|
+
"3": {
|
|
536
|
+
name: string;
|
|
537
|
+
};
|
|
538
|
+
"4": {
|
|
539
|
+
name: string;
|
|
540
|
+
};
|
|
541
|
+
"5": {
|
|
542
|
+
name: string;
|
|
543
|
+
};
|
|
544
|
+
"6": {
|
|
545
|
+
name: string;
|
|
546
|
+
};
|
|
547
|
+
"7": {
|
|
548
|
+
name: string;
|
|
549
|
+
};
|
|
550
|
+
"9": {
|
|
551
|
+
name: string;
|
|
552
|
+
};
|
|
553
|
+
"10": {
|
|
554
|
+
name: string;
|
|
555
|
+
};
|
|
556
|
+
"11": {
|
|
557
|
+
name: string;
|
|
558
|
+
};
|
|
559
|
+
"13": {
|
|
560
|
+
name: string;
|
|
561
|
+
};
|
|
562
|
+
"14": {
|
|
563
|
+
name: string;
|
|
564
|
+
};
|
|
565
|
+
"15": {
|
|
566
|
+
name: string;
|
|
567
|
+
};
|
|
568
|
+
};
|
|
569
|
+
};
|
|
377
570
|
stringDq: {
|
|
378
571
|
begin: string;
|
|
379
572
|
end: string;
|
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
// to inspect grammar tokens
|
|
2
|
+
// open command palette (ctrl+shift+p)
|
|
3
|
+
// Search "Inspect Editor Tokens and Scopes"
|
|
4
|
+
// or (shift+alt+cmd+i)
|
|
5
|
+
/**
|
|
6
|
+
* Convo-Lang grammar
|
|
7
|
+
*/
|
|
1
8
|
export const convoGrammar = {
|
|
2
9
|
"$schema": "https://raw.githubusercontent.com/martinring/tmlanguage/master/tmlanguage.json",
|
|
3
10
|
"name": "convo",
|
|
@@ -19,6 +26,7 @@ export const convoGrammar = {
|
|
|
19
26
|
{ "include": "#controlFlowStatements" },
|
|
20
27
|
{ "include": "#insert" },
|
|
21
28
|
{ "include": "#nop" },
|
|
29
|
+
{ "include": "#thinkingRole" },
|
|
22
30
|
{ "include": "#function" },
|
|
23
31
|
{ "include": "#role" },
|
|
24
32
|
{ "include": "#functionBody" },
|
|
@@ -71,6 +79,30 @@ export const convoGrammar = {
|
|
|
71
79
|
}
|
|
72
80
|
}
|
|
73
81
|
},
|
|
82
|
+
"thinkingRole": {
|
|
83
|
+
"match": "^\\s*(>)\\s*(thinking)\\s+([\\w \\t]+)((\\()([^\\)]*)(\\)))?",
|
|
84
|
+
"captures": {
|
|
85
|
+
"1": {
|
|
86
|
+
"name": "keyword.control"
|
|
87
|
+
},
|
|
88
|
+
"2": {
|
|
89
|
+
"name": "storage.modifier"
|
|
90
|
+
},
|
|
91
|
+
"3": {
|
|
92
|
+
"name": "constant.character.escape",
|
|
93
|
+
"patterns": [{ "include": "#thinkingRoleTrigger" }]
|
|
94
|
+
},
|
|
95
|
+
"5": { "name": "constant.character.escape" },
|
|
96
|
+
"6": { "patterns": [{ "include": "#stringMods" }] },
|
|
97
|
+
"7": { "name": "constant.character.escape" }
|
|
98
|
+
}
|
|
99
|
+
},
|
|
100
|
+
"thinkingRoleTrigger": {
|
|
101
|
+
"match": "(\\w+)\\s+(\\w+)",
|
|
102
|
+
"captures": {
|
|
103
|
+
"1": { "name": "variable" }
|
|
104
|
+
}
|
|
105
|
+
},
|
|
74
106
|
"embedEscape": {
|
|
75
107
|
"match": "(\\\\){\\{",
|
|
76
108
|
"captures": {
|
|
@@ -95,7 +127,7 @@ export const convoGrammar = {
|
|
|
95
127
|
"patterns": [{ "include": "#lineExpression" }]
|
|
96
128
|
},
|
|
97
129
|
"topLevelStatements": {
|
|
98
|
-
"begin": "^\\s*(>)\\s*(do|
|
|
130
|
+
"begin": "^\\s*(>)\\s*(do|thinkingResult|result|define|debug|end)",
|
|
99
131
|
"end": "(?=\\s*>)",
|
|
100
132
|
"beginCaptures": {
|
|
101
133
|
"1": {
|
|
@@ -106,7 +138,7 @@ export const convoGrammar = {
|
|
|
106
138
|
}
|
|
107
139
|
},
|
|
108
140
|
"patterns": [
|
|
109
|
-
{ "include": "#
|
|
141
|
+
{ "include": "#bodyComment" },
|
|
110
142
|
{ "include": "#tag" },
|
|
111
143
|
{ "include": "#functionCall" },
|
|
112
144
|
{ "include": "#paramLineExpression" }
|
|
@@ -158,7 +190,7 @@ export const convoGrammar = {
|
|
|
158
190
|
}
|
|
159
191
|
},
|
|
160
192
|
"function": {
|
|
161
|
-
"begin": "^\\s*(>)\\s*(agent|
|
|
193
|
+
"begin": "^\\s*(>)\\s*(agent|public|local)?\\s*(\\w+)?\\s+(\\w+)\\s*([\\*\\?!]*)\\s*(\\()",
|
|
162
194
|
"end": "\\)",
|
|
163
195
|
"beginCaptures": {
|
|
164
196
|
"1": {
|
|
@@ -186,7 +218,7 @@ export const convoGrammar = {
|
|
|
186
218
|
}
|
|
187
219
|
},
|
|
188
220
|
"patterns": [
|
|
189
|
-
{ "include": "#
|
|
221
|
+
{ "include": "#bodyComment" },
|
|
190
222
|
{ "include": "#tag" },
|
|
191
223
|
{ "include": "#functionCall" },
|
|
192
224
|
{ "include": "#paramLineExpression" }
|
|
@@ -200,7 +232,7 @@ export const convoGrammar = {
|
|
|
200
232
|
"name": "entity.name.type"
|
|
201
233
|
},
|
|
202
234
|
"2": {
|
|
203
|
-
"name": "keyword.
|
|
235
|
+
"name": "keyword.control"
|
|
204
236
|
},
|
|
205
237
|
"3": {
|
|
206
238
|
"name": "entity.name.type"
|
|
@@ -215,39 +247,122 @@ export const convoGrammar = {
|
|
|
215
247
|
}
|
|
216
248
|
},
|
|
217
249
|
"patterns": [
|
|
218
|
-
{ "include": "#
|
|
250
|
+
{ "include": "#bodyComment" },
|
|
219
251
|
{ "include": "#tag" },
|
|
220
252
|
{ "include": "#functionCall" },
|
|
221
253
|
{ "include": "#lineExpression" }
|
|
222
254
|
]
|
|
223
255
|
},
|
|
224
256
|
"functionCall": {
|
|
257
|
+
"patterns": [
|
|
258
|
+
{ "include": "#functionCallSystem" },
|
|
259
|
+
{ "include": "#functionCallOperator" },
|
|
260
|
+
{ "include": "#functionCallLogic" },
|
|
261
|
+
{ "include": "#functionCallType" },
|
|
262
|
+
{ "include": "#functionCallDefault" }
|
|
263
|
+
]
|
|
264
|
+
},
|
|
265
|
+
"functionCallSystem": {
|
|
266
|
+
"begin": "(elif|if|else|while|break|foreach|for|in|do|then|fn|return|case|default|switch|test)\\s*(\\()",
|
|
267
|
+
"end": "\\)",
|
|
268
|
+
"beginCaptures": {
|
|
269
|
+
"1": {
|
|
270
|
+
"name": "keyword.control"
|
|
271
|
+
},
|
|
272
|
+
"2": {
|
|
273
|
+
"name": "keyword.control"
|
|
274
|
+
}
|
|
275
|
+
},
|
|
276
|
+
"endCaptures": {
|
|
277
|
+
"0": {
|
|
278
|
+
"name": "keyword.control"
|
|
279
|
+
}
|
|
280
|
+
},
|
|
281
|
+
"patterns": [
|
|
282
|
+
{ "include": "#lineExpression" }
|
|
283
|
+
]
|
|
284
|
+
},
|
|
285
|
+
"functionCallOperator": {
|
|
286
|
+
"begin": "(lt|lte|eq|gt|gte|is|add|sub|mul|div|not|mod|pow|inc|dec)\\s*(\\()",
|
|
287
|
+
"end": "\\)",
|
|
288
|
+
"beginCaptures": {
|
|
289
|
+
"1": {
|
|
290
|
+
"name": "constant.character.escape"
|
|
291
|
+
},
|
|
292
|
+
"2": {
|
|
293
|
+
"name": "constant.character.escape"
|
|
294
|
+
}
|
|
295
|
+
},
|
|
296
|
+
"endCaptures": {
|
|
297
|
+
"0": {
|
|
298
|
+
"name": "constant.character.escape"
|
|
299
|
+
}
|
|
300
|
+
},
|
|
301
|
+
"patterns": [
|
|
302
|
+
{ "include": "#lineExpression" }
|
|
303
|
+
]
|
|
304
|
+
},
|
|
305
|
+
"functionCallType": {
|
|
306
|
+
"begin": "(enum|struct|array)\\s*(\\()",
|
|
307
|
+
"end": "\\)",
|
|
308
|
+
"beginCaptures": {
|
|
309
|
+
"1": {
|
|
310
|
+
"name": "keyword.control"
|
|
311
|
+
},
|
|
312
|
+
"2": {
|
|
313
|
+
"name": "keyword.control"
|
|
314
|
+
}
|
|
315
|
+
},
|
|
316
|
+
"endCaptures": {
|
|
317
|
+
"0": {
|
|
318
|
+
"name": "keyword.control"
|
|
319
|
+
}
|
|
320
|
+
},
|
|
321
|
+
"patterns": [
|
|
322
|
+
{ "include": "#lineExpression" }
|
|
323
|
+
]
|
|
324
|
+
},
|
|
325
|
+
"functionCallLogic": {
|
|
326
|
+
"begin": "(and|or)\\s*(\\()",
|
|
327
|
+
"end": "\\)",
|
|
328
|
+
"beginCaptures": {
|
|
329
|
+
"1": {
|
|
330
|
+
"name": "keyword"
|
|
331
|
+
},
|
|
332
|
+
"2": {
|
|
333
|
+
"name": "keyword"
|
|
334
|
+
}
|
|
335
|
+
},
|
|
336
|
+
"endCaptures": {
|
|
337
|
+
"0": {
|
|
338
|
+
"name": "keyword"
|
|
339
|
+
}
|
|
340
|
+
},
|
|
341
|
+
"patterns": [
|
|
342
|
+
{ "include": "#lineExpression" }
|
|
343
|
+
]
|
|
344
|
+
},
|
|
345
|
+
"functionCallDefault": {
|
|
225
346
|
"begin": "(\\w+)\\s*(\\()",
|
|
226
347
|
"end": "\\)",
|
|
227
348
|
"beginCaptures": {
|
|
228
349
|
"1": {
|
|
229
|
-
"name": "support.function"
|
|
230
|
-
"patterns": [
|
|
231
|
-
{ "include": "#operators" },
|
|
232
|
-
{ "include": "#typeFunctions" },
|
|
233
|
-
{ "include": "#logicOperators" },
|
|
234
|
-
{ "include": "#systemFunctions" }
|
|
235
|
-
]
|
|
350
|
+
"name": "support.function"
|
|
236
351
|
},
|
|
237
352
|
"2": {
|
|
238
|
-
"name": "
|
|
353
|
+
"name": "support.function"
|
|
239
354
|
}
|
|
240
355
|
},
|
|
241
356
|
"endCaptures": {
|
|
242
357
|
"0": {
|
|
243
|
-
"name": "
|
|
358
|
+
"name": "support.function"
|
|
244
359
|
}
|
|
245
360
|
},
|
|
246
361
|
"patterns": [
|
|
247
362
|
{ "include": "#lineExpression" }
|
|
248
363
|
]
|
|
249
364
|
},
|
|
250
|
-
"
|
|
365
|
+
"bodyComment": {
|
|
251
366
|
"patterns": [
|
|
252
367
|
{
|
|
253
368
|
"match": "#.*",
|
|
@@ -262,23 +377,54 @@ export const convoGrammar = {
|
|
|
262
377
|
}
|
|
263
378
|
]
|
|
264
379
|
},
|
|
380
|
+
"comment": {
|
|
381
|
+
"patterns": [
|
|
382
|
+
{
|
|
383
|
+
"match": "^\\s*#.*",
|
|
384
|
+
"name": "comment"
|
|
385
|
+
},
|
|
386
|
+
{
|
|
387
|
+
"match": "^\\s*//.*",
|
|
388
|
+
"name": "emphasis",
|
|
389
|
+
"captures": {
|
|
390
|
+
"0": { "name": "comment" }
|
|
391
|
+
}
|
|
392
|
+
}
|
|
393
|
+
]
|
|
394
|
+
},
|
|
265
395
|
"tag": {
|
|
266
|
-
"
|
|
267
|
-
"match": "^\\s*(@)((on\\s+(\\w+)\\s*=?(.*))|((condition|disabled)\\s*(=\\s*(.*)))|((\\w+)\\s*=?\\s*(.*)))",
|
|
396
|
+
"match": "^\\s*(@)((on\\s+(.*))|(json\\s+(.*))|((condition|disabled|taskName|taskDescription)\\s*(=\\s*(.*)))|((\\w+)\\s*=?\\s*(.*)))",
|
|
268
397
|
"captures": {
|
|
269
398
|
"1": { "name": "entity.name.tag" },
|
|
270
399
|
"3": { "name": "entity.name.tag" },
|
|
271
|
-
"4": { "
|
|
272
|
-
"5": { "name": "
|
|
273
|
-
"
|
|
274
|
-
"
|
|
275
|
-
"
|
|
276
|
-
"12": { "name": "
|
|
400
|
+
"4": { "patterns": [{ "include": "#tagEvent" }] },
|
|
401
|
+
"5": { "name": "entity.name.tag" },
|
|
402
|
+
"6": { "name": "entity.name.type" },
|
|
403
|
+
"8": { "name": "variable" },
|
|
404
|
+
"10": { "patterns": [{ "include": "#lineExpression" }] },
|
|
405
|
+
"12": { "name": "entity.name.tag" },
|
|
406
|
+
"13": { "name": "string" }
|
|
407
|
+
}
|
|
408
|
+
},
|
|
409
|
+
"tagEvent": {
|
|
410
|
+
"match": "((user(?=\\W|$)|assistant(?=\\W|$))|\\w+)\\s*((=(.*))|(.*))?",
|
|
411
|
+
"captures": {
|
|
412
|
+
"1": { "name": "string" },
|
|
413
|
+
"2": { "name": "entity.name.type" },
|
|
414
|
+
"5": { "patterns": [{ "include": "#lineExpression" }] },
|
|
415
|
+
"6": { "name": "invalid.illegal" }
|
|
416
|
+
}
|
|
417
|
+
},
|
|
418
|
+
"tagEventFallback": {
|
|
419
|
+
"match": "(\\w+)(.*)?",
|
|
420
|
+
"captures": {
|
|
421
|
+
"1": { "name": "entity.name.type" },
|
|
422
|
+
"2": { "name": "string" }
|
|
277
423
|
}
|
|
278
424
|
},
|
|
279
425
|
"lineExpression": {
|
|
280
426
|
"patterns": [
|
|
281
|
-
{ "include": "#
|
|
427
|
+
{ "include": "#bodyComment" },
|
|
282
428
|
{ "include": "#tag" },
|
|
283
429
|
{ "include": "#heredoc" },
|
|
284
430
|
{ "include": "#stringPrompt" },
|
|
@@ -297,7 +443,7 @@ export const convoGrammar = {
|
|
|
297
443
|
},
|
|
298
444
|
"paramLineExpression": {
|
|
299
445
|
"patterns": [
|
|
300
|
-
{ "include": "#
|
|
446
|
+
{ "include": "#bodyComment" },
|
|
301
447
|
{ "include": "#tag" },
|
|
302
448
|
{ "include": "#heredoc" },
|
|
303
449
|
{ "include": "#stringPrompt" },
|
|
@@ -354,10 +500,10 @@ export const convoGrammar = {
|
|
|
354
500
|
"3": { "name": "constant.character.escape" },
|
|
355
501
|
"4": {
|
|
356
502
|
"patterns": [
|
|
357
|
-
{ "include": "#
|
|
503
|
+
{ "include": "#stringMods" }
|
|
358
504
|
]
|
|
359
505
|
},
|
|
360
|
-
"5": { "name": "constant.character.escape" }
|
|
506
|
+
"5": { "name": "constant.character.escape" }
|
|
361
507
|
},
|
|
362
508
|
"endCaptures": {
|
|
363
509
|
"0": { "name": "constant.character.escape" }
|
|
@@ -366,31 +512,42 @@ export const convoGrammar = {
|
|
|
366
512
|
{ "include": "#expression" }
|
|
367
513
|
]
|
|
368
514
|
},
|
|
369
|
-
"stringPromptMods": {
|
|
370
|
-
"match": "((\\+|\\*|!|extend|continue)|(boolean)|((\\w+)\\s*:\\s*(\\w+)))|(system|functions|)",
|
|
371
|
-
"captures": {
|
|
372
|
-
"2": { "name": "storage.modifier" },
|
|
373
|
-
"3": { "name": "entity.name.type" },
|
|
374
|
-
"5": { "name": "variable" },
|
|
375
|
-
"6": { "name": "entity.name.type" }
|
|
376
|
-
}
|
|
377
|
-
},
|
|
378
515
|
"stringEmbed": {
|
|
379
516
|
"begin": "(===)\\s*((\\()([^)]*)(\\)))?",
|
|
380
517
|
"end": "===",
|
|
381
518
|
"beginCaptures": {
|
|
382
|
-
"1": { "name": "
|
|
519
|
+
"1": { "name": "constant.character.escape" },
|
|
383
520
|
"3": { "name": "constant.character.escape" },
|
|
384
|
-
"4": {
|
|
521
|
+
"4": {
|
|
522
|
+
"patterns": [
|
|
523
|
+
{ "include": "#stringMods" }
|
|
524
|
+
]
|
|
525
|
+
},
|
|
385
526
|
"5": { "name": "constant.character.escape" }
|
|
386
527
|
},
|
|
387
528
|
"endCaptures": {
|
|
388
|
-
"0": { "name": "
|
|
529
|
+
"0": { "name": "constant.character.escape" }
|
|
389
530
|
},
|
|
390
531
|
"patterns": [
|
|
391
532
|
{ "include": "#expression" }
|
|
392
533
|
]
|
|
393
534
|
},
|
|
535
|
+
"stringMods": {
|
|
536
|
+
"match": "(((task)\\s*:(.*))|(\\+|\\*)|(system|functions|transforms|replaceForModel|replace|append|prepend|prefix|suffix|respond|pre)|(boolean)|((\\w+)\\s*:\\s*(\\w+\\[?\\]?))|(/\\w+)|((\\w+)\\s*=)|(>>)|(!))",
|
|
537
|
+
"captures": {
|
|
538
|
+
"3": { "name": "variable" },
|
|
539
|
+
"4": { "name": "comment" },
|
|
540
|
+
"5": { "name": "keyword.control" },
|
|
541
|
+
"6": { "name": "keyword.modifier" },
|
|
542
|
+
"7": { "name": "keyword.modifier" },
|
|
543
|
+
"9": { "name": "entity.name.type" },
|
|
544
|
+
"10": { "name": "entity.name.type" },
|
|
545
|
+
"11": { "name": "keyword.modifier" },
|
|
546
|
+
"13": { "name": "variable" },
|
|
547
|
+
"14": { "name": "keyword.control" },
|
|
548
|
+
"15": { "name": "keyword.modifier" }
|
|
549
|
+
}
|
|
550
|
+
},
|
|
394
551
|
"stringDq": {
|
|
395
552
|
"begin": "\"",
|
|
396
553
|
"end": "\"",
|
|
@@ -443,7 +600,7 @@ export const convoGrammar = {
|
|
|
443
600
|
"patterns": [
|
|
444
601
|
{ "include": "#xmlAttDbl" },
|
|
445
602
|
{ "include": "#xmlAttSingle" },
|
|
446
|
-
{ "include": "#xmlAtt" }
|
|
603
|
+
{ "include": "#xmlAtt" }
|
|
447
604
|
]
|
|
448
605
|
},
|
|
449
606
|
"4": { "name": "entity.name.type" }
|