Skip to content

Commit 0e52618

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

9 files changed

+744
-561
lines changed

Cargo.lock

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
name = "rumoca_parser"
33
authors = ["James Goppert", "Benjamin Perseghetti"]
44
description = "A Modelica parser leveraging LALRPOP"
5-
version = "0.7.0"
5+
version = "0.8.0"
66
edition = "2021"
77
license = "Apache-2.0"
88

src/lib.rs

+4-2
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,7 @@ extern crate macro_rules_attribute;
88
pub use s1_parser::ast;
99
pub use s2_analysis::parser_helper::parse_file;
1010
pub use s2_analysis::print_visitor::PrintVisitor;
11-
pub use s2_analysis::visitable::Visitable;
12-
pub use s2_analysis::visitor::Visitor;
11+
pub use s2_analysis::Visitable;
12+
pub use s2_analysis::VisitableMut;
13+
pub use s2_analysis::Visitor;
14+
pub use s2_analysis::VisitorMut;

src/s2_analysis/mod.rs

+5
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,13 @@
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;
12+
pub use visitor::Visitor;
13+
pub use visitor_mut::VisitorMut;

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)