Add visitOnlyExpressions

This commit is contained in:
Jeroen Engels 2021-10-27 18:02:09 +02:00
parent 50d26f3314
commit 6fade9f954

View File

@ -4478,6 +4478,18 @@ visitExpression expressionRelatedVisitors node moduleContext =
|> visitWithListOfVisitors expressionRelatedVisitors.expressionVisitorsOnExit node
visitOnlyExpressions :
ExpressionRelatedVisitors moduleContext
-> Node Expression
-> moduleContext
-> ( List (Error {}), moduleContext )
visitOnlyExpressions expressionRelatedVisitors node moduleContext =
( [], moduleContext )
|> visitWithListOfVisitors expressionRelatedVisitors.expressionVisitorsOnEnter node
|> accumulateList (visitOnlyExpressions expressionRelatedVisitors) (expressionChildren node)
|> visitWithListOfVisitors expressionRelatedVisitors.expressionVisitorsOnExit node
visitLetDeclaration :
ExpressionRelatedVisitors moduleContext
-> Node Expression.LetBlock