restore some clojure-only optimizations on keywords
Signed-off-by: Sean Corfield <sean@corfield.org>
This commit is contained in:
parent
3906aa53c0
commit
2c8fc30b1d
1 changed files with 6 additions and 5 deletions
|
|
@ -436,7 +436,8 @@
|
||||||
(defn- format-simple-var
|
(defn- format-simple-var
|
||||||
([x]
|
([x]
|
||||||
(let [c (if (keyword? x)
|
(let [c (if (keyword? x)
|
||||||
(str (symbol x))
|
#?(:clj (str (.sym ^clojure.lang.Keyword x))
|
||||||
|
:default (subs (str x) 1))
|
||||||
(str x))]
|
(str x))]
|
||||||
(format-simple-var x c {})))
|
(format-simple-var x c {})))
|
||||||
([x c opts]
|
([x c opts]
|
||||||
|
|
@ -453,7 +454,8 @@
|
||||||
;; for multiple / in the %fun.call case so that
|
;; for multiple / in the %fun.call case so that
|
||||||
;; qualified column names can be used:
|
;; qualified column names can be used:
|
||||||
(let [c (if (keyword? x)
|
(let [c (if (keyword? x)
|
||||||
(str (symbol x))
|
#?(:clj (str (.sym ^clojure.lang.Keyword x))
|
||||||
|
:default (subs (str x) 1))
|
||||||
(str x))]
|
(str x))]
|
||||||
(cond (str/starts-with? c "%")
|
(cond (str/starts-with? c "%")
|
||||||
(let [[f & args] (split-by-separator (subs c 1) ".")]
|
(let [[f & args] (split-by-separator (subs c 1) ".")]
|
||||||
|
|
@ -1731,9 +1733,8 @@
|
||||||
qualifier, if any."
|
qualifier, if any."
|
||||||
[k]
|
[k]
|
||||||
(if (keyword? k)
|
(if (keyword? k)
|
||||||
(if-let [n (namespace k)]
|
#?(:clj (.sym ^clojure.lang.Keyword k)
|
||||||
(symbol n (name k))
|
:default (subs (str k) 1))
|
||||||
(symbol (name k)))
|
|
||||||
k))
|
k))
|
||||||
|
|
||||||
(defn format-dsl
|
(defn format-dsl
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue