aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/lexer/mod.rs6
-rw-r--r--tests/data/lexer/0008_strings.rs3
-rw-r--r--tests/data/lexer/0008_strings.txt7
3 files changed, 14 insertions, 2 deletions
diff --git a/src/lexer/mod.rs b/src/lexer/mod.rs
index ccc25b8c9..d81ea0339 100644
--- a/src/lexer/mod.rs
+++ b/src/lexer/mod.rs
@@ -123,7 +123,11 @@ fn next_token_inner(c: char, ptr: &mut Ptr) -> SyntaxKind {
123 scan_literal_suffix(ptr); 123 scan_literal_suffix(ptr);
124 CHAR 124 CHAR
125 }, 125 },
126 'b' => return scan_byte_char_or_string(ptr), 126 'b' => {
127 let kind = scan_byte_char_or_string(ptr);
128 scan_literal_suffix(ptr);
129 return kind
130 },
127 _ => (), 131 _ => (),
128 } 132 }
129 ERROR 133 ERROR
diff --git a/tests/data/lexer/0008_strings.rs b/tests/data/lexer/0008_strings.rs
index 1ffc7bb9d..9dd1570de 100644
--- a/tests/data/lexer/0008_strings.rs
+++ b/tests/data/lexer/0008_strings.rs
@@ -1 +1,2 @@
1b'' b'x' b"foo" br"" \ No newline at end of file 1b'' b'x' b"foo" br""
2b''suf b""ix br""br
diff --git a/tests/data/lexer/0008_strings.txt b/tests/data/lexer/0008_strings.txt
index d4ff4b558..ed8cd4bab 100644
--- a/tests/data/lexer/0008_strings.txt
+++ b/tests/data/lexer/0008_strings.txt
@@ -5,3 +5,10 @@ WHITESPACE 1 " "
5BYTE_STRING 6 "b\"foo\"" 5BYTE_STRING 6 "b\"foo\""
6WHITESPACE 1 " " 6WHITESPACE 1 " "
7RAW_BYTE_STRING 4 "br\"\"" 7RAW_BYTE_STRING 4 "br\"\""
8WHITESPACE 1 "\n"
9BYTE 6 "b\'\'suf"
10WHITESPACE 1 " "
11BYTE_STRING 5 "b\"\"ix"
12WHITESPACE 1 " "
13RAW_BYTE_STRING 6 "br\"\"br"
14WHITESPACE 1 "\n"