1
1
mirror of https://github.com/github/semantic.git synced 2024-11-28 10:15:55 +03:00

🔥 specialized assignment alternations

This commit is contained in:
Rick Winfrey 2017-11-29 18:10:57 -08:00
parent eb83043303
commit cd1fdf1065

View File

@ -496,15 +496,15 @@ assignment' = makeTerm' <$> symbol AssignmentStatement <*> children (infixTerm
invert cons a b = Expression.Not (makeTerm1 (cons a b))
breakStatement :: Assignment
breakStatement = makeTerm <$> symbol BreakStatement <*> children (Statement.Break <$> (labelName <|> emptyTerm))
breakStatement = makeTerm <$> symbol BreakStatement <*> children (Statement.Break <$> (expression <|> emptyTerm))
communicationClause :: Assignment
communicationClause = makeTerm <$> symbol CommunicationClause <*> children (Statement.Pattern <$> (communicationCase <|> defaultCase) <*> expressions)
communicationClause = makeTerm <$> symbol CommunicationClause <*> children (Statement.Pattern <$> (communicationCase <|> expression) <*> expressions)
where
communicationCase = symbol CommunicationCase *> children expression
continueStatement :: Assignment
continueStatement = makeTerm <$> symbol ContinueStatement <*> children (Statement.Continue <$> (labelName <|> emptyTerm))
continueStatement = makeTerm <$> symbol ContinueStatement <*> children (Statement.Continue <$> (expression <|> emptyTerm))
decStatement :: Assignment
decStatement = makeTerm <$> symbol DecStatement <*> children (Statement.PostDecrement <$> expression)