This commit is contained in:
1 parent
35bbd7ffef
commit
e5476361c9
1 file changed
+12
-5
+12
-5
@@ -498,11 +498,18 @@
|
||||
(let [c (atom {})]
|
||||
(clojure.walk/postwalk
|
||||
(fn [x]
|
||||
(if (and (symbol? x) (str/starts-with? (name x) "scope__"))
|
||||
(let [syms (swap! c #(if (contains? % x)
|
||||
%
|
||||
(assoc % x (symbol (str "s" (count %))))))]
|
||||
(get syms x))
|
||||
(if (instance? Variable x)
|
||||
(let [[sym scopes] (destructure-variable x)
|
||||
syms (swap!
|
||||
c
|
||||
#(let [r (set/difference scopes (keys %))]
|
||||
(into %
|
||||
(map-indexed
|
||||
(fn [n a]
|
||||
[a (symbol (str "s" (+ (dec (count r)) n)))])
|
||||
r))))]
|
||||
#_(->Variable sym (set (map #(get syms %) scopes)))
|
||||
[sym (set (map #(get syms %) scopes))])
|
||||
x))
|
||||
datum)))
|
||||
|
||||
|
||||
Reference in new issue
Block a user