aboutsummaryrefslogtreecommitdiffstats
path: root/lib/string.moon
blob: 82e970271d6fa7c5ae2828cbb25b69092052d4ae (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
import Op from require 'core'

class str extends Op
  @doc: "(str v1 [v2]...)
(.. v1 [v2]...) - concatenate/stringify values"

  setup: (...) =>
    @children = { ... }

  update: (dt) =>
    for child in *@children
      child\update dt

    @value = table.concat [tostring child\get! for child in *@children]

{
  :str, '..': str
}