]> git.ipfire.org Git - thirdparty/gcc.git/commit
gccrs: ast: Add TokenStream collect function
authorPierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
Fri, 24 Mar 2023 11:39:48 +0000 (12:39 +0100)
committerArthur Cohen <arthur.cohen@embecosm.com>
Tue, 16 Jan 2024 17:28:41 +0000 (18:28 +0100)
commit9761160120e96c4507e29f626f3333e0a97ab9f8
treeca0caff390772663cef006b4ae90c9fe426f1d79
parentac0132918680200f265bf96fe87644a2cb81c22b
gccrs: ast: Add TokenStream collect function

Add a function to TokenStream to collect in a single vector all tokens.

gcc/rust/ChangeLog:

* ast/rust-ast-tokenstream.cc (TokenStream::collect_tokens): Add
getter.
(TokenStream::go): Rename function.
(TokenStream::visit): Likewise.
* ast/rust-ast-tokenstream.h: Add collect prototype.

Signed-off-by: Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
gcc/rust/ast/rust-ast-tokenstream.cc
gcc/rust/ast/rust-ast-tokenstream.h