Fix regression: empty style should not be treated as an error

This commit is contained in:
ConnorSkees 2020-01-18 08:51:47 -05:00
parent e15c88a3c7
commit d1ea6d2dd6

View File

@ -492,7 +492,10 @@ pub(crate) fn eat_expr<I: Iterator<Item = Token>>(
toks.next(); toks.next();
devour_whitespace(toks); devour_whitespace(toks);
return Ok(Some(Expr::Style( return Ok(Some(Expr::Style(
Style::from_tokens(&values, scope).unwrap(), match Style::from_tokens(&values, scope) {
Ok(x) => x,
Err(_) => return Ok(None),
},
))); )));
} }
TokenKind::Symbol(Symbol::OpenCurlyBrace) => { TokenKind::Symbol(Symbol::OpenCurlyBrace) => {