From 9f82aceb9fbdb42f332d68f4a423123bd0788b2c Mon Sep 17 00:00:00 2001 From: bnewbold Date: Sat, 17 Dec 2016 18:34:47 -0800 Subject: refactor modelica parser into separate crate --- src/transpile_js.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/transpile_js.rs') diff --git a/src/transpile_js.rs b/src/transpile_js.rs index 7c8932f..7a2132f 100644 --- a/src/transpile_js.rs +++ b/src/transpile_js.rs @@ -1,5 +1,7 @@ -use modelica_ast::*; +extern crate modelica_parser; + +use self::modelica_parser::ast::*; pub trait TranspileJS { fn repr_js(&self) -> Result; @@ -43,7 +45,7 @@ impl TranspileJS for ModelicaModel { impl TranspileJS for Expr { fn repr_js(&self) -> Result { - use modelica_ast::Expr::*; + use modelica_parser::ast::Expr::*; match *self { Integer(e) => Ok(format!("{}", e)), Float(e) => Ok(format!("{}", e)), -- cgit v1.2.3