mirror of
https://github.com/github/semantic.git
synced 2024-12-27 00:44:57 +03:00
Allow empty blocks for type switch statements
This commit is contained in:
parent
0cfe57713d
commit
b750b8f423
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user