diff --git a/janet/parser.janet b/janet/parser.janet index 635ac8c..d348cb5 100644 --- a/janet/parser.janet +++ b/janet/parser.janet @@ -411,7 +411,7 @@ :token origin}) {:type :pair :data [key value] :token origin}) :keyword (do - (def key (capture kw parser)) + (def key (capture kw-only parser)) (def value (capture nonbinding parser)) {:type :pair :data [key value] :token origin}) (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}) {:type :pair :data [key word] :token origin}) :keyword (do - (def key (capture kw parser)) + (def key (capture kw-only parser)) (def value (capture pattern parser)) {:type :pair :data [key value] :token origin}) (try (panic parser (string "expected dict term, got " (type origin))) ([e] e))