 (defn A
   ([x] (A x null-env))
   ([x E]
+     (DBG :A x E)
      (let [i (meta x)
            w (fn [[x E]] [(with-meta x i) E])]
        (cond

                  [value E] (A value E)]
              (w [(list* h name value) E]))
            (:def)
            (let [[name [args star-arg more-args kwarg] rettype body decorators] t
                  [decorators E] (A* () decorators E)
                  [name E] (Alhs name E)
                  [args EE] (Alhs* args null-env)
                  [star-arg EE] (Alhs star-arg EE)
                  [more-args EE] (Alhs* more-args EE)
                  [kwarg EE] (Alhs kwarg EE)
                  [rettype EE] (A rettype EE)
                  [body EE] (A body EE)]
              (w [(list h name [args star-arg more-args kwarg] rettype body decorators EE) E]))
            (:class)
            (let [[name superclasses body decorators] t
                  [decorators E] (A* () decorators E)
                  [name E] (Alhs name E)
                  [superclasses E] (Alhs* () superclasses E)
                  [body EE] (A body null-env)]
              (w [(list h name superclasses body decorators EE) E]))
            (:yield :yield-from)
            (w (A* (list h) t (assoc E :yield true)))
            (:nonlocal :global)

            ($syntax-error)))
        (symbol? x)
        [x (update-in E [:referenced] #(conj % x))]
        (or (literal? x) (#{:False :True :None :zero-uple :empty-list :empty-dict} x) (nil? x))
        [x E]
        :else ($syntax-error x)))))
