From 2d2fa103e125685f44e41f5500a6a2e98ffd91fb Mon Sep 17 00:00:00 2001 From: Pierre-Emmanuel Patry Date: Wed, 6 Sep 2023 14:09:25 +0200 Subject: [PATCH] gccrs: Add const getter for tokentrees We often need to retrieve the underlying tokentree without modifying it, this getter will help achieve this. gcc/rust/ChangeLog: * ast/rust-ast.h: Add const getter. Signed-off-by: Pierre-Emmanuel Patry --- gcc/rust/ast/rust-ast.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/gcc/rust/ast/rust-ast.h b/gcc/rust/ast/rust-ast.h index 70277e76fcbd..9f5242ae80d7 100644 --- a/gcc/rust/ast/rust-ast.h +++ b/gcc/rust/ast/rust-ast.h @@ -901,6 +901,11 @@ public: return token_trees; } + const std::vector> &get_token_trees () const + { + return token_trees; + } + DelimType get_delim_type () const { return delim_type; } }; -- 2.47.2