mirror of
https://github.com/github/semantic.git
synced 2024-12-19 04:41:47 +03:00
Reuse the expressions assignment.
This commit is contained in:
parent
70e83e215f
commit
a1fd6c9ad9
@ -233,12 +233,12 @@ whileStatement = symbol WhileStatement >>= \ loc -> children (make loc <$> expre
|
||||
|
||||
tryStatement :: Assignment
|
||||
tryStatement = makeTerm <$> symbol TryStatement <*> children (Statement.Try <$> expression <*> many (expression <|> elseClause))
|
||||
where elseClause = makeTerm <$> symbol ElseClause <*> children (Statement.Else <$> emptyTerm <*> (makeTerm <$> location <*> many expression))
|
||||
where elseClause = makeTerm <$> symbol ElseClause <*> children (Statement.Else <$> emptyTerm <*> expressions)
|
||||
|
||||
exceptClause :: Assignment
|
||||
exceptClause = makeTerm <$> symbol ExceptClause <*> children
|
||||
(Statement.Catch <$> ((makeTerm <$> location <*> (uncurry (flip Statement.Let) <$> ((,) <$> expression <* symbol AnonAs <*> expression) <*> emptyTerm))
|
||||
<|> makeTerm <$> location <*> many expression)
|
||||
<|> expressions)
|
||||
<*> expressions)
|
||||
|
||||
functionDefinition :: Assignment
|
||||
|
Loading…
Reference in New Issue
Block a user