We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent dcc51a6 commit a65390cCopy full SHA for a65390c
src/tokenizer.rs
@@ -602,6 +602,25 @@ impl<'a> Tokenizer<'a> {
602
return Ok(s);
603
}
604
605
+ '\\' => {
606
+ chars.next();
607
+ match chars.peek() {
608
+ None => {
609
+ return self.tokenizer_error("Unterminated escape sequence");
610
+ }
611
+ Some(&c) => {
612
613
+ match c {
614
+ '0' => s.push('\0'),
615
+ 'n' => s.push('\n'),
616
+ 'r' => s.push('\r'),
617
+ 't' => s.push('\t'),
618
+ 'Z' => s.push('\x1a'),
619
+ x => s.push(x)
620
621
622
623
624
_ => {
625
chars.next(); // consume
626
s.push(ch);
0 commit comments