FormatType formats a type in canonical form to represent type values as standalone entities.
(typ super.Type)
| 732 | // FormatType formats a type in canonical form to represent type values |
| 733 | // as standalone entities. |
| 734 | func FormatType(typ super.Type) string { |
| 735 | var b strings.Builder |
| 736 | formatType(&b, make(map[string]*super.TypeNamed), typ, false) |
| 737 | return b.String() |
| 738 | } |
| 739 | |
| 740 | func formatType(b *strings.Builder, typedefs map[string]*super.TypeNamed, typ super.Type, isComponentType bool) { |
| 741 | switch t := typ.(type) { |