aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorPierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>2023-09-06 14:09:25 +0200
committerPhilip Herron <philip.herron@embecosm.com>2023-10-31 11:39:08 +0000
commitb5118d1a6aa6dc2256d3f4620eb3185389531689 (patch)
treeb09f61a1ae1b9063ca84c31fe8bfa59824f8b0a4 /gcc
parent327a285500ac640f1d8257d11ea56bf4ab65ee47 (diff)
downloadgcc-b5118d1a6aa6dc2256d3f4620eb3185389531689.zip
gcc-b5118d1a6aa6dc2256d3f4620eb3185389531689.tar.gz
gcc-b5118d1a6aa6dc2256d3f4620eb3185389531689.tar.bz2
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>
Diffstat (limited to 'gcc')
-rw-r--r--gcc/rust/ast/rust-ast.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/gcc/rust/ast/rust-ast.h b/gcc/rust/ast/rust-ast.h
index e5cadb6..a2d088e 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<std::unique_ptr<TokenTree>> &get_token_trees () const
+ {
+ return token_trees;
+ }
+
DelimType get_delim_type () const { return delim_type; }
};