aboutsummaryrefslogtreecommitdiff
path: root/gcc/rust/ast/rust-macro.h
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/rust/ast/rust-macro.h')
-rw-r--r--gcc/rust/ast/rust-macro.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/gcc/rust/ast/rust-macro.h b/gcc/rust/ast/rust-macro.h
index 1bf8912..ce515db 100644
--- a/gcc/rust/ast/rust-macro.h
+++ b/gcc/rust/ast/rust-macro.h
@@ -21,6 +21,7 @@
#include "rust-ast.h"
#include "rust-location.h"
+#include <string>
namespace Rust {
namespace AST {
@@ -816,6 +817,13 @@ public:
Attribute to_attribute () const override;
+ inline std::pair<Identifier, std::string> get_name_value_pair () const
+ {
+ return std::pair<Identifier, std::string> (ident, str);
+ }
+
+ bool is_key_value_pair () const override { return true; }
+
protected:
// Use covariance to implement clone function as returning this type
MetaNameValueStr *clone_meta_item_inner_impl () const override