(args ...vector.Any)
| 21 | } |
| 22 | |
| 23 | func (p *ParseURI) Call(args ...vector.Any) vector.Any { |
| 24 | if vec, ok := expr.CheckForNullThenError(args); ok { |
| 25 | return vec |
| 26 | } |
| 27 | vec := vector.Under(args[0]) |
| 28 | if vec.Type().ID() != super.IDString { |
| 29 | return vector.NewWrappedError(p.sctx, "parse_uri: string arg required", args[0]) |
| 30 | } |
| 31 | var b scode.Builder |
| 32 | db := vector.NewDynamicBuilder() |
| 33 | for i := range vec.Len() { |
| 34 | b.Truncate() |
| 35 | vec.Serialize(&b, i) |
| 36 | val := super.NewValue(super.TypeString, b.Bytes().Body()) |
| 37 | db.Write(p.samfn.Call([]super.Value{val})) |
| 38 | } |
| 39 | return db.Build(p.sctx) |
| 40 | } |
| 41 | |
| 42 | type ParseSUP struct { |
| 43 | sctx *super.Context |
nothing calls this directly
no test coverage detected