diff options
author | bnewbold <bnewbold@robocracy.org> | 2016-12-19 09:21:35 +0000 |
---|---|---|
committer | bnewbold <bnewbold@robocracy.org> | 2016-12-19 09:21:35 +0000 |
commit | 0adbd20ff8b4d4f8156ee941d3d0b17e80c3a80f (patch) | |
tree | e8c30003fb45b95e32d3981adc12181096587fe1 /src/modelica_model.rs | |
parent | d60554fce09f8be1bb4d96a83db49577dfbf550d (diff) | |
download | modelthing-0adbd20ff8b4d4f8156ee941d3d0b17e80c3a80f.tar.gz modelthing-0adbd20ff8b4d4f8156ee941d3d0b17e80c3a80f.zip |
tweaks to work with modelica-parser-lalrpop
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 bcc00b1..36c5a2e 100644 --- a/src/modelica_model.rs +++ b/src/modelica_model.rs @@ -133,10 +133,10 @@ impl ModelicaModelExt for ModelicaModel { // TODO: sort output equations by LHS Ok(ModelicaModel{ name: self.name.clone(), + description: self.description.clone(), components: self.components.clone(), connections: vec![], equations: solved, - extends: vec![], }) } } @@ -186,10 +186,10 @@ impl SimpleEquationExt for SimpleEquation { use modelica_parser::ast::BinOperator::*; match self.lhs { Ident(ref s) if s == ident => Ok((*self).clone()), - Ident(_) | Integer(_) | Float(_) => + Ident(_) | Integer(_) | Float(_) | Boolean(_) | StringLiteral(_) => Err("SymbolicError: InternalError: expected var on LHS".to_string()), - Der(_) | Abs(_) => - Err("SymbolicError: NaiveImplementation: can't simplify der() or abs()".to_string()), + Der(_) | MathUnaryExpr(_,_) | Sign(_) | Array(_) => + Err("SymbolicError: NaiveImplementation: can't simplify".to_string()), // TODO: create a macro for the below... BinExpr(Multiply, ref a, ref b) if a.contains(ident) => { SimpleEquation{ |