Move find-token-references to token namespace

This commit is contained in:
Florian Schroedl
2024-08-08 09:22:32 +02:00
parent 252797183c
commit 980238e27b
5 changed files with 18 additions and 28 deletions

View File

@@ -4,6 +4,13 @@
[clojure.set :as set]
[cuerdas.core :as str]))
(defn find-token-references
"Finds token reference values in `value-string` and returns a set with all contained namespaces."
[value-string]
(some->> (re-seq #"\{([^}]*)\}" value-string)
(map second)
(into #{})))
(defn token-identifier [{:keys [name] :as _token}]
name)