Skip to content

Commit c131606

Browse files
committed
the right way I suppose v12
1 parent 8999bf3 commit c131606

File tree

1 file changed

+15
-13
lines changed

1 file changed

+15
-13
lines changed

src/tokenizer.rs

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2033,20 +2033,22 @@ impl<'a> Tokenizer<'a> {
20332033
chars.next(); // consume next
20342034
}
20352035
else {
2036-
let n = match next {
2037-
'0' => '\0',
2038-
'a' => '\u{7}',
2039-
'b' => '\u{8}',
2040-
'f' => '\u{c}',
2041-
'n' => '\n',
2042-
'r' => '\r',
2043-
't' => '\t',
2044-
'Z' => '\u{1a}',
2045-
_ => *next,
2036+
let n = if dialect_of!(self is SnowflakeDialect) {
2037+
s.push('\\');
2038+
*next
2039+
} else {
2040+
match next {
2041+
'0' => '\0',
2042+
'a' => '\u{7}',
2043+
'b' => '\u{8}',
2044+
'f' => '\u{c}',
2045+
'n' => '\n',
2046+
'r' => '\r',
2047+
't' => '\t',
2048+
'Z' => '\u{1a}',
2049+
_ => *next,
2050+
}
20462051
};
2047-
// if dialect_of!(self is SnowflakeDialect) {
2048-
// s.push('');
2049-
// }
20502052
s.push(n);
20512053
chars.next(); // consume next
20522054
}

0 commit comments

Comments
 (0)