aboutsummaryrefslogtreecommitdiffstats
path: root/src/bin
diff options
context:
space:
mode:
authorbnewbold <bnewbold@robocracy.org>2017-01-16 14:41:46 -0800
committerbnewbold <bnewbold@robocracy.org>2017-01-16 14:41:46 -0800
commit90d533e03132bab1032adde78fae3c10903d05cc (patch)
treeeb314df5ae162fd8b91efaf6b95c78dc3f3e8543 /src/bin
parent12eb30845811e2b597efb66001da382a74f9f806 (diff)
downloadmodelthing-90d533e03132bab1032adde78fae3c10903d05cc.tar.gz
modelthing-90d533e03132bab1032adde78fae3c10903d05cc.zip
refactor repr/transpile names
Diffstat (limited to 'src/bin')
-rw-r--r--src/bin/mt-tool.rs4
-rw-r--r--src/bin/mt-webface.rs6
2 files changed, 5 insertions, 5 deletions
diff --git a/src/bin/mt-tool.rs b/src/bin/mt-tool.rs
index e554636..f45c739 100644
--- a/src/bin/mt-tool.rs
+++ b/src/bin/mt-tool.rs
@@ -76,12 +76,12 @@ fn run() -> Result<()> {
("transpile_scheme", Some(subm)) => {
let dir = Path::new(subm.value_of("DIR").unwrap());
let me = try!(modelthing::load_model_entry(dir));
- println!("{}", try!(me.ast.repr_scheme()));
+ println!("{}", try!(me.ast.transpile_scheme()));
},
("transpile_js", Some(subm)) => {
let dir = Path::new(subm.value_of("DIR").unwrap());
let me = try!(modelthing::load_model_entry(dir));
- println!("{}", try!(me.ast.repr_js()));
+ println!("{}", try!(me.ast.transpile_js()));
},
("list", Some(subm)) => {
let dir = Path::new(subm.value_of("DIR").unwrap_or("examples"));
diff --git a/src/bin/mt-webface.rs b/src/bin/mt-webface.rs
index ed0cacb..b9e3cad 100644
--- a/src/bin/mt-webface.rs
+++ b/src/bin/mt-webface.rs
@@ -21,7 +21,7 @@ use pencil::method::{Get, Post};
use regex::Regex;
use modelthing::transpile_scheme::TranspileScheme;
use modelthing::transpile_js::TranspileJS;
-use modelthing::transpile_latex::TranspileLaTeX;
+use modelthing::repr_latex::ReprLaTeX;
/*
This command doesn't use error_chain (or raise errors in general) because the
@@ -108,8 +108,8 @@ fn model_repr(r: &mut Request) -> PencilResult {
match modelthing::load_model_entry(model_path.as_path()) {
Ok(me) => {
match format {
- "scheme" => Ok(Response::from(me.ast.repr_scheme().unwrap())),
- "javascript" => Ok(Response::from(me.ast.repr_js().unwrap())),
+ "scheme" => Ok(Response::from(me.ast.transpile_scheme().unwrap())),
+ "javascript" => Ok(Response::from(me.ast.transpile_js().unwrap())),
"latex" => Ok(Response::from(me.ast.repr_latex().unwrap())),
_ => abort(403),
}