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:
parent
52bc364168
commit
2b73b4361f
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user