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:
Alex Waygood 2024-03-18 17:18:04 +00:00 committed by GitHub
parent 31db1b6e16
commit 162d2eb723
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
105 changed files with 1068 additions and 503 deletions

View file

@ -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) {