Skip to content
This repository was archived by the owner on Feb 6, 2025. It is now read-only.

Commit a9136a8

Browse files
committed
Enhance the documentation of visitors.
1 parent 2fcce27 commit a9136a8

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

Diff for: src/visitor.rs

+4-1
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,13 @@
1313
use syntax;
1414

1515
/// Visit strategy after having visited an AST node.
16+
///
17+
/// Some AST nodes have *children* – in enum’s variants, in some fields as nested in `Vec<_>`, etc.
18+
/// Those nodes can be visited depending on the strategy you chose.
1619
#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
1720
pub enum Visit {
1821
/// The visitor will go deeper in the AST by visiting all the children, if any. If no children are
19-
/// present are if having children doesn’t make sense for a specific part of the AST, this
22+
/// present or if having children doesn’t make sense for a specific part of the AST, this
2023
/// strategy will be ignored.
2124
Children,
2225
/// The visitor won’t visit children nor siblings and will go up.

0 commit comments

Comments
 (0)