diff options
author | Jakub Dupak <dev@jakubdupak.com> | 2022-11-06 21:27:49 +0100 |
---|---|---|
committer | Jakub Dupak <dev@jakubdupak.com> | 2022-11-16 16:26:47 +0100 |
commit | 9b6d82061208796389e064cbe6707a3787a264fe (patch) | |
tree | e1cfcbe1d3d3759cb005ee99bcad767eda80e8f8 /gcc | |
parent | 496ed46e0ab377d89c39ff85c104fd26f8e987bb (diff) | |
download | gcc-9b6d82061208796389e064cbe6707a3787a264fe.zip gcc-9b6d82061208796389e064cbe6707a3787a264fe.tar.gz gcc-9b6d82061208796389e064cbe6707a3787a264fe.tar.bz2 |
ast: Dump tuple type
Signed-off-by: Jakub Dupak <dev@jakubdupak.com>
Diffstat (limited to 'gcc')
-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 |