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:
parent
193b0780d5
commit
2d2fa103e1
1 changed files with 5 additions and 0 deletions
|
@ -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; }
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue