From 48b27d4b1ac2c39cbbc19af6600ca1ac28ac8be3 Mon Sep 17 00:00:00 2001 From: Bruce Hill Date: Thu, 11 Jan 2018 18:48:12 -0800 Subject: [PATCH] Fixed an error in the peg for dicts. --- nomsu.peg | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/nomsu.peg b/nomsu.peg index c7a43c7..9920665 100644 --- a/nomsu.peg +++ b/nomsu.peg @@ -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 :} |}