From 7183b1afb71bc43546e336469ce2c2d16c4a25e5 Mon Sep 17 00:00:00 2001 From: bnewbold Date: Tue, 29 Nov 2016 20:50:25 -0800 Subject: small code cleanups --- src/lib.rs | 2 -- src/modelica_parser.lalrpop | 4 ++-- src/modelica_parser.rs | 10 +++++----- 3 files changed, 7 insertions(+), 9 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index 508eeec..c733dc7 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -26,7 +26,6 @@ pub enum ModelVarType { Independent, Dependent, Constant, - // XXX: Time, State, Parameter, @@ -48,7 +47,6 @@ pub struct ModelEntry { pub markdown: String, } -// TODO: this pub fn parse_metadata(raw: String) -> Result { let root = toml::Parser::new(&raw).parse().unwrap(); let model = root.get("model").unwrap().as_table().unwrap(); diff --git a/src/modelica_parser.lalrpop b/src/modelica_parser.lalrpop index 6a1ceaf..f5d7958 100644 --- a/src/modelica_parser.lalrpop +++ b/src/modelica_parser.lalrpop @@ -1,6 +1,6 @@ use std::str::FromStr; -// XXX: use modelica_ast::{ModelicaModel, Component, ComponentPrefix, Connection, SimpleEquation, Bin}; -use modelica_ast::*; +use modelica_ast::{ModelicaModel,Component, ComponentPrefix, Connection, + SimpleEquation, Expr, BinOperator}; // This is an incomplete, non-standards-compliant, minimum-viable parser diff --git a/src/modelica_parser.rs b/src/modelica_parser.rs index 91e158b..d4aaf54 100644 --- a/src/modelica_parser.rs +++ b/src/modelica_parser.rs @@ -1,12 +1,12 @@ use std::str::FromStr; -use modelica_ast::*; +use modelica_ast::{ModelicaModel, Component, ComponentPrefix, Connection, SimpleEquation, Expr, BinOperator}; extern crate lalrpop_util as __lalrpop_util; mod __parse__float { #![allow(non_snake_case, non_camel_case_types, unused_mut, unused_variables, unused_imports)] use std::str::FromStr; - use modelica_ast::*; + use modelica_ast::{ModelicaModel, Component, ComponentPrefix, Connection, SimpleEquation, Expr, BinOperator}; extern crate lalrpop_util as __lalrpop_util; #[allow(dead_code)] pub enum __Symbol<'input> { @@ -2024,7 +2024,7 @@ mod __parse__identifier { #![allow(non_snake_case, non_camel_case_types, unused_mut, unused_variables, unused_imports)] use std::str::FromStr; - use modelica_ast::*; + use modelica_ast::{ModelicaModel, Component, ComponentPrefix, Connection, SimpleEquation, Expr, BinOperator}; extern crate lalrpop_util as __lalrpop_util; #[allow(dead_code)] pub enum __Symbol<'input> { @@ -4042,7 +4042,7 @@ mod __parse__integer { #![allow(non_snake_case, non_camel_case_types, unused_mut, unused_variables, unused_imports)] use std::str::FromStr; - use modelica_ast::*; + use modelica_ast::{ModelicaModel, Component, ComponentPrefix, Connection, SimpleEquation, Expr, BinOperator}; extern crate lalrpop_util as __lalrpop_util; #[allow(dead_code)] pub enum __Symbol<'input> { @@ -6060,7 +6060,7 @@ mod __parse__model { #![allow(non_snake_case, non_camel_case_types, unused_mut, unused_variables, unused_imports)] use std::str::FromStr; - use modelica_ast::*; + use modelica_ast::{ModelicaModel, Component, ComponentPrefix, Connection, SimpleEquation, Expr, BinOperator}; extern crate lalrpop_util as __lalrpop_util; #[allow(dead_code)] pub enum __Symbol<'input> { -- cgit v1.2.3