Skip to content

Commit fc5a8c9

Browse files
committed
the right way I suppose v25
1 parent e0a6e62 commit fc5a8c9

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

src/tokenizer.rs

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2017,12 +2017,14 @@ impl<'a> Tokenizer<'a> {
20172017
s.push(*next);
20182018
chars.next(); // consume next
20192019
} else if dialect_of!(self is SnowflakeDialect) {
2020-
s.push('\\');
2020+
s.push(ch);
20212021
chars.next();
2022-
// if let Some(next) = chars.peek() {
2023-
// s.push(*next);
2024-
// chars.next();
2025-
// }
2022+
if let Some(next) = chars.peek() {
2023+
s.push(*next);
2024+
//no `chars.next()` to avoid the edge case
2025+
// where '\\b['] where `[ ]` is the char we would be next at,
2026+
// since `chars.next()` wouldn't allow us to terminate this string
2027+
}
20262028
} else {
20272029
let n = match next {
20282030
'0' => '\0',

0 commit comments

Comments
 (0)