use super::vendor_attribute;
use super::vendor_attribute::Attribute;
pub fn parse(line: &str) -> Option<Vec<Attribute>> {
let mut args = line.split_whitespace().into_iter();
let mut output = Vec::<Attribute>::new();
loop {
match args.next() {
None => return Some(output),
Some(key) => match args.next() {
None => return None, Some(value) => {
match key {
"-v" => { match vendor_attribute::parse(value) {
Ok(attr) => output.push(attr),
Err(_) => (), } },
_ => continue, }
},
},
}
}
}