Store args of tree pseudo-elements as Atom.

This commit is contained in:
Xidorn Quan 2017-10-20 14:08:31 +11:00
parent 89c1892b30
commit a2182f8dc3
3 changed files with 20 additions and 20 deletions

View file

@ -392,7 +392,7 @@ impl<'a, 'i> ::selectors::Parser<'i> for SelectorParser<'a> {
loop {
let location = parser.current_source_location();
match parser.next() {
Ok(&Token::Ident(ref ident)) => args.push(ident.as_ref().to_owned()),
Ok(&Token::Ident(ref ident)) => args.push(Atom::from(ident.as_ref())),
Ok(&Token::Comma) => {},
Ok(t) => return Err(location.new_unexpected_token_error(t.clone())),
Err(BasicParseError { kind: BasicParseErrorKind::EndOfInput, .. }) => break,