Ajout : module parser
This commit is contained in:
parent
ad5e96782a
commit
056d56b348
1 changed files with 11 additions and 0 deletions
11
src/parser.rs
Normal file
11
src/parser.rs
Normal file
|
@ -0,0 +1,11 @@
|
|||
use crate::command::{CommandSequence, UnixProgram};
|
||||
|
||||
pub fn parse_command_line(line: String) -> CommandSequence {
|
||||
let /*mut*/ command_sequence = CommandSequence::new();
|
||||
|
||||
let argv = line.split_whitespace().map(|s| s.to_string()).collect();
|
||||
let _command = UnixProgram::new().argv(argv);
|
||||
// command_sequence.add(command);
|
||||
|
||||
command_sequence
|
||||
}
|
Loading…
Reference in a new issue