diff options
| author | Gustav Sörnäs <gustav@sornas.net> | 2021-03-10 17:59:52 +0100 |
|---|---|---|
| committer | Gustav Sörnäs <gustav@sornas.net> | 2021-03-10 17:59:52 +0100 |
| commit | f5a82d852abdb3b6b3bd342572ac5adee6affb7b (patch) | |
| tree | eb00a168a1416f6669b665e83ac9d6b88a8c6fa7 /src | |
| parent | e930f7b71ba526f40210f3e89afc79b2288e2e91 (diff) | |
| download | sylt-f5a82d852abdb3b6b3bd342572ac5adee6affb7b.tar.gz | |
remove run_string and rand
Diffstat (limited to 'src')
| -rw-r--r-- | src/lib.rs | 7 |
1 files changed, 0 insertions, 7 deletions
@@ -47,13 +47,6 @@ pub fn run_file(path: &Path, print: bool, functions: Vec<(String, RustFunction)> run(path, print, functions) } -pub fn run_string(source: &str, print: bool, functions: Vec<(String, RustFunction)>) -> Result<(), Vec<Error>> { - let mut path = std::env::temp_dir(); - path.push(format!("test_{}.sy", rand::random::<u32>())); - std::fs::write(path.clone(), source).expect("Failed to write source to temporary file"); - run(&path, print, functions) -} - fn run(path: &Path, print: bool, functions: Vec<(String, RustFunction)>) -> Result<(), Vec<Error>> { let sections = sectionizer::sectionize(path); match compiler::Compiler::new(sections).compile("main", path, &functions) { |
