This commit is contained in:
Lukas Wirth 2021-08-07 22:16:15 +02:00
parent 80f522091a
commit c4a119f433
8 changed files with 39 additions and 27 deletions

View file

@ -48,7 +48,7 @@ impl ast::Expr {
}
/// Preorder walk all the expression's child expressions preserving events.
/// If the callback returns true the subtree of the expression will be skipped.
/// If the callback returns true on an [`WalkEvent::Enter`], the subtree of the expression will be skipped.
/// Note that the subtree may already be skipped due to the context analysis this function does.
pub fn preorder(&self, cb: &mut dyn FnMut(WalkEvent<ast::Expr>) -> bool) {
let mut preorder = self.syntax().preorder();