From 3d0bc0e92616483d2d94ecd712df434ed8cc091d Mon Sep 17 00:00:00 2001 From: Rob Rix Date: Mon, 14 Aug 2017 19:09:55 -0400 Subject: [PATCH] Assign key-value pairs as infix terms. --- src/Language/Python/Syntax.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Language/Python/Syntax.hs b/src/Language/Python/Syntax.hs index 854981657..3effd53e0 100644 --- a/src/Language/Python/Syntax.hs +++ b/src/Language/Python/Syntax.hs @@ -353,7 +353,7 @@ dictionary :: Assignment dictionary = makeTerm <$> symbol Dictionary <*> children (Literal.Hash <$> many expression) pair :: Assignment -pair = makeTerm <$> symbol Pair <*> children (Literal.KeyValue <$> expression <*> expression) +pair = makeTerm' <$> symbol Pair <*> children (infixTerm expression expression [ (inj .) . Literal.KeyValue <$ symbol AnonColon ]) list' :: Assignment list' = makeTerm <$> symbol List <*> children (Literal.Array <$> many expression)