mirror of
https://github.com/astral-sh/ruff.git
synced 2025-07-24 05:25:17 +00:00
Track casing of r-string prefixes in the tokenizer and AST (#10314)
Co-authored-by: Micha Reiser <micha@reiser.io>
This commit is contained in:
parent
31db1b6e16
commit
162d2eb723
105 changed files with 1068 additions and 503 deletions
|
@ -1268,10 +1268,11 @@ impl<'a> Generator<'a> {
|
|||
}
|
||||
|
||||
fn unparse_string_literal(&mut self, string_literal: &ast::StringLiteral) {
|
||||
if string_literal.flags.is_u_string() {
|
||||
let ast::StringLiteral { value, flags, .. } = string_literal;
|
||||
if flags.prefix().is_unicode() {
|
||||
self.p("u");
|
||||
}
|
||||
self.p_str_repr(&string_literal.value);
|
||||
self.p_str_repr(value);
|
||||
}
|
||||
|
||||
fn unparse_string_literal_value(&mut self, value: &ast::StringLiteralValue) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue