Skip to content

Commit

Permalink
fix missing meta data in parsed data; alpha release
Browse files Browse the repository at this point in the history
  • Loading branch information
tiye committed Sep 2, 2020
1 parent 3004a4b commit d5379d4
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 9 deletions.
28 changes: 23 additions & 5 deletions calcit.cirru
Original file line number Diff line number Diff line change
Expand Up @@ -920,12 +920,17 @@
|j $ {} (:type :leaf) (:by |rJG4IHzWf) (:at 1578416643557) (:text |xs) (:id |KTdRvJpjB)
:id |cplUb1uAS
:id |_EB8bMZl
|j $ {} (:type :expr) (:by |rJG4IHzWf) (:at 1578416661783)
|j $ {} (:type :expr) (:by |rJG4IHzWf) (:at 1599033830159)
:data $ {}
|T $ {} (:type :leaf) (:by |rJG4IHzWf) (:at 1578416663074) (:text |get) (:id |QZGnqHcGe)
|j $ {} (:type :leaf) (:by |rJG4IHzWf) (:at 1578416663551) (:text |xs) (:id |8oey9xZji)
|r $ {} (:type :leaf) (:by |rJG4IHzWf) (:at 1578416664443) (:text |1) (:id |AV-gZ1j8)
:id |f9oVu9RLi
|T $ {} (:type :expr) (:by |rJG4IHzWf) (:at 1578416661783)
:data $ {}
|T $ {} (:type :leaf) (:by |rJG4IHzWf) (:at 1578416663074) (:text |get) (:id |QZGnqHcGe)
|j $ {} (:type :leaf) (:by |rJG4IHzWf) (:at 1578416663551) (:text |xs) (:id |8oey9xZji)
|r $ {} (:type :leaf) (:by |rJG4IHzWf) (:at 1578416664443) (:text |1) (:id |AV-gZ1j8)
:id |f9oVu9RLi
|D $ {} (:type :leaf) (:by |rJG4IHzWf) (:at 1599033833742) (:text |with-meta) (:id |PPBgfLGZLB)
|j $ {} (:type :leaf) (:by |rJG4IHzWf) (:at 1599033839726) (:text |:quoted-cirru) (:id |wLjSudUle)
:id |o6s2t_J_d
:id |gLTksGfrn
|x $ {} (:type :expr) (:by |rJG4IHzWf) (:at 1574566419054) (:id |_FOLl08Lql)
:data $ {}
Expand Down Expand Up @@ -1376,6 +1381,19 @@
|D $ {} (:type :leaf) (:by |rJG4IHzWf) (:at 1599033516404) (:text |pr-str) (:id |xYhX_rqcdo)
:id |J_HrTKmvfK
:id |C3j56KsTm
|yT $ {} (:type :expr) (:by |rJG4IHzWf) (:at 1599033450582)
:data $ {}
|T $ {} (:type :leaf) (:by |rJG4IHzWf) (:at 1599033451718) (:text |println) (:id |C3j56KsTmleaf)
|j $ {} (:type :expr) (:by |rJG4IHzWf) (:at 1599033515383)
:data $ {}
|T $ {} (:type :expr) (:by |rJG4IHzWf) (:at 1599033452908)
:data $ {}
|T $ {} (:type :leaf) (:by |rJG4IHzWf) (:at 1599033454388) (:text |parse) (:id |tjiVXQxE2T)
|j $ {} (:type :leaf) (:by |rJG4IHzWf) (:at 1599033480726) (:text "|\"{}\n :a $ quote $ def f (x y) (+ x y)\n") (:id |FNLyUmRdQ)
:id |j_IqlEcTs
|D $ {} (:type :leaf) (:by |rJG4IHzWf) (:at 1599033861352) (:text |write) (:id |xYhX_rqcdo)
:id |J_HrTKmvfK
:id |XPO0jivEh
:id |UGv28-E7N6
|check-cirru-format $ {} (:type :expr) (:by |rJG4IHzWf) (:at 1599032950168)
:data $ {}
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@cirru/edn",
"version": "0.0.10-a1",
"version": "0.0.10-a2",
"description": "ClojureScript workflow using Calcit Editor",
"main": "index.js",
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion release.edn
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{:version "0.0.10-a1"
{:version "0.0.10-a2"
:group-id "cirru"
:artifact-id "edn"
:skip-tag true
Expand Down
5 changes: 3 additions & 2 deletions src/cirru_edn/core.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
(= "{}" (first xs))
(->> xs (rest) (map (fn [[k v]] [(cirru->edn k) (cirru->edn v)])) (into {}))
(= "do" (first xs)) (cirru->edn (get xs 1))
(= "quote" (first xs)) (get xs 1)
(= "quote" (first xs)) (with-meta (get xs 1) :quoted-cirru)
:else (do (js/console.warn "Unknown xs" xs) nil))
:else (do (js/console.warn "Unknown data" xs) (str xs))))

Expand Down Expand Up @@ -68,4 +68,5 @@
(defn user-scripts []
(println (write {:a 1, :b (with-meta ["def" "a" ["x" "y"] ["+" "x" "y"]] :quoted-cirru)}))
(println "will fail:" (write {:a 1, :b (with-meta ["a" "b" "c" {:a 1}] :quoted-cirru)}))
(println (pr-str (parse "{}\n :a $ quote $ def f (x y) (+ x y)\n"))))
(println (pr-str (parse "{}\n :a $ quote $ def f (x y) (+ x y)\n")))
(println (write (parse "{}\n :a $ quote $ def f (x y) (+ x y)\n"))))

0 comments on commit d5379d4

Please sign in to comment.