From bddb35ce2864a1388691bfb311f76262db5855e8 Mon Sep 17 00:00:00 2001 From: Rick Winfrey Date: Tue, 24 Oct 2017 14:16:15 -0700 Subject: [PATCH] Assign keyed elements --- src/Language/Go/Assignment.hs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Language/Go/Assignment.hs b/src/Language/Go/Assignment.hs index 34141c4ad..4fcd63666 100644 --- a/src/Language/Go/Assignment.hs +++ b/src/Language/Go/Assignment.hs @@ -110,6 +110,7 @@ expressionChoices = , interfaceType , interpretedStringLiteral , intLiteral + , keyedElement , labelName , literalValue , mapType @@ -404,6 +405,9 @@ elseClause = symbol ElseClause *> children expression incStatement :: Assignment incStatement = makeTerm <$> symbol IncStatement <*> children (Statement.PostIncrement <$> expression) +keyedElement :: Assignment +keyedElement = makeTerm <$> symbol KeyedElement <*> children (Literal.KeyValue <$> expression <*> expression) + labelName :: Assignment labelName = makeTerm <$> symbol LabelName <*> (Syntax.Identifier <$> source)