diff --git a/src/protocol/ast_printer.rs b/src/protocol/ast_printer.rs index 39b07471376447c480a689b14a1ab620e03163ca..94a1de00f5443ddc88cad37734069f44eef935bc 100644 --- a/src/protocol/ast_printer.rs +++ b/src/protocol/ast_printer.rs @@ -857,6 +857,17 @@ fn write_parser_type(target: &mut String, heap: &Heap, t: &ParserType) { element_idx = write_element(target, heap, t, element_idx + 1); target.push('>'); }, + PTV::Tuple(num_embedded) => { + target.push('('); + let num_embedded = *num_embedded; + for embedded_idx in 0..num_embedded { + if embedded_idx != 0 { + target.push(','); + } + element_idx = write_element(target, heap, t, element_idx + 1); + } + target.push(')'); + } PTV::PolymorphicArgument(definition_id, arg_idx) => { let definition = &heap[*definition_id]; let poly_var = &definition.poly_vars()[*arg_idx as usize].value; @@ -927,6 +938,16 @@ fn write_concrete_type(target: &mut String, heap: &Heap, def_id: DefinitionId, t idx = write_concrete_part(target, heap, def_id, t, idx + 1); target.push('>') }, + CTP::Tuple(num_embedded) => { + target.push('('); + for idx_embedded in 0..*num_embedded { + if idx_embedded != 0 { + target.push_str(", "); + } + idx = write_concrete_part(target, heap, def_id, t, idx + 1); + } + target.push(')'); + }, CTP::Instance(definition_id, num_embedded) => { let identifier = heap[*definition_id].identifier(); target.push_str(identifier.value.as_str());