@@ -12,7 +12,6 @@ variables:
12
12
identifier : ' (?:(?:(?:r\#)?{{non_raw_ident}})\b)'
13
13
camel_ident : ' \b_*[A-Z][a-zA-Z0-9_]*[a-z][a-zA-Z0-9_]*\b'
14
14
lifetime : ' '' (?:_|{{non_raw_ident}})(?!\'' )\b'
15
- escaped_byte : ' \\([nrt0\"'' \\]|x\h{2})'
16
15
escaped_char : ' \\([nrt0\"'' \\]|x[0-7]\h|u\{(?:\h_*){1,6}\})'
17
16
int_suffixes : ' [iu](?:8|16|32|64|128|size)'
18
17
float_suffixes : ' f(32|64)'
@@ -1249,8 +1248,7 @@ contexts:
1249
1248
# not valid syntax.
1250
1249
- match : ' \n'
1251
1250
pop : true
1252
- - match : ' {{escaped_byte}}'
1253
- scope : constant.character.escape.rust
1251
+ - include : escaped-byte
1254
1252
set : byte-tail
1255
1253
- match : ' '
1256
1254
set : byte-tail
@@ -1275,10 +1273,8 @@ contexts:
1275
1273
- match : ' "'
1276
1274
scope : punctuation.definition.string.end.rust
1277
1275
pop : true
1278
- - match : ' {{escaped_byte}}'
1279
- scope : constant.character.escape.rust
1280
- - match : ' (\\)$'
1281
- scope : punctuation.separator.continuation.line.rust
1276
+ - include : escaped-byte
1277
+ - include : line-continuation
1282
1278
- match : ' \\.'
1283
1279
scope : invalid.illegal.character.escape.rust
1284
1280
@@ -1294,6 +1290,14 @@ contexts:
1294
1290
scope : punctuation.definition.string.end.rust
1295
1291
pop : true
1296
1292
1293
+ line-continuation :
1294
+ - match : ' \\$'
1295
+ scope : punctuation.separator.continuation.line.rust
1296
+
1297
+ escaped-byte :
1298
+ - match : ' \\([nrt0\"'' \\]|x\h{2})'
1299
+ scope : constant.character.escape.rust
1300
+
1297
1301
escaped-char :
1298
1302
- match : ' {{escaped_char}}'
1299
1303
scope : constant.character.escape.rust
@@ -1338,8 +1342,7 @@ contexts:
1338
1342
scope : punctuation.definition.string.end.rust
1339
1343
pop : true
1340
1344
- include : escaped-char
1341
- - match : ' (\\)$'
1342
- scope : punctuation.separator.continuation.line.rust
1345
+ - include : line-continuation
1343
1346
1344
1347
raw-string :
1345
1348
- match : (r)((#*)")
@@ -1364,10 +1367,8 @@ contexts:
1364
1367
- match : ' "'
1365
1368
scope : punctuation.definition.string.end.rust
1366
1369
pop : true
1367
- - match : ' {{escaped_byte}}'
1368
- scope : constant.character.escape.rust
1369
- - match : ' (\\)$'
1370
- scope : punctuation.separator.continuation.line.rust
1370
+ - include : escaped-byte
1371
+ - include : line-continuation
1371
1372
- include : escaped-char
1372
1373
1373
1374
raw-c-string :
@@ -1393,8 +1394,7 @@ contexts:
1393
1394
pop : true
1394
1395
- include : escaped-char
1395
1396
- include : format-escapes
1396
- - match : ' (\\)$'
1397
- scope : punctuation.separator.continuation.line.rust
1397
+ - include : line-continuation
1398
1398
1399
1399
format-raw-string :
1400
1400
- match : (r)(#*)"
0 commit comments