1
0
mirror of https://github.com/janet-lang/janet synced 2024-06-24 06:03:17 +00:00

Adopt Andrew Chamber's suggestions

This commit is contained in:
LouisJackman 2020-05-18 21:55:21 +01:00
parent e0130e7fd7
commit e9a5cfaddd
No known key found for this signature in database
GPG Key ID: C83A456999EEBC34

View File

@ -945,7 +945,7 @@
(array/push parts (tuple apply f $args)))
(tuple 'fn (tuple '& $args) (tuple/slice parts 0)))
(defmacro trace-pp
(defmacro tracev
"Displays the variables or literals listed, providing both the name and
and the value for variables. Designed for quick debugging of values. Returns
the traced forms: nil for none, the form itself for one, and a tuple of the
@ -955,13 +955,12 @@
~(do
(def ,results @[])
,;(map (fn [form]
(def preface (if (symbol? form)
(string form " is")
"Expression is"))
~(do
(def ,var ,form)
(eprintf (string "%s " (dyn :pretty-format "%q"))
,preface
(eprintf (string (dyn :pretty-format "%q")
" is "
(dyn :pretty-format "%q"))
',form
,var)
(eflush)
(array/push ,results ,var)))