Skip to content

Commit 62a231e

Browse files
authored
Merge pull request #1 from CogniPilot/pr-uuid
Add id to nodes.
2 parents 6c21442 + d201a83 commit 62a231e

16 files changed

+764
-2253
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.10.4"
5+
version = "0.11.0"
66
edition = "2021"
77
license = "Apache-2.0"
88

build.rs

+4
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,12 @@ use std::process::Command;
22

33
fn main() {
44
println!("cargo:rerun-if-changed=src/s0_lexer/lexer.rs");
5+
println!("cargo:rerun-if-changed=src/s0_lexer/mod.rs");
6+
println!("cargo:rerun-if-changed=src/s0_lexer/token.rs");
57
println!("cargo:rerun-if-changed=src/s1_parser/modelica.lalrpop");
68
println!("cargo:rerun-if-changed=src/s1_parser/ast.rs");
9+
println!("cargo:rerun-if-changed=src/s1_parser/mod.rs");
10+
println!("cargo:rerun-if-changed=src/s1_parser/parser_helper.rs");
711
lalrpop::process_root().unwrap();
812

913
// Attempt to retrieve the current Git version

src/lib.rs

+1-4
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,8 @@
11
pub mod s0_lexer;
22
pub mod s1_parser;
3-
pub mod s2_analysis;
43

54
#[macro_use]
65
extern crate macro_rules_attribute;
76

87
pub use s1_parser::ast;
9-
pub use s2_analysis::parser_helper::{parse, parse_file};
10-
pub use s2_analysis::print_visitor::PrintVisitor;
11-
pub use s2_analysis::{Node, NodeMutRef, NodeRef, Visitable, VisitableMut, Visitor, VisitorMut};
8+
pub use s1_parser::{parse, parse_file};

src/main.rs

+1-12
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,16 @@
11
use clap::Parser;
2-
use rumoca_parser::{PrintVisitor, Visitable};
32

43
#[derive(Parser, Debug)]
54
#[command(version, about = "Rumoca Modelica Parser", long_about = None)]
65
struct Args {
76
/// The model file to compile
87
#[arg(name = "MODELICA_FILE")]
98
model_file: String,
10-
11-
/// Verbose output
12-
#[arg(short, long, default_value_t = false)]
13-
verbose: bool,
149
}
1510

1611
fn main() -> Result<(), Box<dyn std::error::Error>> {
1712
let args = Args::parse();
1813
let def = rumoca_parser::parse_file(&args.model_file);
19-
20-
if args.verbose {
21-
println!("{:#?}", def);
22-
}
23-
24-
let mut visitor = PrintVisitor::default();
25-
def.accept(&mut visitor);
14+
println!("{:#?}", def);
2615
Ok(())
2716
}

0 commit comments

Comments
 (0)