Created
August 4, 2018 01:29
-
-
Save benzap/fb4e977de36ff8fe2f6530d67af44dfc to your computer and use it in GitHub Desktop.
EDN Linter Example Use Case
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(ns edn-linter | |
;; require name of edn linter | |
(:require [the-name :refer [parse-with-info]] | |
(def input-string "[:a :b | |
{:test 123}]") | |
(def parsed-edn (parse-with-info input-string)) | |
;; {:line 0 | |
;; :type :vector | |
;; :children | |
;; [{:line 0 :index 0 :type :keyword :value :a} | |
;; {:line 0 :index 1 :type :keyword :value :b} | |
;; {:line 1 :index 2 :type :map | |
;; :children [{:line 1 :index :test :type mapentry :value {:type :integer :value 123}}]}]} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment