1
1
mirror of https://github.com/github/semantic.git synced 2025-01-03 13:02:37 +03:00

Assign fall through statements

This commit is contained in:
Rick Winfrey 2017-10-30 17:50:25 -07:00
parent fa274a5a41
commit 328e6f69cf

View File

@ -104,6 +104,7 @@ expressionChoices =
, expressionCaseClause , expressionCaseClause
, expressionList , expressionList
, expressionSwitchStatement , expressionSwitchStatement
, fallThroughStatement
, fieldDeclaration , fieldDeclaration
, fieldIdentifier , fieldIdentifier
, functionDeclaration , functionDeclaration
@ -330,6 +331,9 @@ expressionSwitchStatement = makeTerm <$> symbol ExpressionSwitchStatement <*> ch
where where
expressionCaseClauses = makeTerm <$> location <*> many expressionCaseClause expressionCaseClauses = makeTerm <$> location <*> many expressionCaseClause
fallThroughStatement :: Assignment
fallThroughStatement = makeTerm <$> symbol FallthroughStatement <*> (Statement.Pattern <$> (makeTerm <$> location <*> (Syntax.Identifier <$> source)) <*> emptyTerm)
variadicArgument :: Assignment variadicArgument :: Assignment
variadicArgument = makeTerm <$> symbol VariadicArgument <*> children (Go.Syntax.Variadic <$> pure [] <*> expression) variadicArgument = makeTerm <$> symbol VariadicArgument <*> children (Go.Syntax.Variadic <$> pure [] <*> expression)