diff options
author | Jakub Dupak <dev@jakubdupak.com> | 2022-11-06 21:27:49 +0100 |
---|---|---|
committer | Arthur Cohen <arthur.cohen@embecosm.com> | 2023-02-21 12:36:47 +0100 |
commit | 91409d27d5c51530fb73bd683ab9dde4143f6204 (patch) | |
tree | d81ca0b5a6b787adf2d4017ad11c9985f376c209 | |
parent | c4c859bff8d0fa3e7be4b83511d7607089e7d7d7 (diff) | |
download | gcc-91409d27d5c51530fb73bd683ab9dde4143f6204.zip gcc-91409d27d5c51530fb73bd683ab9dde4143f6204.tar.gz gcc-91409d27d5c51530fb73bd683ab9dde4143f6204.tar.bz2 |
gccrs: ast: Dump tuple type
gcc/rust/ChangeLog:
* ast/rust-ast-dump.cc (Dump::visit): Add missing tuple type visitor.
Signed-off-by: Jakub Dupak <dev@jakubdupak.com>
-rw-r--r-- | gcc/rust/ast/rust-ast-dump.cc | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/gcc/rust/ast/rust-ast-dump.cc b/gcc/rust/ast/rust-ast-dump.cc index 3af4895..9393f95 100644 --- a/gcc/rust/ast/rust-ast-dump.cc +++ b/gcc/rust/ast/rust-ast-dump.cc @@ -1580,16 +1580,24 @@ Dump::visit (TraitObjectTypeOneBound &) {} void -Dump::visit (TupleType &) -{} +Dump::visit (TupleType &type) +{ + // Syntax: + // ( ) + // | ( ( Type , )+ Type? ) + + stream << '('; + visit_items_joined_by_separator (type.get_elems (), ", "); + stream << ')'; +} void Dump::visit (NeverType &) { - // Syntax: - // ! + // Syntax: + // ! - stream << '!'; + stream << '!'; } void |