]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
gccrs: ast: Dump each MacroRule properly without the extra semicolon
authorArthur Cohen <arthur.cohen@embecosm.com>
Mon, 20 Mar 2023 01:58:55 +0000 (02:58 +0100)
committerArthur Cohen <arthur.cohen@embecosm.com>
Tue, 16 Jan 2024 17:21:14 +0000 (18:21 +0100)
Having the extra semicolon causes parsing errors when importing macros
exported using the AST dump, as no rule expects multiple tokens after a
single macro rule definition.

gcc/rust/ChangeLog:

* ast/rust-ast-dump.cc (Dump::visit): Remove extraneous semicolon when
dumping macro rules.

gcc/rust/ast/rust-ast-dump.cc

index 23ce376ea4b780ac80e8067734ebaad6a4f20b6f..2335ffdddb80a3e2f84c3eb690412d04854f80b3 100644 (file)
@@ -1532,7 +1532,6 @@ Dump::visit (MacroRule &rule)
   visit (rule.get_matcher ());
   stream << " => ";
   visit (rule.get_transcriber ().get_token_tree ());
-  stream << ";";
 }
 
 void