From c00c23fff54dc65b6412a3c3a1ffa0063ab0a0db Mon Sep 17 00:00:00 2001 From: Rick Winfrey Date: Mon, 9 Oct 2017 15:31:29 -0700 Subject: [PATCH] Assign goto statements --- src/Language/Go/Syntax.hs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/Language/Go/Syntax.hs b/src/Language/Go/Syntax.hs index 1d54b022b..3685f27de 100644 --- a/src/Language/Go/Syntax.hs +++ b/src/Language/Go/Syntax.hs @@ -49,6 +49,7 @@ type Syntax = , Literal.TextElement , Statement.Assignment , Statement.Break + , Statement.Goto , Statement.Return , Syntax.Context , Syntax.Error @@ -96,6 +97,7 @@ expressionChoices = , fieldIdentifier , functionDeclaration , functionType + , gotoStatement , incStatement , identifier , implicitLengthArrayType @@ -377,6 +379,9 @@ breakStatement = makeTerm <$> symbol BreakStatement <*> children (Statement.Brea decStatement :: Assignment decStatement = makeTerm <$> symbol DecStatement <*> children (Expression.Decrement <$> expression) +gotoStatement :: Assignment +gotoStatement = makeTerm <$> symbol GotoStatement <*> children (Statement.Goto <$> expression) + incStatement :: Assignment incStatement = makeTerm <$> symbol IncStatement <*> children (Expression.Increment <$> expression)