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
|
@ -361,7 +361,7 @@ impl<'a> ExtCtxt<'a> {
|
|||
}
|
||||
|
||||
pub fn expr_byte_str(&self, sp: Span, bytes: Vec<u8>) -> P<ast::Expr> {
|
||||
self.expr_lit(sp, ast::LitKind::ByteStr(Lrc::from(bytes)))
|
||||
self.expr_lit(sp, ast::LitKind::ByteStr(Lrc::from(bytes), ast::StrStyle::Cooked))
|
||||
}
|
||||
|
||||
/// `[expr1, expr2, ...]`
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue