(diff parsed-code)

Takes the result of `parse` and returns a vector of maps describing each insertion or removal made by parinferish.

Example

(parinferish.core/diff (parinferish.core/parse "([1\n 2\n 3]" {:mode :smart, :cursor-line 0, :cursor-column 1}))

Source

(defn diff "Takes the result of `parse` and returns a vector of maps describing\n each insertion or removal made by parinferish." [parsed-code] (let [*line (volatile! 0) *column (volatile! 0) *diff (volatile! []) m (meta parsed-code) disable-parinfer? (and (= :paren (:mode m)) (:error? m))] (when-not disable-parinfer? (run! (partial diff-node *line *column *diff nil) parsed-code)) @*diff))