(sctx *super.Context, leafs []Any)
| 57 | } |
| 58 | |
| 59 | func (r *rec) build(sctx *super.Context, leafs []Any) (*Record, []Any) { |
| 60 | var fields []super.Field |
| 61 | var out []Any |
| 62 | for i, name := range r.paths { |
| 63 | var vec Any |
| 64 | if r.recs[i] != nil { |
| 65 | vec, leafs = r.recs[i].build(sctx, leafs) |
| 66 | } else { |
| 67 | vec, leafs = leafs[0], leafs[1:] |
| 68 | } |
| 69 | fields = append(fields, super.NewField(name, vec.Type())) |
| 70 | out = append(out, vec) |
| 71 | } |
| 72 | typ := sctx.MustLookupTypeRecord(fields) |
| 73 | return NewRecord(typ, out, out[0].Len()), leafs |
| 74 | } |