mirror of
https://github.com/jfmengels/elm-review.git
synced 2024-08-17 12:00:29 +03:00
Clarify documentation on declaration visitor order (#111)
This commit is contained in:
parent
48b3500412
commit
720f381ee8
@ -166,9 +166,10 @@ The traversal of a module rule is the following:
|
||||
- The module's list of comments, visited by [`withSimpleCommentsVisitor`](#withSimpleCommentsVisitor) and [`withCommentsVisitor`](#withCommentsVisitor)
|
||||
- Each import, visited by [`withSimpleImportVisitor`](#withSimpleImportVisitor) and [`withImportVisitor`](#withImportVisitor)
|
||||
- The list of declarations, visited by [`withDeclarationListVisitor`](#withDeclarationListVisitor)
|
||||
- Each declaration, visited by [`withSimpleDeclarationVisitor`](#withSimpleDeclarationVisitor), [`withDeclarationEnterVisitor`](#withDeclarationEnterVisitor) and [`withDeclarationExitVisitor`](#withDeclarationExitVisitor).
|
||||
Before evaluating the next declaration, the expression contained in the declaration
|
||||
will be visited recursively by [`withSimpleExpressionVisitor`](#withSimpleExpressionVisitor), [`withExpressionEnterVisitor`](#withExpressionEnterVisitor) and [`withExpressionExitVisitor`](#withExpressionExitVisitor)
|
||||
- Each declaration, visited in the following order:
|
||||
- [`withSimpleDeclarationVisitor`](#withSimpleDeclarationVisitor) and [`withDeclarationEnterVisitor`](#withDeclarationEnterVisitor)
|
||||
- The expression contained in the declaration will be visited recursively by [`withSimpleExpressionVisitor`](#withSimpleExpressionVisitor), [`withExpressionEnterVisitor`](#withExpressionEnterVisitor) and [`withExpressionExitVisitor`](#withExpressionExitVisitor).
|
||||
- [`withDeclarationExitVisitor`](#withDeclarationExitVisitor).
|
||||
- A final evaluation is made when the module has fully been visited, using [`withFinalModuleEvaluation`](#withFinalModuleEvaluation)
|
||||
|
||||
Evaluating/visiting a node means two things:
|
||||
|
Loading…
Reference in New Issue
Block a user