diff options
author | bnewbold <bnewbold@robocracy.org> | 2016-12-26 00:08:37 -0800 |
---|---|---|
committer | bnewbold <bnewbold@robocracy.org> | 2016-12-26 00:08:37 -0800 |
commit | 9cf287fef8e614f57d0d52d579d6721ba54683f4 (patch) | |
tree | ceda8550fd28770d24a1ab37f5de1bee1f71959a /src/modelica_model.rs | |
parent | 957c2f75ceccfab3d8a8e546961db5f053876689 (diff) | |
download | modelthing-9cf287fef8e614f57d0d52d579d6721ba54683f4.tar.gz modelthing-9cf287fef8e614f57d0d52d579d6721ba54683f4.zip |
updates for new modelica-parser-lalrpop hierarchy
Diffstat (limited to 'src/modelica_model.rs')
-rw-r--r-- | src/modelica_model.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/modelica_model.rs b/src/modelica_model.rs index 7b77123..b0bc825 100644 --- a/src/modelica_model.rs +++ b/src/modelica_model.rs @@ -5,7 +5,7 @@ use std::clone::Clone; use std::collections::HashMap; use std::collections::HashSet; -use self::modelica_parser::ast::*; +use self::modelica_parser::*; /// / Helpers @@ -170,7 +170,7 @@ impl ModelicaModelExt for ModelicaModel { // Recurses through 'original', replacing all instances of 'a' with 'b' fn substitute_with(original: &Expr, a: &Expr, b: &Expr) -> Expr { - use modelica_parser::ast::Expr::*; + use modelica_parser::Expr::*; println!("original: {:?} replacing: {:?} with: {:?}", original, a, b); if *original == *a { return b.clone(); @@ -234,8 +234,8 @@ impl SimpleEquationExt for SimpleEquation { } fn simplify_lhs(&self, ident: &str) -> Result<SimpleEquation, String> { - use modelica_parser::ast::Expr::*; - use modelica_parser::ast::BinOperator::*; + use modelica_parser::Expr::*; + use modelica_parser::BinOperator::*; match self.lhs { Ident(ref s) if s == ident => Ok((*self).clone()), Ident(_) | Integer(_) | Float(_) | Boolean(_) | StringLiteral(_) => { |