aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorPierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>2023-04-04 18:22:56 +0200
committerCohenArthur <arthur.cohen@embecosm.com>2023-04-05 08:09:09 +0000
commitf499a356a85e0a25201bd6de0943c08090c9d919 (patch)
tree5a58c230c13796b90a74e8c94fed580acc9952e2 /gcc
parent1d501ab1429c70aae1f9706e23a4acfc14d67d36 (diff)
downloadgcc-f499a356a85e0a25201bd6de0943c08090c9d919.zip
gcc-f499a356a85e0a25201bd6de0943c08090c9d919.tar.gz
gcc-f499a356a85e0a25201bd6de0943c08090c9d919.tar.bz2
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.cc5
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 ()));
}