(p any)
| 81 | } |
| 82 | |
| 83 | func String(p any) string { |
| 84 | if typ, ok := p.(super.Type); ok { |
| 85 | return FormatType(typ) |
| 86 | } |
| 87 | switch val := p.(type) { |
| 88 | case *super.Value: |
| 89 | return FormatValue(*val) |
| 90 | case super.Value: |
| 91 | return FormatValue(val) |
| 92 | default: |
| 93 | panic(fmt.Sprintf("sup.String takes a super.Type or *super.Value: %T", val)) |
| 94 | } |
| 95 | } |
| 96 | |
| 97 | func (f *Formatter) Format(val super.Value) string { |
| 98 | f.builder.Reset() |