diff options
| author | s-ol <s-ol@users.noreply.github.com> | 2020-05-17 15:41:32 +0000 |
|---|---|---|
| committer | s-ol <s+removethis@s-ol.nu> | 2025-03-02 14:24:49 +0000 |
| commit | efccabc9905c2e466d08679a2e19a7103c7c1892 (patch) | |
| tree | 98333598762c6f26a7b3d0207b2983a3a03ff942 | |
| parent | update scm rockspec (diff) | |
| download | alive-efccabc9905c2e466d08679a2e19a7103c7c1892.tar.gz alive-efccabc9905c2e466d08679a2e19a7103c7c1892.zip | |
builtin/trae: print literals literally
| -rw-r--r-- | alv/builtin.moon | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/alv/builtin.moon b/alv/builtin.moon index c895590..f4e4d56 100644 --- a/alv/builtin.moon +++ b/alv/builtin.moon @@ -279,9 +279,9 @@ to `then-expr`, otherwise it is equivalent to `else-xpr` if given, or nil otherw trace_ = Constant.meta meta: - name: 'trace!' + name: 'trace=' summary: "Trace an expression's value at evaltime." - examples: { '(trace! expr)' } + examples: { '(trace= expr)' } value: class extends Builtin eval: (scope, tail) => @@ -289,7 +289,7 @@ trace_ = Constant.meta assert #tail == 1, "'trace!' takes exactly one parameter" with node = L\push tail[1]\eval, scope - L\print "trace! #{tail[1]\stringify!}: #{node.result}" + L\print "trace! #{tail[1]\stringify 2}: #{node.result}" trace = Constant.meta meta: @@ -314,7 +314,7 @@ trace = Constant.meta tag = @tag\clone Tag.parse '-1' inner = Cell tag, { Constant.literal T.opdef, traceOp, 'trace' - Constant.str tostring tail[1] + Constant.str tail[1]\stringify 2 tail[1] } inner\eval scope @@ -401,7 +401,7 @@ to_evt = Constant.meta Scope.from_table { :doc - :trace, 'trace!': trace_, print: print_ + :trace, 'trace=': trace_, print: print_ :def, :use require: require_ |
