handle , at toplevel

This commit is contained in:
ConnorSkees 2020-05-21 00:46:06 -04:00
parent 2faf9fcb60
commit c1ed4b3121
2 changed files with 7 additions and 0 deletions

View File

@ -295,6 +295,9 @@ impl<'a> StyleSheetParser<'a> {
c if c.is_control() => {
return Err(("expected selector.", self.lexer.next().unwrap().pos()).into());
}
',' => {
return Err(("expected \"{\".", self.lexer.next().unwrap().pos()).into());
}
_ => todo!("unexpected toplevel token: {:?}", kind),
};
}

View File

@ -82,3 +82,7 @@ error!(
nothing_after_variable_in_style,
"a {$a", "Error: expected \":\"."
);
error!(
toplevel_comma,
"a {},", "Error: expected \"{\"."
);