From dbb454eb0857c5e8ffca3043982e9d611ab0999a Mon Sep 17 00:00:00 2001 From: Rick Winfrey Date: Mon, 30 Oct 2017 17:50:39 -0700 Subject: [PATCH] Not all break statements have labels --- src/Language/Go/Assignment.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Language/Go/Assignment.hs b/src/Language/Go/Assignment.hs index 04225ea7c..33e870336 100644 --- a/src/Language/Go/Assignment.hs +++ b/src/Language/Go/Assignment.hs @@ -423,7 +423,7 @@ shortVarDeclaration :: Assignment shortVarDeclaration = makeTerm <$> symbol ShortVarDeclaration <*> children (Statement.Assignment <$> pure [] <*> expression <*> expression) breakStatement :: Assignment -breakStatement = makeTerm <$> symbol BreakStatement <*> children (Statement.Break <$> labelName) +breakStatement = makeTerm <$> symbol BreakStatement <*> children (Statement.Break <$> (labelName <|> emptyTerm)) decStatement :: Assignment decStatement = makeTerm <$> symbol DecStatement <*> children (Statement.PostDecrement <$> expression)