diff options
author | Owen Avery <powerboat9.gamer@gmail.com> | 2023-03-14 19:17:26 -0400 |
---|---|---|
committer | Arthur Cohen <arthur.cohen@embecosm.com> | 2024-01-16 18:21:10 +0100 |
commit | 92986248144ac267fae246cb110021717c4c5764 (patch) | |
tree | b8a86f74afbae42d8ac8c27340a58f16972e3f03 /gcc/rust | |
parent | 9708900e1d53a7569c568102d5bbf56d591ea603 (diff) | |
download | gcc-92986248144ac267fae246cb110021717c4c5764.zip gcc-92986248144ac267fae246cb110021717c4c5764.tar.gz gcc-92986248144ac267fae246cb110021717c4c5764.tar.bz2 |
gccrs: Add method to access SlicePattern items
gcc/rust/ChangeLog:
* hir/tree/rust-hir-pattern.h
(SlicePattern::get_items): Add.
Signed-off-by: Owen Avery <powerboat9.gamer@gmail.com>
Diffstat (limited to 'gcc/rust')
-rw-r--r-- | gcc/rust/hir/tree/rust-hir-pattern.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/gcc/rust/hir/tree/rust-hir-pattern.h b/gcc/rust/hir/tree/rust-hir-pattern.h index 9540070..f6359f9 100644 --- a/gcc/rust/hir/tree/rust-hir-pattern.h +++ b/gcc/rust/hir/tree/rust-hir-pattern.h @@ -1282,6 +1282,12 @@ public: SlicePattern (SlicePattern &&other) = default; SlicePattern &operator= (SlicePattern &&other) = default; + std::vector<std::unique_ptr<Pattern>> &get_items () { return items; } + const std::vector<std::unique_ptr<Pattern>> &get_items () const + { + return items; + } + Location get_locus () const override { return locus; } void accept_vis (HIRFullVisitor &vis) override; |