Make PropertyDeclaration::parse return an enum rather than push to a Vec.

This commit is contained in:
Simon Sapin 2017-03-07 17:12:37 +01:00
parent 8160490272
commit 9d663ea7af
6 changed files with 83 additions and 113 deletions

View file

@ -211,13 +211,8 @@ impl Declaration {
return false
};
let mut input = Parser::new(&self.val);
let mut list = Vec::new();
let res = PropertyDeclaration::parse(id, cx, &mut input,
&mut list, /* in_keyframe */ false);
let res = PropertyDeclaration::parse(id, cx, &mut input, /* in_keyframe */ false);
let _ = input.try(parse_important);
if !input.is_exhausted() {
return false;
}
res.is_ok()
res.is_ok() && input.is_exhausted()
}
}