From b750b8f42311177e7913660de6bc2aaa1ad6cb09 Mon Sep 17 00:00:00 2001 From: Rick Winfrey Date: Mon, 20 Nov 2017 19:08:26 -0800 Subject: [PATCH] Allow empty blocks for type switch statements --- 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 7ab6ea4ca..e7003af0f 100644 --- a/src/Language/Go/Assignment.hs +++ b/src/Language/Go/Assignment.hs @@ -454,7 +454,7 @@ expressionSwitchStatement = makeTerm <$> symbol ExpressionSwitchStatement <*> ch typeSwitchStatement :: Assignment typeSwitchStatement = makeTerm <$> symbol TypeSwitchStatement <*> children (Go.Syntax.TypeSwitch <$> _typeSwitchSubject <*> expressions) where - _typeSwitchSubject = makeTerm <$> location <*> manyTermsTill expression (void (symbol TypeCaseClause)) + _typeSwitchSubject = makeTerm <$> location <*> manyTermsTill expression (void (symbol TypeCaseClause)) <|> emptyTerm typeSwitchGuard :: Assignment typeSwitchGuard = makeTerm <$> symbol Grammar.TypeSwitchGuard <*> children (Go.Syntax.TypeSwitchGuard <$> expressions)