diff options
author | Jakub Dupak <dev@jakubdupak.com> | 2022-11-06 20:54:40 +0100 |
---|---|---|
committer | Arthur Cohen <arthur.cohen@embecosm.com> | 2023-02-21 12:36:46 +0100 |
commit | 140a2aed7e1cecd162cc975b6d745db38b5d8d31 (patch) | |
tree | 1088ac0b14358aafbd2ab6592c3432669bbc1581 /gcc/rust/ast/rust-ast-dump.cc | |
parent | 59fb0747cc2c11aef79d7d53d70cfedaefde78e3 (diff) | |
download | gcc-140a2aed7e1cecd162cc975b6d745db38b5d8d31.zip gcc-140a2aed7e1cecd162cc975b6d745db38b5d8d31.tar.gz gcc-140a2aed7e1cecd162cc975b6d745db38b5d8d31.tar.bz2 |
gccrs: ast: Dump array type
gcc/rust/ChangeLog:
* ast/rust-ast-dump.cc (Dump::visit): Add missing array visitor
Signed-off-by: Jakub Dupak <dev@jakubdupak.com>
Diffstat (limited to 'gcc/rust/ast/rust-ast-dump.cc')
-rw-r--r-- | gcc/rust/ast/rust-ast-dump.cc | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/gcc/rust/ast/rust-ast-dump.cc b/gcc/rust/ast/rust-ast-dump.cc index b017c6e..9f73d05 100644 --- a/gcc/rust/ast/rust-ast-dump.cc +++ b/gcc/rust/ast/rust-ast-dump.cc @@ -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 |