aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArthur Cohen <arthur.cohen@embecosm.com>2023-03-20 02:58:55 +0100
committerArthur Cohen <arthur.cohen@embecosm.com>2024-01-16 18:21:14 +0100
commit9d6fd110c803b545037e0f148d189e6609884399 (patch)
tree52baa40da40c32d1c3fd5266f8b9878eb800433f
parent4cb51d2b020d4621ef550fbc658aa1da474b2c96 (diff)
downloadgcc-9d6fd110c803b545037e0f148d189e6609884399.zip
gcc-9d6fd110c803b545037e0f148d189e6609884399.tar.gz
gcc-9d6fd110c803b545037e0f148d189e6609884399.tar.bz2
gccrs: ast: Dump each MacroRule properly without the extra semicolon
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.
-rw-r--r--gcc/rust/ast/rust-ast-dump.cc1
1 files changed, 0 insertions, 1 deletions
diff --git a/gcc/rust/ast/rust-ast-dump.cc b/gcc/rust/ast/rust-ast-dump.cc
index 23ce376e..2335ffd 100644
--- a/gcc/rust/ast/rust-ast-dump.cc
+++ b/gcc/rust/ast/rust-ast-dump.cc
@@ -1532,7 +1532,6 @@ Dump::visit (MacroRule &rule)
visit (rule.get_matcher ());
stream << " => ";
visit (rule.get_transcriber ().get_token_tree ());
- stream << ";";
}
void