File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change 3636 (long our-value)))
3737
3838(defmacro enumerated-entity [tp doc & {:keys [unit]}]
39+ (assert (string? doc))
3940 (let [tp (resolve-tag tp)
4041 fname (with-meta (symbol (jt.u/dashize (-> (str tp) (string/split #"\. " ) last))) {:tag tp})
4142 fields (symbol (str fname " -fields" ))]
9091 o# os#)))))))))
9192
9293(defmacro single-field-entity [tp doc & {:keys [parseable?]}]
94+ (assert (string? doc))
9395 (let [^Class tpcls (resolve tp)
9496 tp (symbol (.getName tpcls))
9597 fname (with-meta (symbol (jt.u/dashize (-> (str tp) (string/split #"\. " ) last))) {:tag tp})
132134
133135(defmacro two-field-entity [tp doc & {:keys [major-field-types major-field-ctor
134136 minor-field-ctor minor-field-default]}]
137+ (assert (string? doc))
135138 (let [[major-field-ctor major-field-type] major-field-ctor
136139 [minor-field-ctor minor-field-type] minor-field-ctor
137140 major-field-type (resolve-tag major-field-type)
138141 minor-field-type (resolve-tag minor-field-type)
139142 tp (resolve-tag tp)
140- fname (with-meta (symbol (jt.u/dashize (-> (str tp) (string/split #"\. " ) last ))) {:tag tp})
143+ fname (with-meta (symbol (jt.u/dashize (-> (str tp) (string/split #"\. " ) peek ))) {:tag tp})
141144 arg (gensym )
142145 tmp-major (with-meta (gensym ) {:tag major-field-type})
143146 tmp-minor (with-meta (gensym ) {:tag minor-field-type})]
You can’t perform that action at this time.
0 commit comments