public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc/devel/rust/master] ast: Fix macros in tokenstreams
@ 2023-04-06 21:36 Thomas Schwinge
  0 siblings, 0 replies; only message in thread
From: Thomas Schwinge @ 2023-04-06 21:36 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:f499a356a85e0a25201bd6de0943c08090c9d919

commit f499a356a85e0a25201bd6de0943c08090c9d919
Author: Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
Date:   Tue Apr 4 18:22:56 2023 +0200

    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>

Diff:
---
 gcc/rust/ast/rust-ast-tokenstream.cc | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/gcc/rust/ast/rust-ast-tokenstream.cc b/gcc/rust/ast/rust-ast-tokenstream.cc
index 42609535bce..2fc7c2b3039 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 ()));
 }

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2023-04-06 21:36 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-04-06 21:36 [gcc/devel/rust/master] ast: Fix macros in tokenstreams Thomas Schwinge

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).