diff options
author | bnewbold <bnewbold@robocracy.org> | 2016-12-26 01:13:20 -0800 |
---|---|---|
committer | bnewbold <bnewbold@robocracy.org> | 2016-12-26 01:13:20 -0800 |
commit | 7168804b8a555f1ecfb11d595c63384fda7a8f6f (patch) | |
tree | 087ffc13753034fdd695dd2c47c0207c13591d5c /src/transpile_js.rs | |
parent | 851d72cdd58a51adcf93bcd9a5956d82d3b5417d (diff) | |
download | modelthing-7168804b8a555f1ecfb11d595c63384fda7a8f6f.tar.gz modelthing-7168804b8a555f1ecfb11d595c63384fda7a8f6f.zip |
updates for parser HashSet stuff
Diffstat (limited to 'src/transpile_js.rs')
-rw-r--r-- | src/transpile_js.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/transpile_js.rs b/src/transpile_js.rs index b14b964..5ca16e6 100644 --- a/src/transpile_js.rs +++ b/src/transpile_js.rs @@ -27,13 +27,14 @@ impl TranspileJS for ModelicaModel { .to_string()); } } + let args: Vec<String> = self.get_free_vars().iter().map(|s| s.clone()).collect(); Ok(format!(r#"function {slug}({args}) {{ {constants} {binds} return [{outputs}]; }}"#, slug = "f", - args = self.get_free_vars().join(", "), + args = args.join(", "), constants = constants.join("\n "), binds = binds.join("\n "), outputs = outputs.join(", "))) |