aboutsummaryrefslogtreecommitdiff
path: root/gcc/rust/ast/rust-ast.h
diff options
context:
space:
mode:
authorPierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>2023-08-01 11:20:00 +0200
committerArthur Cohen <arthur.cohen@embecosm.com>2024-01-16 19:04:33 +0100
commit8f5bedeb6c6c540d6995f37e28b2a17484f0ad87 (patch)
tree2ba32a9db441df9ca0a2649c129d721a530642b1 /gcc/rust/ast/rust-ast.h
parent5ea74345459e72a8cd5b9ff00d78428893251edd (diff)
downloadgcc-8f5bedeb6c6c540d6995f37e28b2a17484f0ad87.zip
gcc-8f5bedeb6c6c540d6995f37e28b2a17484f0ad87.tar.gz
gcc-8f5bedeb6c6c540d6995f37e28b2a17484f0ad87.tar.bz2
gccrs: 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/rust/ast/rust-ast.h')
-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 ca11784..7b2561e 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);