@@ -12,7 +12,6 @@ variables:
1212 identifier : ' (?:(?:(?:r\#)?{{non_raw_ident}})\b)'
1313 camel_ident : ' \b_*[A-Z][a-zA-Z0-9_]*[a-z][a-zA-Z0-9_]*\b'
1414 lifetime : ' '' (?:_|{{non_raw_ident}})(?!\'' )\b'
15- escaped_byte : ' \\([nrt0\"'' \\]|x\h{2})'
1615 escaped_char : ' \\([nrt0\"'' \\]|x[0-7]\h|u\{(?:\h_*){1,6}\})'
1716 int_suffixes : ' [iu](?:8|16|32|64|128|size)'
1817 float_suffixes : ' f(32|64)'
@@ -1249,8 +1248,7 @@ contexts:
12491248 # not valid syntax.
12501249 - match : ' \n'
12511250 pop : true
1252- - match : ' {{escaped_byte}}'
1253- scope : constant.character.escape.rust
1251+ - include : escaped-byte
12541252 set : byte-tail
12551253 - match : ' '
12561254 set : byte-tail
@@ -1275,10 +1273,8 @@ contexts:
12751273 - match : ' "'
12761274 scope : punctuation.definition.string.end.rust
12771275 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
12821278 - match : ' \\.'
12831279 scope : invalid.illegal.character.escape.rust
12841280
@@ -1294,6 +1290,14 @@ contexts:
12941290 scope : punctuation.definition.string.end.rust
12951291 pop : true
12961292
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+
12971301 escaped-char :
12981302 - match : ' {{escaped_char}}'
12991303 scope : constant.character.escape.rust
@@ -1338,8 +1342,7 @@ contexts:
13381342 scope : punctuation.definition.string.end.rust
13391343 pop : true
13401344 - include : escaped-char
1341- - match : ' (\\)$'
1342- scope : punctuation.separator.continuation.line.rust
1345+ - include : line-continuation
13431346
13441347 raw-string :
13451348 - match : (r)((#*)")
@@ -1364,10 +1367,8 @@ contexts:
13641367 - match : ' "'
13651368 scope : punctuation.definition.string.end.rust
13661369 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
13711372 - include : escaped-char
13721373
13731374 raw-c-string :
@@ -1393,8 +1394,7 @@ contexts:
13931394 pop : true
13941395 - include : escaped-char
13951396 - include : format-escapes
1396- - match : ' (\\)$'
1397- scope : punctuation.separator.continuation.line.rust
1397+ - include : line-continuation
13981398
13991399 format-raw-string :
14001400 - match : (r)(#*)"
0 commit comments