]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
gccrs: ast: Dump array type
authorJakub Dupak <dev@jakubdupak.com>
Sun, 6 Nov 2022 19:54:40 +0000 (20:54 +0100)
committerArthur Cohen <arthur.cohen@embecosm.com>
Tue, 21 Feb 2023 11:36:46 +0000 (12:36 +0100)
gcc/rust/ChangeLog:

* ast/rust-ast-dump.cc (Dump::visit): Add missing array visitor

Signed-off-by: Jakub Dupak <dev@jakubdupak.com>
gcc/rust/ast/rust-ast-dump.cc

index b017c6ea592dc646442902af2b306820f21183c8..9f73d0565ace7a7e812d985529cc9f4e7601b4b6 100644 (file)
@@ -1600,7 +1600,14 @@ Dump::visit (ReferenceType &type)
 void
 Dump::visit (ArrayType &type)
 {
+  // Syntax:
+  //    [ Type ; Expression ]
+
+  stream << '[';
   visit (type.get_elem_type ());
+  stream << "; ";
+  visit(type.get_size_expr());
+  stream << ']';
 }
 
 void