aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorPierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>2023-09-06 14:09:25 +0200
committerArthur Cohen <arthur.cohen@embecosm.com>2024-01-16 19:09:31 +0100
commit2d2fa103e125685f44e41f5500a6a2e98ffd91fb (patch)
tree5a1220ab4b5f1eb8c1f3888d62d5d82e4e706846 /gcc
parent193b0780d55c6ee93cb4a677e6bacf8c1da87021 (diff)
downloadgcc-2d2fa103e125685f44e41f5500a6a2e98ffd91fb.zip
gcc-2d2fa103e125685f44e41f5500a6a2e98ffd91fb.tar.gz
gcc-2d2fa103e125685f44e41f5500a6a2e98ffd91fb.tar.bz2
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>
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 70277e7..9f5242a 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; }
};