   ([name]
      (define name nil)))
 
-(defmethod emit-code :define [m]
+(defemit :define [m]
   (if (:value m)
     (str "#define " (:name m) " " (:value m))
     (str "#define " (:name m))))

(ns proto-oct.core)

(defmulti emit-code :type)

;; Pass-through version of emit-code for literals
(defmethod emit-code nil [literal]
  literal)

(defn define
  ([name value]

  ([cond then]
     (ifdef cond then nil)))

(defemit :ifdef [m]
  (if (:else m)
    (str "#ifdef " (:cond m) \newline
         (emit-code (:then m)) \newline
