handle empty bracketed lists

This commit is contained in:
ConnorSkees 2020-03-23 23:19:13 -04:00
parent c1ee84b6fc
commit 430747d06b

View File

@ -278,6 +278,12 @@ impl Value {
parse_quoted_string(toks, scope, &q, super_selector)
}
TokenKind::Symbol(Symbol::OpenSquareBrace) => {
if let Some(tok) = toks.peek() {
if tok.is_symbol(Symbol::CloseSquareBrace) {
toks.next();
return Ok(Value::List(Vec::new(), ListSeparator::Space, Brackets::Bracketed));
}
}
let inner = Self::from_tokens(toks, scope, super_selector)?;
devour_whitespace_or_comment(toks);
toks.next();