add test for malformed bracketed list missing closing brace
This commit is contained in:
parent
0d7208ccf0
commit
c89013d607
@ -455,9 +455,7 @@ impl<'a> Parser<'a> {
|
||||
|
||||
span = span.merge(inner.span);
|
||||
|
||||
if !matches!(self.toks.next(), Some(Token { kind: ']', .. })) {
|
||||
return Err(("expected \"]\".", span).into());
|
||||
}
|
||||
self.expect_char(']')?;
|
||||
|
||||
IntermediateValue::Value(HigherIntermediateValue::Literal(match inner.node {
|
||||
Value::List(els, sep, Brackets::None) => Value::List(els, sep, Brackets::Bracketed),
|
||||
|
@ -251,3 +251,7 @@ error!(
|
||||
nothing_after_escape_inside_brackets,
|
||||
"a { color: [\\", "Error: Expected expression."
|
||||
);
|
||||
error!(
|
||||
unclosed_bracketed_list,
|
||||
"a { color: [a", "Error: expected \"]\"."
|
||||
);
|
||||
|
Loading…
x
Reference in New Issue
Block a user