mirror of
https://github.com/Dummi26/mers.git
synced 2025-03-10 14:13:52 +01:00
added \r and \0 escape sequences
This commit is contained in:
parent
07a443a60b
commit
22b4ace81b
@ -501,16 +501,20 @@ pub mod implementation {
|
||||
match file.next() {
|
||||
Some('\\') => {
|
||||
if let Some(ch) = file.next() {
|
||||
buf.push(match ch {
|
||||
buf.push(
|
||||
match ch {
|
||||
'\\' => '\\',
|
||||
'r' => '\r',
|
||||
'n' => '\n',
|
||||
't' => '\t',
|
||||
'0' => '\0',
|
||||
'"' => '"',
|
||||
ch => {
|
||||
eprintln!("Warn: Weird char escape \"\\{ch}\", will be replaced with \"{ch}\".");
|
||||
ch
|
||||
},
|
||||
})
|
||||
}
|
||||
)
|
||||
}
|
||||
}
|
||||
Some('"') => break,
|
||||
|
Loading…
Reference in New Issue
Block a user