File tree Expand file tree Collapse file tree
crates/quickmark-core/src Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -33,10 +33,14 @@ impl<'a> TreeSitterWalker<'a> {
3333 }
3434
3535 #[ allow( clippy:: only_used_in_recursion) ]
36- fn walk_pre_order ( & self , cursor : & mut tree_sitter:: TreeCursor , callback : & mut impl FnMut ( Node ) ) {
36+ fn walk_pre_order (
37+ & self ,
38+ cursor : & mut tree_sitter:: TreeCursor ,
39+ callback : & mut impl FnMut ( Node ) ,
40+ ) {
3741 let node = cursor. node ( ) ;
3842 callback ( node) ;
39-
43+
4044 if cursor. goto_first_child ( ) {
4145 loop {
4246 self . walk_pre_order ( cursor, callback) ;
@@ -47,9 +51,13 @@ impl<'a> TreeSitterWalker<'a> {
4751 cursor. goto_parent ( ) ;
4852 }
4953 }
50-
54+
5155 #[ allow( clippy:: only_used_in_recursion) ]
52- fn walk_post_order ( & self , cursor : & mut tree_sitter:: TreeCursor , callback : & mut impl FnMut ( Node ) ) {
56+ fn walk_post_order (
57+ & self ,
58+ cursor : & mut tree_sitter:: TreeCursor ,
59+ callback : & mut impl FnMut ( Node ) ,
60+ ) {
5361 if cursor. goto_first_child ( ) {
5462 loop {
5563 self . walk_post_order ( cursor, callback) ;
@@ -59,7 +67,7 @@ impl<'a> TreeSitterWalker<'a> {
5967 }
6068 cursor. goto_parent ( ) ;
6169 }
62-
70+
6371 let node = cursor. node ( ) ;
6472 callback ( node) ;
6573 }
You can’t perform that action at this time.
0 commit comments