debut de parsing

This commit is contained in:
2026-07-07 19:06:36 +02:00
parent 39abaca4e0
commit 4b7c4a4a73

View File

@@ -1,4 +1,20 @@
// recupere les arguments passes en entree de l'appel du programme et les place dans un vecteurs de chaine
pub fn arguments(){
}
pub fn arguments(args_to_process: Vec<String>) {
// trouver les operateurs et separer les membres de l'expression
for argument in args_to_process {}
}
fn find_operator(argument: String) -> Vec<String> {
let mut args_with_operator = Vec::new();
let string = Vec::new();
for character in argument {
match character {
"+" => args_with_operator.push(string.to_string()),
"-" => args_with_operator.push(string.to_string()),
"*" => args_with_operator.push(string.to_string()),
"/" => args_with_operator.push(string.to_string()),
_ => string.push(character),
}
}
args_with_operator
}