From: Pierre-Emmanuel Patry Date: Wed, 6 Sep 2023 12:09:25 +0000 (+0200) Subject: gccrs: Add const getter for tokentrees X-Git-Tag: basepoints/gcc-15~2045 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2d2fa103e125685f44e41f5500a6a2e98ffd91fb;p=thirdparty%2Fgcc.git 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 --- 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; } };