Ajout : module parser

This commit is contained in:
Ahurac 2024-04-10 12:31:29 +02:00
parent ad5e96782a
commit 056d56b348

11
src/parser.rs Normal file
View 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
}