(ext super.Type)
| 64 | } |
| 65 | |
| 66 | func (e *Encoder) encode(ext super.Type) (super.Type, error) { |
| 67 | switch ext := ext.(type) { |
| 68 | case *super.TypeRecord: |
| 69 | return e.encodeTypeRecord(ext) |
| 70 | case *super.TypeSet: |
| 71 | return e.encodeTypeSet(ext) |
| 72 | case *super.TypeArray: |
| 73 | return e.encodeTypeArray(ext) |
| 74 | case *super.TypeUnion: |
| 75 | return e.encodeTypeUnion(ext) |
| 76 | case *super.TypeMap: |
| 77 | return e.encodeTypeMap(ext) |
| 78 | case *super.TypeEnum: |
| 79 | return e.encodeTypeEnum(ext) |
| 80 | case *super.TypeNamed: |
| 81 | return e.encodeTypeName(ext) |
| 82 | case *super.TypeError: |
| 83 | return e.encodeTypeError(ext) |
| 84 | case *super.TypeFusion: |
| 85 | return e.encodeTypeFusion(ext) |
| 86 | default: |
| 87 | return ext, nil |
| 88 | } |
| 89 | } |
| 90 | |
| 91 | func (e *Encoder) encodeTypeRecord(ext *super.TypeRecord) (super.Type, error) { |
| 92 | var fields []super.Field |
no test coverage detected