1
1
mirror of https://github.com/github/semantic.git synced 2024-12-22 06:11:49 +03:00

Update return statement assignments to accept empty return statements

This commit is contained in:
Rick Winfrey 2017-06-12 10:35:31 -07:00
parent 843e975cf5
commit 3f1ceeed8b

View File

@ -344,7 +344,7 @@ await :: Assignment
await = makeTerm <$> symbol Await <*> children (Expression.Call <$> (makeTerm <$> symbol AnonAwait <*> (Syntax.Identifier <$> source)) <*> many expression)
returnStatement :: Assignment
returnStatement = makeTerm <$> symbol ReturnStatement <*> (Statement.Return <$> children expressionList)
returnStatement = makeTerm <$> symbol ReturnStatement <*> children (Statement.Return <$> (expressionList <|> emptyTerm))
deleteStatement :: Assignment
deleteStatement = makeTerm <$> symbol DeleteStatement <*> children (Expression.Call <$> deleteIdentifier <* symbol ExpressionList <*> children (many expression))