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 <pierre-emmanuel.patry@embecosm.com>
This commit is contained in:
Pierre-Emmanuel Patry 2023-09-06 14:09:25 +02:00 committed by Arthur Cohen
parent 193b0780d5
commit 2d2fa103e1

View file

@ -901,6 +901,11 @@ public:
return token_trees;
}
const std::vector<std::unique_ptr<TokenTree>> &get_token_trees () const
{
return token_trees;
}
DelimType get_delim_type () const { return delim_type; }
};