(&mut self)
| 909 | } |
| 910 | |
| 911 | fn parse_quoted_string(&mut self) -> Option<String> { |
| 912 | let quote = self.next()?; |
| 913 | let mut out = String::new(); |
| 914 | while let Some(ch) = self.next() { |
| 915 | if ch == '\\' { |
| 916 | let escaped = self.next()?; |
| 917 | out.push(match escaped { |
| 918 | 'n' => '\n', |
| 919 | 'r' => '\r', |
| 920 | 't' => '\t', |
| 921 | other => other, |
| 922 | }); |
| 923 | continue; |
| 924 | } |
| 925 | if ch == quote { |
| 926 | return Some(out); |
| 927 | } |
| 928 | out.push(ch); |
| 929 | } |
| 930 | None |
| 931 | } |
| 932 | |
| 933 | fn parse_bare_key(&mut self) -> Option<String> { |
| 934 | let start = self.pos; |
no test coverage detected