[gcc r14-7983] gccrs: Add getters for different types of proc macros
Arthur Cohen
cohenarthur@gcc.gnu.org
Tue Jan 16 18:10:55 GMT 2024
https://gcc.gnu.org/g:8f5bedeb6c6c540d6995f37e28b2a17484f0ad87
commit r14-7983-g8f5bedeb6c6c540d6995f37e28b2a17484f0ad87
Author: Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
Date: Tue Aug 1 11:20:00 2023 +0200
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>
Diff:
---
gcc/rust/ast/rust-ast.h | 15 +++++++++++++++
1 file changed, 15 insertions(+)
diff --git a/gcc/rust/ast/rust-ast.h b/gcc/rust/ast/rust-ast.h
index ca117842a24..7b2561ee31c 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);
More information about the Gcc-cvs
mailing list