Skip to content

Commit

Permalink
Added op=
Browse files Browse the repository at this point in the history
  • Loading branch information
jonase committed Feb 27, 2012
1 parent 91c7e58 commit ed4d968
Showing 1 changed file with 15 additions and 4 deletions.
19 changes: 15 additions & 4 deletions src/analyze/util.clj
Expand Up @@ -22,12 +22,23 @@
:children
expr))

#_(defn expr-zip
"Return a zipper over expr"
[expr]
(zipper #(contains? % :children)
#(:children %)
#(assoc %1 :children %2)
expr))

(defn op= [kw]
(fn [expr]
(= (:op expr) kw)))


(comment
(use 'analyze.core)
(print-expr
(analyze-one {:ns {:name 'clojure.core} :context :eval}
'(defn a
([^bytes b] ^Integer b)
([b c] c)))
'(deftype A []))
:children :Expr-obj :ObjMethod-obj :LocalBinding-obj :env :BindingInit-obj)
)
)

0 comments on commit ed4d968

Please sign in to comment.