diff options
author | bnewbold <bnewbold@robocracy.org> | 2016-12-17 18:34:47 -0800 |
---|---|---|
committer | bnewbold <bnewbold@robocracy.org> | 2016-12-17 18:34:47 -0800 |
commit | 9f82aceb9fbdb42f332d68f4a423123bd0788b2c (patch) | |
tree | c082b9795be8e9e9d286c8f8f1345d22f3ec1b59 /src/transpile_js.rs | |
parent | f6364ebcac0d0a88a3cc6812fd2120c97b42cc26 (diff) | |
download | modelthing-9f82aceb9fbdb42f332d68f4a423123bd0788b2c.tar.gz modelthing-9f82aceb9fbdb42f332d68f4a423123bd0788b2c.zip |
refactor modelica parser into separate crate
Diffstat (limited to 'src/transpile_js.rs')
-rw-r--r-- | src/transpile_js.rs | 6 |
1 files changed, 4 insertions, 2 deletions
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<String, String>; @@ -43,7 +45,7 @@ impl TranspileJS for ModelicaModel { impl TranspileJS for Expr { fn repr_js(&self) -> Result<String, String> { - use modelica_ast::Expr::*; + use modelica_parser::ast::Expr::*; match *self { Integer(e) => Ok(format!("{}", e)), Float(e) => Ok(format!("{}", e)), |