| 156 | } |
| 157 | |
| 158 | func GenValues(b *bytes.Reader, context *super.Context, types []super.Type) []super.Value { |
| 159 | var values []super.Value |
| 160 | var builder scode.Builder |
| 161 | for GenByte(b) != 0 { |
| 162 | typ := types[int(GenByte(b))%len(types)] |
| 163 | builder.Reset() |
| 164 | GenValue(b, context, typ, &builder) |
| 165 | values = append(values, super.NewValue(typ, builder.Bytes().Body())) |
| 166 | } |
| 167 | return values |
| 168 | } |
| 169 | |
| 170 | func GenValue(b *bytes.Reader, context *super.Context, typ super.Type, builder *scode.Builder) { |
| 171 | if GenByte(b) == 0 { |