diff options
author | Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com> | 2023-04-04 18:22:56 +0200 |
---|---|---|
committer | Arthur Cohen <arthur.cohen@embecosm.com> | 2024-01-16 18:28:44 +0100 |
commit | efb24f60a818a8bec65a6204de9bb7f6866a4539 (patch) | |
tree | f41a7a06572db85ba7ffd0f5e2d401086a084b22 /gcc | |
parent | 5802178519f68f75838ac1e26fe898682ce70f54 (diff) | |
download | gcc-efb24f60a818a8bec65a6204de9bb7f6866a4539.zip gcc-efb24f60a818a8bec65a6204de9bb7f6866a4539.tar.gz gcc-efb24f60a818a8bec65a6204de9bb7f6866a4539.tar.bz2 |
gccrs: ast: Fix macros in tokenstreams
A default token was used as a separator, wich resulted in a wrong token
stream.
gcc/rust/ChangeLog:
* ast/rust-ast-tokenstream.cc (TokenStream::visit): Remove
default separator.
Signed-off-by: Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/rust/ast/rust-ast-tokenstream.cc | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/gcc/rust/ast/rust-ast-tokenstream.cc b/gcc/rust/ast/rust-ast-tokenstream.cc index 4260953..2fc7c2b 100644 --- a/gcc/rust/ast/rust-ast-tokenstream.cc +++ b/gcc/rust/ast/rust-ast-tokenstream.cc @@ -2310,7 +2310,10 @@ TokenStream::visit (MacroMatcher &matcher) tokens.push_back (Rust::Token::make (delimiters.first, Location ())); - visit_items_joined_by_separator (matcher.get_matches (), {}); + for (auto &item : matcher.get_matches ()) + { + visit (item); + } tokens.push_back (Rust::Token::make (delimiters.second, Location ())); } |