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.h30
1 files changed, 30 insertions, 0 deletions
diff --git a/gcc/rust/ast/rust-macro.h b/gcc/rust/ast/rust-macro.h
index 516743c..798ba9e 100644
--- a/gcc/rust/ast/rust-macro.h
+++ b/gcc/rust/ast/rust-macro.h
@@ -844,6 +844,11 @@ public:
Attribute to_attribute () const override;
+ MetaItem::ItemKind get_item_kind () const override
+ {
+ return MetaItem::ItemKind::Path;
+ }
+
protected:
// Use covariance to implement clone function as returning this type
MetaItemPath *clone_meta_item_inner_impl () const override
@@ -902,6 +907,11 @@ public:
Attribute to_attribute () const override;
+ MetaItem::ItemKind get_item_kind () const override
+ {
+ return MetaItem::ItemKind::Seq;
+ }
+
protected:
// Use covariance to implement clone function as returning this type
MetaItemSeq *clone_meta_item_inner_impl () const override
@@ -933,6 +943,11 @@ public:
Attribute to_attribute () const override;
+ MetaItem::ItemKind get_item_kind () const override
+ {
+ return MetaItem::ItemKind::Word;
+ }
+
protected:
// Use covariance to implement clone function as returning this type
MetaWord *clone_meta_item_inner_impl () const override
@@ -984,6 +999,11 @@ public:
bool is_key_value_pair () const override { return true; }
+ MetaItem::ItemKind get_item_kind () const override
+ {
+ return MetaItem::ItemKind::NameValueStr;
+ }
+
protected:
// Use covariance to implement clone function as returning this type
MetaNameValueStr *clone_meta_item_inner_impl () const override
@@ -1021,6 +1041,11 @@ public:
Attribute to_attribute () const override;
+ MetaItem::ItemKind get_item_kind () const override
+ {
+ return MetaItem::ItemKind::ListPaths;
+ }
+
private:
bool check_path_exists_in_cfg (const Session &session,
const SimplePath &path) const;
@@ -1061,6 +1086,11 @@ public:
Attribute to_attribute () const override;
+ MetaItem::ItemKind get_item_kind () const override
+ {
+ return MetaItem::ItemKind::ListNameValueStr;
+ }
+
protected:
// Use covariance to implement clone function as returning this type
MetaListNameValueStr *clone_meta_item_inner_impl () const override