diff options
| author | s-ol <s-ol@users.noreply.github.com> | 2020-03-21 19:06:18 +0000 |
|---|---|---|
| committer | s-ol <s-ol@users.noreply.github.com> | 2020-03-21 19:06:18 +0000 |
| commit | e83df1af2cdad8c2d61ba790a96875cd260eceaf (patch) | |
| tree | 5766654329675bd5259be772bc2537c7fdd8ab1c /lib/string.moon | |
| parent | docs/guide: document supported interpreter versions (diff) | |
| download | alive-e83df1af2cdad8c2d61ba790a96875cd260eceaf.tar.gz alive-e83df1af2cdad8c2d61ba790a96875cd260eceaf.zip | |
new meta/doc system
Diffstat (limited to 'lib/string.moon')
| -rw-r--r-- | lib/string.moon | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/lib/string.moon b/lib/string.moon index 06509f3..8b48977 100644 --- a/lib/string.moon +++ b/lib/string.moon @@ -1,12 +1,15 @@ -import Op, Input from require 'core.base' +import Op, Value, Input from require 'core.base' -class str extends Op - @doc: "(str v1 [v2]...) -(.. v1 [v2]...) - concatenate/stringify values" - new: => super 'str' +str = Value.meta + meta: + name: 'str' + summary: "Concatenate/stringify values." + examples: { '(.. v1 [v2…])', '(str v1 [v2…])' } + value: class extends Op + new: => super 'str' - setup: (inputs) => super [Input.value v for v in *inputs] - tick: => @out\set table.concat [tostring v! for v in *@inputs] + setup: (inputs) => super [Input.value v for v in *inputs] + tick: => @out\set table.concat [tostring v! for v in *@inputs] { :str, '..': str |
