lewp_css/domain/at_rules/font_face/font_style.rs
1// This file is part of css. It is subject to the license terms in the COPYRIGHT file found in the top-level directory of this distribution and at https://raw.githubusercontent.com/lemonrock/css/master/COPYRIGHT. No part of predicator, including this file, may be copied, modified, propagated, or distributed except according to the terms contained in the COPYRIGHT file.
2// Copyright © 2017 The developers of css. See the COPYRIGHT file in the top-level directory of this distribution and at https://raw.githubusercontent.com/lemonrock/css/master/COPYRIGHT.
3
4use {
5 crate::{
6 define_css_keyword_enum,
7 parsers::{Parse, ParserContext},
8 CustomParseError,
9 },
10 cssparser::{ParseError, Parser},
11};
12
13define_css_keyword_enum! {
14 FontStyle:
15 "normal" => normal,
16 "italic" => italic,
17 "oblique" => oblique,
18}
19
20impl Parse for FontStyle {
21 fn parse<'i, 't>(
22 _: &ParserContext,
23 input: &mut Parser<'i, 't>,
24 ) -> Result<Self, ParseError<'i, CustomParseError<'i>>> {
25 FontStyle::parse(input)
26 }
27}