fix dict parsing
This commit is contained in:
parent
010b584ef1
commit
e767c319b1
|
@ -411,7 +411,7 @@
|
||||||
:token origin})
|
:token origin})
|
||||||
{:type :pair :data [key value] :token origin})
|
{:type :pair :data [key value] :token origin})
|
||||||
:keyword (do
|
:keyword (do
|
||||||
(def key (capture kw parser))
|
(def key (capture kw-only parser))
|
||||||
(def value (capture nonbinding parser))
|
(def value (capture nonbinding parser))
|
||||||
{:type :pair :data [key value] :token origin})
|
{:type :pair :data [key value] :token origin})
|
||||||
(try (panic parser (string "expected dict term, got " (type origin))) ([e] e))
|
(try (panic parser (string "expected dict term, got " (type origin))) ([e] e))
|
||||||
|
@ -507,7 +507,7 @@
|
||||||
(def key {:type :keyword :data (keyword name) :token origin})
|
(def key {:type :keyword :data (keyword name) :token origin})
|
||||||
{:type :pair :data [key word] :token origin})
|
{:type :pair :data [key word] :token origin})
|
||||||
:keyword (do
|
:keyword (do
|
||||||
(def key (capture kw parser))
|
(def key (capture kw-only parser))
|
||||||
(def value (capture pattern parser))
|
(def value (capture pattern parser))
|
||||||
{:type :pair :data [key value] :token origin})
|
{:type :pair :data [key value] :token origin})
|
||||||
(try (panic parser (string "expected dict term, got " (type origin))) ([e] e))
|
(try (panic parser (string "expected dict term, got " (type origin))) ([e] e))
|
||||||
|
|
Loading…
Reference in New Issue
Block a user