feat: add missing core fns (bit-clear, get-method, second, predicates, ...)
Resolve symbols that were unbound or leaking to broken Janet builtins: - bit-clear/bit-set/bit-flip/bit-test/bit-and-not - get-method/methods (multimethod introspection) - second/ffirst/nfirst/fnext/nnext, last (was leaking to Janet, broke on pvec), drop-last/take-last - ident?/simple-symbol?/qualified-keyword?/simple-keyword?/simple-ident?/ qualified-ident?/inst?/inst-ms/uri?/uuid?/bytes?/tagged-literal? - clojure.string/re-quote-replacement Advances the SCI bootstrap; conformance 206/206, features 71/71.
This commit is contained in:
parent
1eb2843365
commit
e43f39bc36
3 changed files with 90 additions and 1 deletions
|
|
@ -121,3 +121,13 @@
|
|||
(let [sub (subs s 0 from) r (str-reverse-b sub) sval (str-reverse-b value)
|
||||
idx (str-find sval r)]
|
||||
(when idx (inc (- from (+ idx (count value))))))))
|
||||
|
||||
(defn re-quote-replacement
|
||||
"Escape special characters (backslash and dollar) in a regex replacement
|
||||
string so it is used literally rather than interpreted."
|
||||
[replacement]
|
||||
(apply str
|
||||
(map (fn [ch]
|
||||
(let [c (str ch)]
|
||||
(if (or (= c "\\") (= c "$")) (str "\\" c) c)))
|
||||
(seq replacement))))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue