diff options
author | SimplyTheOther <simplytheother@gmail.com> | 2021-02-06 20:22:33 +0800 |
---|---|---|
committer | SimplyTheOther <simplytheother@gmail.com> | 2021-02-06 20:22:33 +0800 |
commit | 27eef5b7a065e8ea05ac575c4b364bb5dbc44e46 (patch) | |
tree | 12900dba5264146972f310a8943825a21f921b9e /gcc/rust/ast/rust-macro.h | |
parent | 83ca72858469584de7d235054209dd214818ca1a (diff) | |
download | gcc-27eef5b7a065e8ea05ac575c4b364bb5dbc44e46.zip gcc-27eef5b7a065e8ea05ac575c4b364bb5dbc44e46.tar.gz gcc-27eef5b7a065e8ea05ac575c4b364bb5dbc44e46.tar.bz2 |
Rewrote MetaNameValueStr to store raw string rather than quoted string
Diffstat (limited to 'gcc/rust/ast/rust-macro.h')
-rw-r--r-- | gcc/rust/ast/rust-macro.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/rust/ast/rust-macro.h b/gcc/rust/ast/rust-macro.h index 79d513f..e23be14 100644 --- a/gcc/rust/ast/rust-macro.h +++ b/gcc/rust/ast/rust-macro.h @@ -537,6 +537,7 @@ protected: class MetaNameValueStr : public MetaItem { Identifier ident; + // NOTE: str stored without quotes std::string str; public: @@ -544,7 +545,7 @@ public: : ident (std::move (ident)), str (std::move (str)) {} - std::string as_string () const override { return ident + " = " + str; } + std::string as_string () const override { return ident + " = \"" + str + "\""; } void accept_vis (ASTVisitor &vis) override; |