Skip to content

Commit 3c9412f

Browse files
committed
core: Add yyy and zzz to ys::std and yamlscript::debug
1 parent 704c4a5 commit 3c9412f

File tree

3 files changed

+27
-6
lines changed

3 files changed

+27
-6
lines changed

core/src/yamlscript/debug.clj

Lines changed: 18 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,9 @@
44
;; The yamlscript.debug library defines a set of Clojure debugging functions.
55

66
(ns yamlscript.debug
7-
(:require [clojure.pprint :as pp]))
7+
(:require
8+
[ys.yaml :as yaml]
9+
[clojure.pprint :as pp]))
810

911
(defn dump [o]
1012
(str
@@ -13,10 +15,6 @@
1315
(pp/pprint o))
1416
"...\n"))
1517

16-
(defn xxx [& o]
17-
(let [o (if (= 1 (count o)) (first o) o)]
18-
(throw (Exception. ^String (dump o)))))
19-
2018
(defn www [& o]
2119
(let [l (last o)
2220
o (if (= 1 (count o)) (first o) o)]
@@ -25,6 +23,21 @@
2523
(flush))
2624
l))
2725

26+
(defn xxx [& o]
27+
(let [o (if (= 1 (count o)) (first o) o)]
28+
(throw (Exception. ^String (str "\n" (dump o))))))
29+
30+
(defn yyy [& o]
31+
(let [l (last o)
32+
o (if (= 1 (count o)) (first o) o)]
33+
(print (dump o))
34+
(flush)
35+
l))
36+
37+
(defn zzz [& o]
38+
(let [o (if (= 1 (count o)) (first o) o)]
39+
(throw (Exception. ^String (str "\n" (dump o))))))
40+
2841
(defn xxx+ [& o]
2942
(binding [*print-meta* true]
3043
(apply xxx o)))

core/src/ys/std.clj

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,15 @@
1313
(defn www [& xs]
1414
(apply yamlscript.debug/www xs))
1515

16+
(defn xxx [& xs]
17+
(apply yamlscript.debug/xxx xs))
18+
19+
(defn yyy [& xs]
20+
(apply yamlscript.debug/yyy xs))
21+
22+
(defn zzz [& xs]
23+
(apply yamlscript.debug/zzz xs))
24+
1625
(defn toB [x] boolean x)
1726

1827
(defn toF [x] (parse-double x))

core/src/ys/yaml.clj

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33

44
(ns ys.yaml
55
(:require
6-
[yamlscript.debug :refer [www]]
76
[clj-yaml.core :as yaml])
87
(:refer-clojure :exclude [load]))
98

0 commit comments

Comments
 (0)