Thread ParseError return values through CSS parsing.

This commit is contained in:
Josh Matthews 2017-04-28 00:35:22 -04:00
parent 58e39bfffa
commit 27ae1ef2e7
121 changed files with 2133 additions and 1505 deletions

View file

@ -6,6 +6,7 @@
use cssparser::Parser;
use parser::{Parse, ParserContext};
use style_traits::ParseError;
use values::generics::gecko::ScrollSnapPoint as GenericScrollSnapPoint;
use values::specified::length::LengthOrPercentage;
@ -13,7 +14,7 @@ use values::specified::length::LengthOrPercentage;
pub type ScrollSnapPoint = GenericScrollSnapPoint<LengthOrPercentage>;
impl Parse for ScrollSnapPoint {
fn parse(context: &ParserContext, input: &mut Parser) -> Result<Self, ()> {
fn parse<'i, 't>(context: &ParserContext, input: &mut Parser<'i, 't>) -> Result<Self, ParseError<'i>> {
if input.try(|i| i.expect_ident_matching("none")).is_ok() {
return Ok(GenericScrollSnapPoint::None);
}