diff --git a/src/Language/Go/Syntax.hs b/src/Language/Go/Syntax.hs index 6f4384402..84f23aca1 100644 --- a/src/Language/Go/Syntax.hs +++ b/src/Language/Go/Syntax.hs @@ -37,6 +37,7 @@ type Syntax = , Expression.Boolean , Expression.Call , Expression.Comparison + , Expression.Decrement , Expression.Increment , Expression.MemberAccess , Literal.Array @@ -87,6 +88,7 @@ expressionChoices = , compositeLiteral , constVarDeclaration , constVarSpecification + , decStatement , element , expressionList , fieldDeclaration @@ -346,6 +348,9 @@ parameterDeclaration = symbol ParameterDeclaration *> children expressions breakStatement :: Assignment breakStatement = makeTerm <$> symbol BreakStatement <*> children (Statement.Break <$> labelName) +decStatement :: Assignment +decStatement = makeTerm <$> symbol DecStatement <*> children (Expression.Decrement <$> expression) + incStatement :: Assignment incStatement = makeTerm <$> symbol IncStatement <*> children (Expression.Increment <$> expression)