tm-grammars 1.25.2 → 1.26.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.
@@ -115,54 +115,100 @@
115
115
  "strings": {
116
116
  "patterns": [
117
117
  {
118
- "begin": "([\"'])",
119
- "end": "\\1",
120
- "name": "string.quoted.double.berry",
118
+ "begin": "f(?=[\"'])",
121
119
  "patterns": [
122
120
  {
123
- "match": "(\\\\x\\h{2})|(\\\\[0-7]{3})|(\\\\\\\\)|(\\\\\")|(\\\\')|(\\\\a)|(\\\\b)|(\\\\f)|(\\\\n)|(\\\\r)|(\\\\t)|(\\\\v)",
124
- "name": "constant.character.escape.berry"
125
- }
126
- ]
127
- },
128
- {
129
- "begin": "f([\"'])",
130
- "end": "\\1",
131
- "name": "string.quoted.other.berry",
132
- "patterns": [
133
- {
134
- "match": "(\\\\x\\h{2})|(\\\\[0-7]{3})|(\\\\\\\\)|(\\\\\")|(\\\\')|(\\\\a)|(\\\\b)|(\\\\f)|(\\\\n)|(\\\\r)|(\\\\t)|(\\\\v)",
135
- "name": "constant.character.escape.berry"
136
- },
137
- {
138
- "match": "\\{\\{[^}]*}}",
139
- "name": "string.quoted.other.berry"
140
- },
141
- {
142
- "begin": "\\{",
143
- "end": "}",
144
- "name": "keyword.other.unit.berry",
121
+ "begin": "\"",
122
+ "end": "\"",
123
+ "name": "string.quoted.other.berry",
145
124
  "patterns": [
146
125
  {
147
- "include": "#keywords"
126
+ "match": "(\\\\x\\h{2})|(\\\\[0-7]{3})|(\\\\\\\\)|(\\\\\")|(\\\\')|(\\\\a)|(\\\\b)|(\\\\f)|(\\\\n)|(\\\\r)|(\\\\t)|(\\\\v)",
127
+ "name": "constant.character.escape.berry"
148
128
  },
149
129
  {
150
- "include": "#numbers"
130
+ "match": "\\{\\{[^}]*}}",
131
+ "name": "string.quoted.other.berry"
151
132
  },
152
133
  {
153
- "include": "#identifier"
154
- },
134
+ "begin": "\\{",
135
+ "end": "}",
136
+ "name": "keyword.other.unit.berry",
137
+ "patterns": [
138
+ {
139
+ "include": "#keywords"
140
+ },
141
+ {
142
+ "include": "#numbers"
143
+ },
144
+ {
145
+ "include": "#identifier"
146
+ },
147
+ {
148
+ "include": "#operator"
149
+ },
150
+ {
151
+ "include": "#member"
152
+ },
153
+ {
154
+ "include": "#function"
155
+ }
156
+ ]
157
+ }
158
+ ]
159
+ },
160
+ {
161
+ "begin": "'",
162
+ "end": "'",
163
+ "name": "string.quoted.other.berry",
164
+ "patterns": [
155
165
  {
156
- "include": "#operator"
166
+ "match": "(\\\\x\\h{2})|(\\\\[0-7]{3})|(\\\\\\\\)|(\\\\\")|(\\\\')|(\\\\a)|(\\\\b)|(\\\\f)|(\\\\n)|(\\\\r)|(\\\\t)|(\\\\v)",
167
+ "name": "constant.character.escape.berry"
157
168
  },
158
169
  {
159
- "include": "#member"
170
+ "match": "\\{\\{[^}]*}}",
171
+ "name": "string.quoted.other.berry"
160
172
  },
161
173
  {
162
- "include": "#function"
174
+ "begin": "\\{",
175
+ "end": "}",
176
+ "name": "keyword.other.unit.berry",
177
+ "patterns": [
178
+ {
179
+ "include": "#keywords"
180
+ },
181
+ {
182
+ "include": "#numbers"
183
+ },
184
+ {
185
+ "include": "#identifier"
186
+ },
187
+ {
188
+ "include": "#operator"
189
+ },
190
+ {
191
+ "include": "#member"
192
+ },
193
+ {
194
+ "include": "#function"
195
+ }
196
+ ]
163
197
  }
164
198
  ]
165
199
  }
200
+ ],
201
+ "while": "\\G|^[\\t ]*(?=[\"'])"
202
+ },
203
+ {
204
+ "begin": "([\"'])",
205
+ "end": "\\1",
206
+ "name": "string.quoted.double.berry",
207
+ "patterns": [
208
+ {
209
+ "match": "(\\\\x\\h{2})|(\\\\[0-7]{3})|(\\\\\\\\)|(\\\\\")|(\\\\')|(\\\\a)|(\\\\b)|(\\\\f)|(\\\\n)|(\\\\r)|(\\\\t)|(\\\\v)",
210
+ "name": "constant.character.escape.berry"
211
+ }
166
212
  ]
167
213
  }
168
214
  ]
@@ -82,7 +82,13 @@
82
82
  "include": "#string-literal"
83
83
  },
84
84
  {
85
- "include": "#string-verbatim"
85
+ "include": "#multiline-string"
86
+ },
87
+ {
88
+ "include": "#multiline-string-1-interp"
89
+ },
90
+ {
91
+ "include": "#multiline-string-2-interp"
86
92
  },
87
93
  {
88
94
  "include": "#numeric-literal"
@@ -164,6 +170,79 @@
164
170
  "match": "//.*(?=$)",
165
171
  "name": "comment.line.double-slash.bicep"
166
172
  },
173
+ "multiline-1-string-subst": {
174
+ "begin": "(\\$\\{)",
175
+ "beginCaptures": {
176
+ "1": {
177
+ "name": "punctuation.definition.template-expression.begin.bicep"
178
+ }
179
+ },
180
+ "end": "(})",
181
+ "endCaptures": {
182
+ "1": {
183
+ "name": "punctuation.definition.template-expression.end.bicep"
184
+ }
185
+ },
186
+ "name": "meta.multiline-1-string-subst.bicep",
187
+ "patterns": [
188
+ {
189
+ "include": "#expression"
190
+ },
191
+ {
192
+ "include": "#comments"
193
+ }
194
+ ]
195
+ },
196
+ "multiline-2-string-subst": {
197
+ "begin": "(\\$\\$\\{)",
198
+ "beginCaptures": {
199
+ "1": {
200
+ "name": "punctuation.definition.template-expression.begin.bicep"
201
+ }
202
+ },
203
+ "end": "(})",
204
+ "endCaptures": {
205
+ "1": {
206
+ "name": "punctuation.definition.template-expression.end.bicep"
207
+ }
208
+ },
209
+ "name": "meta.multiline-2-string-subst.bicep",
210
+ "patterns": [
211
+ {
212
+ "include": "#expression"
213
+ },
214
+ {
215
+ "include": "#comments"
216
+ }
217
+ ]
218
+ },
219
+ "multiline-string": {
220
+ "begin": "'''",
221
+ "end": "'''(?!')",
222
+ "name": "string.quoted.multi.bicep",
223
+ "patterns": [
224
+ ]
225
+ },
226
+ "multiline-string-1-interp": {
227
+ "begin": "(?<!\\$)\\$'''",
228
+ "end": "'''(?!')",
229
+ "name": "string.quoted.multi.bicep",
230
+ "patterns": [
231
+ {
232
+ "include": "#multiline-1-string-subst"
233
+ }
234
+ ]
235
+ },
236
+ "multiline-string-2-interp": {
237
+ "begin": "\\$\\$'''",
238
+ "end": "'''(?!')",
239
+ "name": "string.quoted.multi.bicep",
240
+ "patterns": [
241
+ {
242
+ "include": "#multiline-2-string-subst"
243
+ }
244
+ ]
245
+ },
167
246
  "named-literal": {
168
247
  "match": "\\b(true|false|null)\\b",
169
248
  "name": "constant.language.bicep"
@@ -201,11 +280,11 @@
201
280
  "include": "#escape-character"
202
281
  },
203
282
  {
204
- "include": "#string-literal-subst"
283
+ "include": "#string-subst"
205
284
  }
206
285
  ]
207
286
  },
208
- "string-literal-subst": {
287
+ "string-subst": {
209
288
  "begin": "(?<!\\\\)(\\$\\{)",
210
289
  "beginCaptures": {
211
290
  "1": {
@@ -218,7 +297,7 @@
218
297
  "name": "punctuation.definition.template-expression.end.bicep"
219
298
  }
220
299
  },
221
- "name": "meta.string-literal-subst.bicep",
300
+ "name": "meta.string-subst.bicep",
222
301
  "patterns": [
223
302
  {
224
303
  "include": "#expression"
@@ -227,13 +306,6 @@
227
306
  "include": "#comments"
228
307
  }
229
308
  ]
230
- },
231
- "string-verbatim": {
232
- "begin": "'''",
233
- "end": "'''(?!')",
234
- "name": "string.quoted.multi.bicep",
235
- "patterns": [
236
- ]
237
309
  }
238
310
  },
239
311
  "scopeName": "source.bicep"
@@ -3503,9 +3503,135 @@
3503
3503
  },
3504
3504
  {
3505
3505
  "include": "#preprocessor-pragma-checksum"
3506
+ },
3507
+ {
3508
+ "include": "#preprocessor-app-directive"
3509
+ }
3510
+ ]
3511
+ },
3512
+ "preprocessor-app-directive": {
3513
+ "begin": "\\s*(:)\\s*",
3514
+ "beginCaptures": {
3515
+ "1": {
3516
+ "name": "punctuation.separator.colon.cs"
3517
+ }
3518
+ },
3519
+ "end": "(?=$)",
3520
+ "patterns": [
3521
+ {
3522
+ "include": "#preprocessor-app-directive-package"
3523
+ },
3524
+ {
3525
+ "include": "#preprocessor-app-directive-property"
3526
+ },
3527
+ {
3528
+ "include": "#preprocessor-app-directive-project"
3529
+ },
3530
+ {
3531
+ "include": "#preprocessor-app-directive-sdk"
3532
+ },
3533
+ {
3534
+ "include": "#preprocessor-app-directive-generic"
3506
3535
  }
3507
3536
  ]
3508
3537
  },
3538
+ "preprocessor-app-directive-generic": {
3539
+ "captures": {
3540
+ "1": {
3541
+ "name": "string.unquoted.preprocessor.message.cs"
3542
+ }
3543
+ },
3544
+ "match": "\\b(.*)?\\s*"
3545
+ },
3546
+ "preprocessor-app-directive-package": {
3547
+ "captures": {
3548
+ "1": {
3549
+ "name": "keyword.preprocessor.package.cs"
3550
+ },
3551
+ "2": {
3552
+ "patterns": [
3553
+ {
3554
+ "include": "#preprocessor-app-directive-package-name"
3555
+ }
3556
+ ]
3557
+ },
3558
+ "3": {
3559
+ "name": "punctuation.separator.at.cs"
3560
+ },
3561
+ "4": {
3562
+ "name": "string.unquoted.preprocessor.message.cs"
3563
+ }
3564
+ },
3565
+ "match": "\\b(package)\\b\\s*([_[:alpha:]][._[:alnum:]]*)?(@)?(.*)?\\s*"
3566
+ },
3567
+ "preprocessor-app-directive-package-name": {
3568
+ "patterns": [
3569
+ {
3570
+ "captures": {
3571
+ "1": {
3572
+ "name": "punctuation.dot.cs"
3573
+ },
3574
+ "2": {
3575
+ "name": "entity.name.variable.preprocessor.symbol.cs"
3576
+ }
3577
+ },
3578
+ "match": "(\\.)([_[:alpha:]][_[:alnum:]]*)"
3579
+ },
3580
+ {
3581
+ "match": "[_[:alpha:]][_[:alnum:]]*",
3582
+ "name": "entity.name.variable.preprocessor.symbol.cs"
3583
+ }
3584
+ ]
3585
+ },
3586
+ "preprocessor-app-directive-project": {
3587
+ "captures": {
3588
+ "1": {
3589
+ "name": "keyword.preprocessor.project.cs"
3590
+ },
3591
+ "2": {
3592
+ "name": "string.unquoted.preprocessor.message.cs"
3593
+ }
3594
+ },
3595
+ "match": "\\b(project)\\b\\s*(.*)?\\s*"
3596
+ },
3597
+ "preprocessor-app-directive-property": {
3598
+ "captures": {
3599
+ "1": {
3600
+ "name": "keyword.preprocessor.property.cs"
3601
+ },
3602
+ "2": {
3603
+ "name": "entity.name.variable.preprocessor.symbol.cs"
3604
+ },
3605
+ "3": {
3606
+ "name": "punctuation.separator.equals.cs"
3607
+ },
3608
+ "4": {
3609
+ "name": "string.unquoted.preprocessor.message.cs"
3610
+ }
3611
+ },
3612
+ "match": "\\b(property)\\b\\s*([_[:alpha:]][_[:alnum:]]*)?(=)?(.*)?\\s*"
3613
+ },
3614
+ "preprocessor-app-directive-sdk": {
3615
+ "captures": {
3616
+ "1": {
3617
+ "name": "keyword.preprocessor.sdk.cs"
3618
+ },
3619
+ "2": {
3620
+ "patterns": [
3621
+ {
3622
+ "include": "#preprocessor-app-directive-package-name"
3623
+ }
3624
+ ]
3625
+ },
3626
+ "3": {
3627
+ "name": "punctuation.separator.at.cs"
3628
+ },
3629
+ "4": {
3630
+ "name": "string.unquoted.preprocessor.message.cs"
3631
+ }
3632
+ },
3633
+ "match": "\\b(sdk)\\b\\s*([_[:alpha:]][._[:alnum:]]*)?(@)?(.*)?\\s*"
3634
+ },
3509
3635
  "preprocessor-define-or-undef": {
3510
3636
  "captures": {
3511
3637
  "1": {
@@ -161,7 +161,7 @@
161
161
  "name": "constant.character.escape.lean4"
162
162
  }
163
163
  },
164
- "match": "\\b(?<![]\\w])'(\\\\(x\\h\\h|u\\h\\h\\h\\h|.))'\\b",
164
+ "match": "(?<![]\\w])'(\\\\(x\\h\\h|u\\h\\h\\h\\h|.))'",
165
165
  "name": "string.quoted.single.lean4"
166
166
  },
167
167
  {
@@ -0,0 +1,50 @@
1
+ {
2
+ "fileTypes": [
3
+ ],
4
+ "injectTo": [
5
+ "text.html.markdown"
6
+ ],
7
+ "injectionSelector": "L:text.html.markdown",
8
+ "name": "markdown-nix",
9
+ "patterns": [
10
+ {
11
+ "include": "#nixCodeBlock"
12
+ }
13
+ ],
14
+ "repository": {
15
+ "nixCodeBlock": {
16
+ "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(nix)(\\s+[^`~]*)?$)",
17
+ "beginCaptures": {
18
+ "3": {
19
+ "name": "punctuation.definition.markdown"
20
+ },
21
+ "5": {
22
+ "name": "fenced_code.block.language"
23
+ },
24
+ "6": {
25
+ "name": "fenced_code.block.language.attributes"
26
+ }
27
+ },
28
+ "end": "(^|\\G)(\\2|\\s{0,3})(\\3)\\s*$",
29
+ "endCaptures": {
30
+ "3": {
31
+ "name": "punctuation.definition.markdown"
32
+ }
33
+ },
34
+ "name": "markup.fenced_code.block.markdown",
35
+ "patterns": [
36
+ {
37
+ "begin": "(^|\\G)(\\s*)(.*)",
38
+ "contentName": "meta.embedded.block.nix",
39
+ "patterns": [
40
+ {
41
+ "include": "source.nix"
42
+ }
43
+ ],
44
+ "while": "(^|\\G)(?!\\s*([`~]{3,})\\s*$)"
45
+ }
46
+ ]
47
+ }
48
+ },
49
+ "scopeName": "markdown.nix.codeblock"
50
+ }
@@ -177,6 +177,9 @@
177
177
  },
178
178
  "nextflow": {
179
179
  "patterns": [
180
+ {
181
+ "include": "#record-def"
182
+ },
180
183
  {
181
184
  "include": "#enum-def"
182
185
  },
@@ -266,6 +269,24 @@
266
269
  }
267
270
  ]
268
271
  },
272
+ "record-def": {
273
+ "begin": "^\\s*(record)\\s+(\\w+)\\s*\\{",
274
+ "beginCaptures": {
275
+ "1": {
276
+ "name": "keyword.nextflow"
277
+ },
278
+ "2": {
279
+ "name": "storage.type.groovy"
280
+ }
281
+ },
282
+ "end": "}",
283
+ "name": "record.nextflow",
284
+ "patterns": [
285
+ {
286
+ "include": "source.nextflow-groovy#groovy"
287
+ }
288
+ ]
289
+ },
269
290
  "workflow-body": {
270
291
  "patterns": [
271
292
  {
package/grammars/nix.json CHANGED
@@ -453,6 +453,9 @@
453
453
  {
454
454
  "include": "#operator-unary"
455
455
  },
456
+ {
457
+ "include": "#operator-binary"
458
+ },
456
459
  {
457
460
  "include": "#constants"
458
461
  },
@@ -493,8 +496,7 @@
493
496
  "include": "#attrset-or-function"
494
497
  },
495
498
  {
496
- "match": "(\\bor\\b|\\.|\\|>|<\\||==|!=?|<=?|>=?|&&|\\|\\||->|//|\\?|\\+\\+|[-*]|/(?=([^*]|$))|\\+)",
497
- "name": "keyword.operator.nix"
499
+ "include": "#operator-binary"
498
500
  },
499
501
  {
500
502
  "include": "#constants"
@@ -975,6 +977,10 @@
975
977
  }
976
978
  ]
977
979
  },
980
+ "operator-binary": {
981
+ "match": "(\\bor\\b|\\.|\\|>|<\\||==|!=?|<=?|>=?|&&|\\|\\||->|//|\\?|\\+\\+|[-*]|/(?=([^*]|$))|\\+)",
982
+ "name": "keyword.operator.nix"
983
+ },
978
984
  "operator-unary": {
979
985
  "match": "([-!])",
980
986
  "name": "keyword.operator.unary.nix"
@@ -0,0 +1,151 @@
1
+ {
2
+ "displayName": "OpenSCAD",
3
+ "fileTypes": [
4
+ "scad"
5
+ ],
6
+ "foldingStartMarker": "/\\*\\*|\\{\\s*$",
7
+ "foldingStopMarker": "\\*\\*/|^\\s*}",
8
+ "name": "openscad",
9
+ "patterns": [
10
+ {
11
+ "captures": {
12
+ "1": {
13
+ "name": "keyword.control.scad"
14
+ }
15
+ },
16
+ "match": "^(module)\\s.*$",
17
+ "name": "meta.function.scad"
18
+ },
19
+ {
20
+ "match": "\\b(if|else|for|intersection_for|assign|render|function|include|use)\\b",
21
+ "name": "keyword.control.scad"
22
+ },
23
+ {
24
+ "begin": "/\\*\\*(?!/)",
25
+ "captures": {
26
+ "0": {
27
+ "name": "punctuation.definition.comment.scad"
28
+ }
29
+ },
30
+ "end": "\\*/",
31
+ "name": "comment.block.documentation.scad"
32
+ },
33
+ {
34
+ "begin": "/\\*",
35
+ "captures": {
36
+ "0": {
37
+ "name": "punctuation.definition.comment.scad"
38
+ }
39
+ },
40
+ "end": "\\*/",
41
+ "name": "comment.block.scad"
42
+ },
43
+ {
44
+ "captures": {
45
+ "1": {
46
+ "name": "punctuation.definition.comment.scad"
47
+ }
48
+ },
49
+ "match": "(//).*$\\n?",
50
+ "name": "comment.line.double-slash.scad"
51
+ },
52
+ {
53
+ "begin": "\"",
54
+ "end": "\"",
55
+ "name": "string.quoted.double.scad",
56
+ "patterns": [
57
+ {
58
+ "match": "\\\\.",
59
+ "name": "constant.character.escape.scad"
60
+ }
61
+ ]
62
+ },
63
+ {
64
+ "begin": "'",
65
+ "beginCaptures": {
66
+ "0": {
67
+ "name": "punctuation.definition.string.begin.scad"
68
+ }
69
+ },
70
+ "end": "'",
71
+ "endCaptures": {
72
+ "0": {
73
+ "name": "punctuation.definition.string.end.scad"
74
+ }
75
+ },
76
+ "name": "string.quoted.single.scad",
77
+ "patterns": [
78
+ {
79
+ "match": "\\\\(x\\h{2}|[012][0-7]{0,2}|3[0-6][0-7]?|37[0-7]?|[4-7][0-7]?|.)",
80
+ "name": "constant.character.escape.scad"
81
+ }
82
+ ]
83
+ },
84
+ {
85
+ "begin": "\"",
86
+ "beginCaptures": {
87
+ "0": {
88
+ "name": "punctuation.definition.string.begin.scad"
89
+ }
90
+ },
91
+ "end": "\"",
92
+ "endCaptures": {
93
+ "0": {
94
+ "name": "punctuation.definition.string.end.scad"
95
+ }
96
+ },
97
+ "name": "string.quoted.double.scad",
98
+ "patterns": [
99
+ {
100
+ "match": "\\\\(x\\h{2}|[012][0-7]{0,2}|3[0-6][0-7]|37[0-7]?|[4-7][0-7]?|.)",
101
+ "name": "constant.character.escape.scad"
102
+ }
103
+ ]
104
+ },
105
+ {
106
+ "match": "\\b(abs|acos|asun|atan2??|ceil|cos|exp|floor|ln|log|lookup|max|min|pow|rands|round|sign|sin|sqrt|tan|str|cube|sphere|cylinder|polyhedron|scale|rotate|translate|mirror|multimatrix|color|minkowski|hull|union|difference|intersection|echo)\\b",
107
+ "name": "support.function.scad"
108
+ },
109
+ {
110
+ "match": ";",
111
+ "name": "punctuation.terminator.statement.scad"
112
+ },
113
+ {
114
+ "match": ",[\\t |]*",
115
+ "name": "meta.delimiter.object.comma.scad"
116
+ },
117
+ {
118
+ "match": "\\.",
119
+ "name": "meta.delimiter.method.period.scad"
120
+ },
121
+ {
122
+ "match": "[{}]",
123
+ "name": "meta.brace.curly.scad"
124
+ },
125
+ {
126
+ "match": "[()]",
127
+ "name": "meta.brace.round.scad"
128
+ },
129
+ {
130
+ "match": "[]\\[]",
131
+ "name": "meta.brace.square.scad"
132
+ },
133
+ {
134
+ "match": "[!$%\\&*]|--?|\\+\\+|[+~]|===?|=|!==??|<=|>=|<<=|>>=|>>>=|<>|[!<>]|&&|\\|\\||\\?:|\\*=|(?<!\\()/=|%=|\\+=|-=|&=|\\^=|\\b(in|instanceof|new|delete|typeof|void)\\b",
135
+ "name": "keyword.operator.scad"
136
+ },
137
+ {
138
+ "match": "\\b((0([Xx])\\h+)|([0-9]+(\\.[0-9]+)?))\\b",
139
+ "name": "constant.numeric.scad"
140
+ },
141
+ {
142
+ "match": "\\btrue\\b",
143
+ "name": "constant.language.boolean.true.scad"
144
+ },
145
+ {
146
+ "match": "\\bfalse\\b",
147
+ "name": "constant.language.boolean.false.scad"
148
+ }
149
+ ],
150
+ "scopeName": "source.scad"
151
+ }