Skip to content

Commit 6b1234b

Browse files
committed
Parse literal suffix on raw and byte strings
1 parent 5975a61 commit 6b1234b

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/parse.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -379,7 +379,8 @@ fn cooked_byte_string(mut input: Cursor) -> Result<Cursor, LexError> {
379379
'outer: while let Some((offset, b)) = bytes.next() {
380380
match b {
381381
b'"' => {
382-
return Ok(input.advance(offset + 1));
382+
let input = input.advance(offset + 1);
383+
return Ok(literal_suffix(input));
383384
}
384385
b'\r' => {
385386
if let Some((_, b'\n')) = bytes.next() {
@@ -433,7 +434,7 @@ fn raw_string(input: Cursor) -> Result<Cursor, LexError> {
433434
match ch {
434435
'"' if input.advance(byte_offset + 1).starts_with(&input.rest[..n]) => {
435436
let rest = input.advance(byte_offset + 1 + n);
436-
return Ok(rest);
437+
return Ok(literal_suffix(rest));
437438
}
438439
'\r' => {}
439440
_ => {}

0 commit comments

Comments
 (0)