Fix #1579: add clojure.tools.reader/resolve-symbol
This commit is contained in:
parent
056254dc9d
commit
bf306bb407
2 changed files with 11 additions and 2 deletions
|
|
@ -7,6 +7,10 @@ A preview of the next release can be installed from
|
|||
|
||||
[Babashka](https://github.com/babashka/babashka): Native, fast starting Clojure interpreter for scripting
|
||||
|
||||
## Unreleased
|
||||
|
||||
- [#1579](https://github.com/babashka/babashka/issues/1579): add `clojure.tools.reader/resolve-symbol`
|
||||
|
||||
## 1.3.181 (2023-06-13)
|
||||
|
||||
- [#1575](https://github.com/babashka/babashka/issues/1575): fix command line parsing problem with `-e` + `*command-line-args*`
|
||||
|
|
|
|||
|
|
@ -3,7 +3,8 @@
|
|||
(:require
|
||||
[edamame.core :as e]
|
||||
[sci.core :as sci]
|
||||
[clojure.tools.reader.reader-types :as rt]))
|
||||
[sci.ctx-store :as ctx]
|
||||
[sci.impl.parser :as p]))
|
||||
|
||||
(def rns (sci/create-ns 'clojure.tools.reader))
|
||||
|
||||
|
|
@ -53,4 +54,8 @@
|
|||
sentinel)
|
||||
v))))
|
||||
|
||||
(def reader-namespace {'read (sci/copy-var read rns)})
|
||||
(defn resolve-symbol [sym]
|
||||
(p/fully-qualify (ctx/get-ctx) sym))
|
||||
|
||||
(def reader-namespace {'read (sci/copy-var read rns)
|
||||
'resolve-symbol (sci/copy-var resolve-symbol rns)})
|
||||
|
|
|
|||
Loading…
Reference in a new issue