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));
|
return Ok(Value::List(Vec::new(), ListSeparator::Space));
|
||||||
}
|
}
|
||||||
let val = Self::from_tokens(toks, scope, super_selector)?;
|
let val = Self::from_tokens(toks, scope, super_selector)?;
|
||||||
assert_eq!(
|
let next = toks.next();
|
||||||
toks.next().unwrap().kind,
|
if next.is_none() || !next.unwrap().is_symbol(Symbol::CloseParen) {
|
||||||
TokenKind::Symbol(Symbol::CloseParen)
|
return Err("expected \")\".".into());
|
||||||
);
|
}
|
||||||
Ok(Value::Paren(Box::new(val)))
|
Ok(Value::Paren(Box::new(val)))
|
||||||
}
|
}
|
||||||
TokenKind::Symbol(Symbol::BitAnd) => {
|
TokenKind::Symbol(Symbol::BitAnd) => {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user