From e302a55c6a71de29e1d1d4e503490f28198eb59c Mon Sep 17 00:00:00 2001 From: Matthew Jasper Date: Sat, 3 Jun 2023 13:37:51 +0100 Subject: [PATCH] gccrs: Print macro invocations in AST dump gcc/rust/ChangeLog: * ast/rust-ast-dump.cc (Dump::visit): Print macro invocations. Signed-off-by: Matthew Jasper --- gcc/rust/ast/rust-ast-dump.cc | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/gcc/rust/ast/rust-ast-dump.cc b/gcc/rust/ast/rust-ast-dump.cc index d486b1deb8ba..8cd99fcc17d7 100644 --- a/gcc/rust/ast/rust-ast-dump.cc +++ b/gcc/rust/ast/rust-ast-dump.cc @@ -1570,8 +1570,11 @@ Dump::visit (MacroRulesDefinition &rules_def) } void -Dump::visit (MacroInvocation &) -{} +Dump::visit (MacroInvocation &invocation) +{ + // FIXME: make this accurately reflect the original macro syntax. + stream << invocation.get_invoc_data ().as_string (); +} void Dump::visit (MetaItemPath &) -- 2.47.2