Reputation: 15812
I have file with dsl-like stuff data. There I want to declore some s-expression based information. And I have some runner that process such files.
runner.clj
(require '[data :as d])
;processing
data.clj
(ns data)
(defmacro data [s] (println (str s)))
;dsl like stuff goes here
(data "foo")
How can I remove non dsl from data file like defmacro?
Also any links to source code with similar solutions are welcome.
Upvotes: 1
Views: 53
Reputation: 17299
; dsl.clj
(ns dsl)
(defmacro data ...)
; data.clj
(ns data
(:require dsl))
(dsl/data ...)
Or with use
:
; data.clj
(ns data
(:use [dsl :only (data)]))
(data ...)
Upvotes: 2