[gcc r14-7891] gccrs: ast: Add `get_kind` method to `MacroRulesDefinition`

Arthur Cohen cohenarthur@gcc.gnu.org
Tue Jan 16 18:04:55 GMT 2024


https://gcc.gnu.org/g:c2ea7f6f36c48483a1a776fb51e04214d4526724

commit r14-7891-gc2ea7f6f36c48483a1a776fb51e04214d4526724
Author: Arthur Cohen <arthur.cohen@embecosm.com>
Date:   Wed Aug 2 12:50:06 2023 +0200

    gccrs: ast: Add `get_kind` method to `MacroRulesDefinition`
    
    gcc/rust/ChangeLog:
    
            * ast/rust-macro.h: Add new method to `MacroRulesDefinition` to allow
            getting the `MacroKind` contained.

Diff:
---
 gcc/rust/ast/rust-macro.h | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/gcc/rust/ast/rust-macro.h b/gcc/rust/ast/rust-macro.h
index 76d244e604e..490e8121427 100644
--- a/gcc/rust/ast/rust-macro.h
+++ b/gcc/rust/ast/rust-macro.h
@@ -576,6 +576,8 @@ public:
     return AST::Kind::MACRO_RULES_DEFINITION;
   }
 
+  MacroKind get_kind () const { return kind; }
+
 protected:
   /* Use covariance to implement clone function as returning this object rather
    * than base */


More information about the Gcc-cvs mailing list