parser : ajout backslash

This commit is contained in:
Ahurac 2024-04-14 17:18:41 +02:00
parent ddcbf4d7ef
commit 066530d406

View file

@ -32,6 +32,9 @@ fn parse_main(characters: &mut Vec<char>, current_arg: &mut String) -> Vec<Strin
} else { } else {
parse_main(characters, current_arg) parse_main(characters, current_arg)
} }
} else if current_char == '\\' {
current_arg.push(characters.pop().unwrap());
parse_main(characters, current_arg)
} else if current_char == '\'' { } else if current_char == '\'' {
let mut argv = vec![parse_quote(characters).unwrap()]; let mut argv = vec![parse_quote(characters).unwrap()];
argv.append(&mut parse_main(characters, &mut String::default())); argv.append(&mut parse_main(characters, &mut String::default()));