Skip to content

Commit 2413c05

Browse files
committed
the right way I suppose v10
1 parent 3d2cca6 commit 2413c05

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

src/tokenizer.rs

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2020,9 +2020,6 @@ impl<'a> Tokenizer<'a> {
20202020
// chars.next(); // consume symbol
20212021
// }
20222022
'\\' if settings.backslash_escape => {
2023-
if dialect_of!(self is SnowflakeDialect) {
2024-
s.push(ch);
2025-
}
20262023
// consume backslash
20272024
chars.next();
20282025

@@ -2031,9 +2028,7 @@ impl<'a> Tokenizer<'a> {
20312028
if let Some(next) = chars.peek() {
20322029
if !self.unescape {
20332030
// In no-escape mode, the given query has to be saved completely including backslashes.
2034-
if !dialect_of!(self is SnowflakeDialect) {
2035-
s.push(ch);
2036-
}
2031+
s.push(ch);
20372032
s.push(*next);
20382033
chars.next(); // consume next
20392034
}
@@ -2049,6 +2044,9 @@ impl<'a> Tokenizer<'a> {
20492044
'Z' => '\u{1a}',
20502045
_ => *next,
20512046
};
2047+
if dialect_of!(self is SnowflakeDialect) {
2048+
s.push('\\');
2049+
}
20522050
s.push(n);
20532051
chars.next(); // consume next
20542052
}

0 commit comments

Comments
 (0)