]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
gccrs: dump: Dump `TupleIndexExpr`s
authorArthur Cohen <arthur.cohen@embecosm.com>
Fri, 12 May 2023 12:44:54 +0000 (14:44 +0200)
committerArthur Cohen <arthur.cohen@embecosm.com>
Tue, 16 Jan 2024 17:37:19 +0000 (18:37 +0100)
gcc/rust/ChangeLog:

* ast/rust-ast-dump.cc (Dump::visit): Implement dump for
`TupleIndexExpr`.

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

index 78c6a083787fcc36a6bf04088488ea0c2438186e..8db706920c09c1aa099090c4ff7db7e208252b08 100644 (file)
@@ -782,8 +782,11 @@ Dump::visit (TupleExpr &)
 {}
 
 void
-Dump::visit (TupleIndexExpr &)
-{}
+Dump::visit (TupleIndexExpr &expr)
+{
+  visit (expr.get_tuple_expr ());
+  stream << '.' << expr.get_tuple_index ();
+}
 
 void
 Dump::visit (StructExprStruct &)