diff options
| author | s-ol <s-ol@users.noreply.github.com> | 2020-03-25 10:43:29 +0000 |
|---|---|---|
| committer | s-ol <s-ol@users.noreply.github.com> | 2020-03-25 11:25:05 +0000 |
| commit | 7cb862f6f6079509dafd466fff83c719cb2fd89e (patch) | |
| tree | 843f92c4d4b2507e88a525b7c56c29d343958e5b /core/stream/value.moon | |
| parent | Value -> Value/Event/IO-Stream (diff) | |
| download | alive-7cb862f6f6079509dafd466fff83c719cb2fd89e.tar.gz alive-7cb862f6f6079509dafd466fff83c719cb2fd89e.zip | |
new core.base.match, update lib
Diffstat (limited to 'core/stream/value.moon')
| -rw-r--r-- | core/stream/value.moon | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/core/stream/value.moon b/core/stream/value.moon index 0220f06..ce3ffc7 100644 --- a/core/stream/value.moon +++ b/core/stream/value.moon @@ -57,6 +57,20 @@ class ValueStream extends Stream -- Compares two `ValueStream`s by comparing their types and their Lua values. __eq: (other) => other.type == @type and other.value == @value + __tostring: => + value = if @meta.name + @meta.name + else if 'table' == (type @value) and rawget @value, '__base' + @value.__name + else + tostring @value + "<#{@@__name} #{@type}: #{value}>" + + --- Stream metatype. + -- + -- @tfield string metatype + metatype: 'value' + --- the type name of this stream. -- -- the following builtin typenames are used: |
