aboutsummaryrefslogtreecommitdiffstats
path: root/modelica-parser-lalrpop/src/ast.rs
diff options
context:
space:
mode:
Diffstat (limited to 'modelica-parser-lalrpop/src/ast.rs')
-rw-r--r--modelica-parser-lalrpop/src/ast.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/modelica-parser-lalrpop/src/ast.rs b/modelica-parser-lalrpop/src/ast.rs
index 041491a..12b1503 100644
--- a/modelica-parser-lalrpop/src/ast.rs
+++ b/modelica-parser-lalrpop/src/ast.rs
@@ -133,11 +133,11 @@ impl ModelicaModel {
pub fn get_constant_vars(&self) -> HashMap<String,Option<Expr>> {
let mut binds = HashMap::new();
- // XXX: actually implement this...
for c in &self.components {
match c.prefix {
- Some(ComponentPrefix::Constant) => { binds.insert(c.name.clone(), Some(Expr::Integer(123))); },
- Some(ComponentPrefix::Parameter) => { binds.insert(c.name.clone(), Some(Expr::Float(4.56))); },
+ Some(ComponentPrefix::Constant) | Some(ComponentPrefix::Parameter)=> {
+ binds.insert(c.name.clone(), c.value.clone());
+ },
_ => (),
}
}