aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorPierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>2023-08-01 11:20:00 +0200
committerP-E-P <32375388+P-E-P@users.noreply.github.com>2023-09-05 14:05:36 +0000
commitaa712861f41d7477ca7eb4f33fead1b288db735f (patch)
tree3c22d1c75c0af5e7562d551b0162600c175a0de0 /gcc
parent3c77182243784324dc733cd1f3a488edae7ad0c8 (diff)
downloadgcc-aa712861f41d7477ca7eb4f33fead1b288db735f.zip
gcc-aa712861f41d7477ca7eb4f33fead1b288db735f.tar.gz
gcc-aa712861f41d7477ca7eb4f33fead1b288db735f.tar.bz2
Add getters for different types of proc macros
Add some getters on the ast crate in order to be able to retrieve a reference to a crate's proc macros. gcc/rust/ChangeLog: * ast/rust-ast.h: Add getters. Signed-off-by: Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
Diffstat (limited to 'gcc')
-rw-r--r--gcc/rust/ast/rust-ast.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/gcc/rust/ast/rust-ast.h b/gcc/rust/ast/rust-ast.h
index 80c6666..11518fc 100644
--- a/gcc/rust/ast/rust-ast.h
+++ b/gcc/rust/ast/rust-ast.h
@@ -2083,6 +2083,21 @@ public:
NodeId get_node_id () const { return node_id; }
const std::vector<Attribute> &get_inner_attrs () const { return inner_attrs; }
+ const std::vector<AttributeProcMacro> &get_attribute_macros () const
+ {
+ return attribute_macros;
+ }
+
+ const std::vector<CustomDeriveProcMacro> &get_derive_macros () const
+ {
+ return derive_macros;
+ }
+
+ const std::vector<BangProcMacro> &get_bang_macros () const
+ {
+ return bang_macros;
+ }
+
std::vector<std::unique_ptr<AST::Item>> take_items ()
{
return std::move (items);