Extract variable

This commit is contained in:
Jeroen Engels 2021-10-27 17:19:38 +02:00
parent bc22c438e8
commit 6f206f8392

View File

@ -1324,6 +1324,14 @@ fromModuleRuleSchemaToRunnableModuleVisitor (ModuleRuleSchema schema) =
(visitDeclaration (visitDeclaration
(List.reverse schema.declarationVisitorsOnEnter) (List.reverse schema.declarationVisitorsOnEnter)
schema.declarationVisitorsOnExit schema.declarationVisitorsOnExit
expressionVisitorRecord
)
else
\_ errorsAndContext -> errorsAndContext
expressionVisitorRecord : ExpressionRelatedVisitors moduleContext
expressionVisitorRecord =
{ expressionVisitorsOnEnter = List.reverse schema.expressionVisitorsOnEnter { expressionVisitorsOnEnter = List.reverse schema.expressionVisitorsOnEnter
, expressionVisitorsOnExit = schema.expressionVisitorsOnExit , expressionVisitorsOnExit = schema.expressionVisitorsOnExit
, letDeclarationVisitorsOnEnter = List.reverse schema.letDeclarationVisitorsOnEnter , letDeclarationVisitorsOnEnter = List.reverse schema.letDeclarationVisitorsOnEnter
@ -1331,10 +1339,6 @@ fromModuleRuleSchemaToRunnableModuleVisitor (ModuleRuleSchema schema) =
, caseBranchVisitorsOnEnter = List.reverse schema.caseBranchVisitorsOnEnter , caseBranchVisitorsOnEnter = List.reverse schema.caseBranchVisitorsOnEnter
, caseBranchVisitorsOnExit = schema.caseBranchVisitorsOnExit , caseBranchVisitorsOnExit = schema.caseBranchVisitorsOnExit
} }
)
else
\_ errorsAndContext -> errorsAndContext
in in
{ moduleDefinitionVisitors = List.reverse schema.moduleDefinitionVisitors { moduleDefinitionVisitors = List.reverse schema.moduleDefinitionVisitors
, commentsVisitors = List.reverse schema.commentsVisitors , commentsVisitors = List.reverse schema.commentsVisitors