(args []super.Value)
| 13 | } |
| 14 | |
| 15 | func (c *Concat) Call(args []super.Value) super.Value { |
| 16 | args = underAll(args) |
| 17 | var b strings.Builder |
| 18 | for _, arg := range args { |
| 19 | if arg.IsError() { |
| 20 | return arg |
| 21 | } |
| 22 | if arg.IsNull() { |
| 23 | continue |
| 24 | } |
| 25 | if !arg.IsString() { |
| 26 | return c.sctx.WrapError("concat: string arg required", arg) |
| 27 | } |
| 28 | b.WriteString(super.DecodeString(arg.Bytes())) |
| 29 | } |
| 30 | return super.NewString(b.String()) |
| 31 | } |
| 32 | |
| 33 | type Position struct { |
| 34 | sctx *super.Context |