add test for malformed bracketed list missing closing brace

This commit is contained in:
Connor Skees 2020-08-19 05:26:24 -04:00
parent 0d7208ccf0
commit c89013d607
2 changed files with 5 additions and 3 deletions

View File

@ -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),

View File

@ -251,3 +251,7 @@ error!(
nothing_after_escape_inside_brackets,
"a { color: [\\", "Error: Expected expression."
);
error!(
unclosed_bracketed_list,
"a { color: [a", "Error: expected \"]\"."
);