1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
use super::*;
pub(crate) mod list_position;
pub(crate) mod list_type;
#[derive(Copy, Clone, Debug)]
pub struct TailwindList {}
impl TailwindList {
pub fn parse(str: &[&str], arbitrary: &TailwindArbitrary) -> Result<Box<dyn TailwindInstance>> {
let out = match str {
[s @ ("none" | "disc" | "decimal")] => TailwindListStyle::from(*s).boxed(),
["type", rest @ ..] => TailwindListStyle::parse(rest, arbitrary)?.boxed(),
[s @ ("inside" | "outside")] => TailwindListPosition::from(*s).boxed(),
["position", rest @ ..] => TailwindListPosition::parse(rest, arbitrary)?.boxed(),
[] => TailwindListStyle::parse_arbitrary(arbitrary)?.boxed(),
_ => return syntax_error!("Unknown list instructions: {}", str.join("-")),
};
Ok(out)
}
}