Add StrStyle
to ast::LitKind::ByteStr
.
This is required to distinguish between cooked and raw byte string literals in an `ast::LitKind`, without referring to an adjacent `token::Lit`. It's a prerequisite for the next commit.
This commit is contained in:
parent
e658144586
commit
a7f35c42d4
18 changed files with 39 additions and 28 deletions
|
@ -323,7 +323,8 @@ impl<'a> State<'a> {
|
|||
self.print_token_literal(*token_lit, expr.span);
|
||||
}
|
||||
ast::ExprKind::IncludedBytes(bytes) => {
|
||||
let lit = ast::LitKind::ByteStr(bytes.clone()).synthesize_token_lit();
|
||||
let lit = ast::LitKind::ByteStr(bytes.clone(), ast::StrStyle::Cooked)
|
||||
.synthesize_token_lit();
|
||||
self.print_token_literal(lit, expr.span)
|
||||
}
|
||||
ast::ExprKind::Cast(expr, ty) => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue