mirror of
https://github.com/github/semantic.git
synced 2024-12-01 00:33:59 +03:00
Don't require statements in foreach
This commit is contained in:
parent
3a1026a7f1
commit
680861f9c2
@ -532,7 +532,7 @@ forStatement :: Assignment
|
||||
forStatement = makeTerm <$> symbol ForStatement <*> children (Statement.For <$> (term expressions <|> emptyTerm) <*> (term expressions <|> emptyTerm) <*> (term expressions <|> emptyTerm) <*> (statement <|> (makeTerm <$> location <*> manyTerm statement)))
|
||||
|
||||
foreachStatement :: Assignment
|
||||
foreachStatement = makeTerm <$> symbol ForeachStatement <*> children (forEachStatement' <$> term expression <*> term (pair <|> expression <|> list) <*> (makeTerm <$> location <*> someTerm statement))
|
||||
foreachStatement = makeTerm <$> symbol ForeachStatement <*> children (forEachStatement' <$> term expression <*> term (pair <|> expression <|> list) <*> (makeTerm <$> location <*> manyTerm statement))
|
||||
where forEachStatement' array value body = Statement.ForEach value array body
|
||||
|
||||
pair :: Assignment
|
||||
|
Loading…
Reference in New Issue
Block a user