1
1
mirror of https://github.com/github/semantic.git synced 2025-01-03 04:51:57 +03:00

Term if initializer and else clause statements

This commit is contained in:
Rick Winfrey 2017-11-20 11:30:17 -08:00
parent 52bc364168
commit 2b73b4361f

View File

@ -601,10 +601,10 @@ ifStatement :: Assignment
ifStatement = makeTerm <$> symbol IfStatement <*> children (Statement.If <$> (makeTerm <$> location <*> manyTermsTill expression (void (symbol Block))) <*> term expression <*> (term expression <|> term emptyTerm))
ifInitializer :: Assignment
ifInitializer = symbol IfInitializer *> children expression
ifInitializer = symbol IfInitializer *> children (term expression)
elseClause :: Assignment
elseClause = symbol ElseClause *> children expression
elseClause = symbol ElseClause *> children (term expression)
forStatement :: Assignment
forStatement = mkForStatement <$> symbol ForStatement <*> children ((,) <$> (forClause <|> rangeClause <|> for <|> emptyClause) <*> term expression)