Split arguments into a Vec
This commit is contained in:
parent
9e1f68801f
commit
d11d5ce755
|
@ -140,7 +140,11 @@ impl Program {
|
||||||
builder
|
builder
|
||||||
}
|
}
|
||||||
|
|
||||||
fn run_external(&mut self, filename: String) {
|
fn run_external(&mut self, arguments: String) {
|
||||||
|
let argument_vec: Vec<&str> = arguments.split("-").collect();
|
||||||
|
println!("{}", argument_vec.len());
|
||||||
|
let filename = argument_vec[0];
|
||||||
|
|
||||||
// Read contents of the provided file and construct a symbolic Program from it
|
// Read contents of the provided file and construct a symbolic Program from it
|
||||||
let contents = fs::read_to_string(filename).expect("Something went wrong reading the file");
|
let contents = fs::read_to_string(filename).expect("Something went wrong reading the file");
|
||||||
let mut prog = Program::from_string(contents);
|
let mut prog = Program::from_string(contents);
|
||||||
|
|
Loading…
Reference in New Issue