Skip to content

Commit 5ee20b0

Browse files
committed
Make Visitor/Visitable trait for mutable.
Signed-off-by: James Goppert <james.goppert@gmail.com>
1 parent 2ccc1b1 commit 5ee20b0

File tree

6 files changed

+736
-557
lines changed

6 files changed

+736
-557
lines changed

src/s2_analysis/mod.rs

+3
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
11
pub mod parser_helper;
22
pub mod print_visitor;
33
pub mod visitable;
4+
pub mod visitable_mut;
45
pub mod visitor;
6+
pub mod visitor_mut;
57

68
pub use parser_helper::parse_file;
79
pub use print_visitor::PrintVisitor;
810
pub use visitable::Visitable;
11+
pub use visitable_mut::VisitableMut;

src/s2_analysis/print_visitor.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ impl Default for PrintVisitor {
2121
}
2222
}
2323

24-
impl Visitor for PrintVisitor {
24+
impl Visitor<'_> for PrintVisitor {
2525
fn enter_any(&mut self) {
2626
self.level += 1;
2727
}

0 commit comments

Comments
 (0)