[−][src]Function azul_css_parser::parse_css_path
pub fn parse_css_path<'a>(
input: &'a str
) -> Result<CssPath, CssPathParseError<'a>>
Parses a CSS path from a string (only the path,.no commas allowed)
assert_eq!( parse_css_path("* div #my_id > .class:nth-child(2)"), Ok(CssPath { selectors: vec![ Global, Type(Div), Children, Id("my_id".to_string()), DirectChildren, Class("class".to_string()), PseudoSelector(NthChild(Number(2))), ]}) );