better error message for missing closing paren
This commit is contained in:
parent
f0c2522967
commit
1a481000b6
@ -196,10 +196,10 @@ impl Value {
|
||||
return Ok(Value::List(Vec::new(), ListSeparator::Space));
|
||||
}
|
||||
let val = Self::from_tokens(toks, scope, super_selector)?;
|
||||
assert_eq!(
|
||||
toks.next().unwrap().kind,
|
||||
TokenKind::Symbol(Symbol::CloseParen)
|
||||
);
|
||||
let next = toks.next();
|
||||
if next.is_none() || !next.unwrap().is_symbol(Symbol::CloseParen) {
|
||||
return Err("expected \")\".".into());
|
||||
}
|
||||
Ok(Value::Paren(Box::new(val)))
|
||||
}
|
||||
TokenKind::Symbol(Symbol::BitAnd) => {
|
||||
|
Loading…
x
Reference in New Issue
Block a user