translate Rust unicode representation to C style unicode representation
Signed-off-by: Axel Nennker <axel.nennker@telekom.de>
This commit is contained in:
@@ -151,7 +151,7 @@ impl Literal {
|
||||
syn::Expr::Lit(syn::ExprLit {
|
||||
lit: syn::Lit::Char(ref value),
|
||||
..
|
||||
}) => Ok(Literal::Expr(format!("'{}'", value.value().escape_default()))),
|
||||
}) => Ok(Literal::Expr(format!("'{}'", value.value().escape_default().to_string().replace('{', "").replace('}', "")))),
|
||||
syn::Expr::Lit(syn::ExprLit {
|
||||
lit: syn::Lit::Int(ref value),
|
||||
..
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
|
||||
#define FOO 10
|
||||
|
||||
#define HEART '\u{2764}'
|
||||
#define HEART '\u2764'
|
||||
|
||||
#define NEWLINE '\n'
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
|
||||
#define FOO 10
|
||||
|
||||
#define HEART '\u{2764}'
|
||||
#define HEART '\u2764'
|
||||
|
||||
#define NEWLINE '\n'
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ static const wchar_t DELIMITER = ':';
|
||||
|
||||
static const int32_t FOO = 10;
|
||||
|
||||
static const wchar_t HEART = '\u{2764}';
|
||||
static const wchar_t HEART = '\u2764';
|
||||
|
||||
static const wchar_t NEWLINE = '\n';
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
|
||||
#define FOO 10
|
||||
|
||||
#define HEART '\u{2764}'
|
||||
#define HEART '\u2764'
|
||||
|
||||
#define NEWLINE '\n'
|
||||
|
||||
|
||||
Reference in New Issue
Block a user