Fixed an error in the peg for dicts.

This commit is contained in:
Bruce Hill 2018-01-11 18:48:12 -08:00
parent 425f4ed7a7
commit 48b27d4b1a

View File

@ -85,8 +85,10 @@ indented_dict (Dict):
|}
(dedent / (("" -> "Error while parsing dict") => error))
dict_line:
(inline_dict_item (comma inline_dict_item)* (comma (functioncall / expression)?)?)
/ {| {:dict_key: inline_expression / word :} %ws* "=" %ws* {:dict_value: functioncall / expression :} |}
(inline_dict_item comma)* (
(inline_dict_item comma)
/{| {:dict_key: inline_expression / word :} %ws* "=" %ws* {:dict_value: functioncall / expression :} |}
)
inline_dict_item:
{| {:dict_key: inline_expression / word :} %ws* "=" %ws* {:dict_value: inline_functioncall / inline_expression :} |}