304
304
305
305
; ; DO NOT EDIT FILE, automatically imported from: rewrite-clj.zip.editz
306
306
(defn replace
307
- " Return `zloc` with the current node replaced by `value `.
308
- If `value ` is not already a node, an attempt will be made to coerce it to one.
307
+ " Return `zloc` with the current node replaced by `item `.
308
+ If `item ` is not already a node, an attempt will be made to coerce it to one.
309
309
310
310
Use [[replace*]] for non-coercing version of replace."
311
- [zloc value ] (rewrite-clj.zip.editz/replace zloc value ))
311
+ [zloc item ] (rewrite-clj.zip.editz/replace zloc item ))
312
312
313
313
; ; DO NOT EDIT FILE, automatically imported from: rewrite-clj.zip.editz
314
314
(defn edit
473
473
; ; DO NOT EDIT FILE, automatically imported from: rewrite-clj.zip.insert
474
474
(defn insert-right
475
475
" Return zipper with `item` inserted to the right of the current node in `zloc`, without moving location.
476
+ If `item` is not already a node, an attempt will be made to coerce it to one.
477
+
476
478
Will insert a space if necessary.
477
479
478
480
Use [[rewrite-clj.zip/insert-right*]] to insert without adding any whitespace."
482
484
(defn insert-left
483
485
" Return zipper with `item` inserted to the left of the current node in `zloc`, without moving location.
484
486
Will insert a space if necessary.
487
+ If `item` is not already a node, an attempt will be made to coerce it to one.
485
488
486
489
Use [[insert-left*]] to insert without adding any whitespace."
487
490
[zloc item] (rewrite-clj.zip.insert/insert-left zloc item))
490
493
(defn insert-child
491
494
" Return zipper with `item` inserted as the first child of the current node in `zloc`, without moving location.
492
495
Will insert a space if necessary.
496
+ If `item` is not already a node, an attempt will be made to coerce it to one.
493
497
494
498
Use [[insert-child*]] to insert without adding any whitespace."
495
499
[zloc item] (rewrite-clj.zip.insert/insert-child zloc item))
498
502
(defn append-child
499
503
" Return zipper with `item` inserted as the last child of the current node in `zloc`, without moving.
500
504
Will insert a space if necessary.
505
+ If `item` is not already a node, an attempt will be made to coerce it to one.
501
506
502
507
Use [[append-child*]] to append without adding any whitespace."
503
508
[zloc item] (rewrite-clj.zip.insert/append-child zloc item))
922
927
" DEPRECATED: renamed to [[insert-newline-right]]."
923
928
([zloc n] (rewrite-clj.zip.whitespace/append-newline zloc n))
924
929
([zloc] (rewrite-clj.zip.whitespace/append-newline zloc)))
925
- ; ; TODO: clj-kondo barfs on an empty reader cond
926
930
#?(:clj
927
931
928
932
; ; DO NOT EDIT FILE, automatically imported from: rewrite-clj.zip.base
@@ -1013,14 +1017,24 @@ Returns zipper with location at the leftmost sibling of the current node in `zlo
1013
1017
NOTE: This function does not skip, nor provide any special handling for whitespace/comment nodes."
1014
1018
[zloc] (rewrite-clj.custom-zipper.core/leftmost zloc))
1015
1019
1020
+ ; ; DO NOT EDIT FILE, automatically imported from: rewrite-clj.custom-zipper.core
1021
+ (defn remove*
1022
+ " Raw version of [[remove]].
1023
+
1024
+ Returns zipper with current node in `zloc` removed, with location at node that would have preceded
1025
+ it in a depth-first walk.
1026
+
1027
+ NOTE: This function does not skip, nor provide any special handling for whitespace/comment nodes."
1028
+ [zloc] (rewrite-clj.custom-zipper.core/remove zloc))
1029
+
1016
1030
; ; DO NOT EDIT FILE, automatically imported from: rewrite-clj.custom-zipper.core
1017
1031
(defn replace*
1018
1032
" Raw version of [[replace]].
1019
1033
1020
- Returns zipper with ` node` replacing current node in `zloc`, without moving location.
1034
+ Returns zipper with node `item ` replacing current node in `zloc`, without moving location.
1021
1035
1022
- NOTE: This function does not skip, nor provide any special handling for whitespace/comment nodes."
1023
- [zloc node ] (rewrite-clj.custom-zipper.core/replace zloc node ))
1036
+ NOTE: This function does no coercion, does not skip, nor provide any special handling for whitespace/comment nodes."
1037
+ [zloc item ] (rewrite-clj.custom-zipper.core/replace zloc item ))
1024
1038
1025
1039
; ; DO NOT EDIT FILE, automatically imported from: rewrite-clj.custom-zipper.core
1026
1040
(defn edit*
@@ -1030,55 +1044,45 @@ Returns zipper with value of `(apply f current-node args)` replacing current nod
1030
1044
1031
1045
The result of `f` should be a rewrite-clj node.
1032
1046
1033
- NOTE: This function does not skip, nor provide any special handling for whitespace/comment nodes."
1047
+ NOTE: This function does no coercion, does not skip, nor provide any special handling for whitespace/comment nodes."
1034
1048
[zloc f & args] (apply rewrite-clj.custom-zipper.core/edit zloc f args))
1035
1049
1036
- ; ; DO NOT EDIT FILE, automatically imported from: rewrite-clj.custom-zipper.core
1037
- (defn remove*
1038
- " Raw version of [[remove]].
1039
-
1040
- Returns zipper with current node in `zloc` removed, with location at node that would have preceded
1041
- it in a depth-first walk.
1042
-
1043
- NOTE: This function does not skip, nor provide any special handling for whitespace/comment nodes."
1044
- [zloc] (rewrite-clj.custom-zipper.core/remove zloc))
1045
-
1046
1050
; ; DO NOT EDIT FILE, automatically imported from: rewrite-clj.custom-zipper.core
1047
1051
(defn insert-left*
1048
1052
" Raw version of [[insert-left]].
1049
1053
1050
- Returns zipper with `item` inserted as the left sibling of current node in `zloc`,
1054
+ Returns zipper with node `item` inserted as the left sibling of current node in `zloc`,
1051
1055
without moving location.
1052
1056
1053
- NOTE: This function does not skip, nor provide any special handling for whitespace/comment nodes."
1057
+ NOTE: This function does no coercion, does not skip, nor provide any special handling for whitespace/comment nodes."
1054
1058
[zloc item] (rewrite-clj.custom-zipper.core/insert-left zloc item))
1055
1059
1056
1060
; ; DO NOT EDIT FILE, automatically imported from: rewrite-clj.custom-zipper.core
1057
1061
(defn insert-right*
1058
1062
" Raw version of [[insert-right]].
1059
1063
1060
- Returns zipper with `item` inserted as the right sibling of the current node in `zloc`,
1064
+ Returns zipper with node `item` inserted as the right sibling of the current node in `zloc`,
1061
1065
without moving location.
1062
1066
1063
- NOTE: This function does not skip, nor provide any special handling for whitespace/comment nodes."
1067
+ NOTE: This function does no coercion, does not skip, nor provide any special handling for whitespace/comment nodes."
1064
1068
[zloc item] (rewrite-clj.custom-zipper.core/insert-right zloc item))
1065
1069
1066
1070
; ; DO NOT EDIT FILE, automatically imported from: rewrite-clj.custom-zipper.core
1067
1071
(defn insert-child*
1068
1072
" Raw version of [[insert-child]].
1069
1073
1070
- Returns zipper with `item` inserted as the leftmost child of the current node in `zloc`,
1074
+ Returns zipper with node `item` inserted as the leftmost child of the current node in `zloc`,
1071
1075
without moving location.
1072
1076
1073
- NOTE: This function does not skip, nor provide any special handling for whitespace/comment nodes."
1077
+ NOTE: This function does no coercion, does not skip, nor provide any special handling for whitespace/comment nodes."
1074
1078
[zloc item] (rewrite-clj.custom-zipper.core/insert-child zloc item))
1075
1079
1076
1080
; ; DO NOT EDIT FILE, automatically imported from: rewrite-clj.custom-zipper.core
1077
1081
(defn append-child*
1078
1082
" Raw version of [[append-child]].
1079
1083
1080
- Returns zipper with `item` inserted as the rightmost child of the current node in `zloc`,
1084
+ Returns zipper with node `item` inserted as the rightmost child of the current node in `zloc`,
1081
1085
without moving.
1082
1086
1083
- NOTE: This function does not skip, nor provide any special handling for whitespace/comment nodes."
1087
+ NOTE: This function does no coercion, does not skip, nor provide any special handling for whitespace/comment nodes."
1084
1088
[zloc item] (rewrite-clj.custom-zipper.core/append-child zloc item))
0 commit comments