Check a quoted string/bytes literal for invalid escapes. The range must include the prefix and quote delimiters.
(&self, range: TextRange, is_bytes: bool)
| 209 | /// Check a quoted string/bytes literal for invalid escapes. |
| 210 | /// The range must include the prefix and quote delimiters. |
| 211 | fn check_quoted_literal(&self, range: TextRange, is_bytes: bool) { |
| 212 | if let Some((start, end)) = content_bounds(self.source, range) |
| 213 | && let Some((ch, offset)) = first_invalid_escape(self.source, start, end, is_bytes) |
| 214 | { |
| 215 | warn_invalid_escape_sequence(self.source, ch, offset, self.filename, self.vm); |
| 216 | } |
| 217 | } |
| 218 | |
| 219 | /// Check an f-string literal element for invalid escapes. |
| 220 | /// The range covers content only (no prefix/quotes). |
no test coverage detected