mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
CSS parsing error types: flatten nested enums more still
This commit is contained in:
parent
1a041084ce
commit
c36ac69d48
6 changed files with 49 additions and 88 deletions
|
@ -1079,9 +1079,9 @@ impl<'a, 'b, 'i> DeclarationParser<'i> for PropertyDeclarationParser<'a, 'b> {
|
|||
Ok(id) => id,
|
||||
Err(()) => {
|
||||
return Err(input.new_custom_error(if is_non_mozilla_vendor_identifier(&name) {
|
||||
PropertyDeclarationParseErrorKind::UnknownVendorProperty
|
||||
StyleParseErrorKind::UnknownVendorProperty
|
||||
} else {
|
||||
PropertyDeclarationParseErrorKind::UnknownProperty(name)
|
||||
StyleParseErrorKind::UnknownProperty(name)
|
||||
}));
|
||||
}
|
||||
};
|
||||
|
@ -1125,9 +1125,7 @@ pub fn parse_property_declaration_list<R>(context: &ParserContext,
|
|||
|
||||
// If the unrecognized property looks like a vendor-specific property,
|
||||
// silently ignore it instead of polluting the error output.
|
||||
if let ParseErrorKind::Custom(
|
||||
StyleParseErrorKind::PropertyDeclaration(
|
||||
PropertyDeclarationParseErrorKind::UnknownVendorProperty)) = error.kind {
|
||||
if let ParseErrorKind::Custom(StyleParseErrorKind::UnknownVendorProperty) = error.kind {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue