mirror of
https://github.com/janet-lang/janet
synced 2024-12-29 09:50:27 +00:00
Adopt Andrew Chamber's suggestions
This commit is contained in:
parent
e0130e7fd7
commit
e9a5cfaddd
@ -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)))
|
||||
|
Loading…
Reference in New Issue
Block a user