          (atom-lookup :operator-precedence)]]
   (find-atoms paren-types root)))
 
+(defn child-or-nil
+  "If this node has one child return it, otherwise return nil"
+  [node]
+  (let [[kid & others] (children node)]
+    (when (empty? others)
+      kid)))
+
 (defn find-all-parens-in-project
   [edn-file]
   (println (str (now)))

           {:file (atom-finder-relative-path file)}
           (->> file parse-file find-parens
                (map-values (partial map (fn [node]
                                           (merge {:parent-type (opname-or-typename (parent node))
                                                   :node-type (opname-or-typename node)}
                                                  (dissoc (loc node) :length :start-line)
                                                  )))))
           )))


(defn main-superfluous-parens
  []
  (let [edn-file "tmp/all-parens_2018-10-29_02_child.edn"
        csv-file "src/analysis/data/all-parens_2018-10-29_02_child.csv"
        ]
    (find-all-parens-in-project edn-file)
    ;(summarize-all-nodes edn-file csv-file)
