mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +01:00
parent
8b9dc9392b
commit
d06ffc2289
1 changed files with 7 additions and 5 deletions
|
@ -520,11 +520,13 @@ pub fn parse_one_declaration(id: PropertyId,
|
|||
extra_data: ParserContextExtraData)
|
||||
-> Result<Vec<(PropertyDeclaration, Importance)>, ()> {
|
||||
let context = ParserContext::new_with_extra_data(Origin::Author, base_url, error_reporter, extra_data);
|
||||
let mut results = vec![];
|
||||
match PropertyDeclaration::parse(id, &context, &mut Parser::new(input), &mut results, false) {
|
||||
PropertyDeclarationParseResult::ValidOrIgnoredDeclaration => Ok(results),
|
||||
_ => Err(())
|
||||
}
|
||||
Parser::new(input).parse_entirely(|parser| {
|
||||
let mut results = vec![];
|
||||
match PropertyDeclaration::parse(id, &context, parser, &mut results, false) {
|
||||
PropertyDeclarationParseResult::ValidOrIgnoredDeclaration => Ok(results),
|
||||
_ => Err(())
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
/// A struct to parse property declarations.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue