gccrs: Add accessors to HIR::StructPatternFieldIdentPat
gcc/rust/ChangeLog: * hir/tree/rust-hir-pattern.h (StructPatternFieldIdentPat::get_identifier): New. (StructPatternFieldIdentPat::get_pattern): New. Signed-off-by: Owen Avery <powerboat9.gamer@gmail.com>
This commit is contained in:
parent
98142ce7cc
commit
829785bb69
1 changed files with 4 additions and 0 deletions
|
@ -631,6 +631,10 @@ public:
|
|||
|
||||
ItemType get_item_type () const override final { return ItemType::IDENT_PAT; }
|
||||
|
||||
Identifier get_identifier () const { return ident; }
|
||||
|
||||
std::unique_ptr<Pattern> &get_pattern () { return ident_pattern; }
|
||||
|
||||
protected:
|
||||
/* Use covariance to implement clone function as returning this object rather
|
||||
* than base */
|
||||
|
|
Loading…
Add table
Reference in a new issue