handle ! at toplevel
This commit is contained in:
parent
c1ed4b3121
commit
28d5fdf636
@ -295,7 +295,7 @@ impl<'a> StyleSheetParser<'a> {
|
|||||||
c if c.is_control() => {
|
c if c.is_control() => {
|
||||||
return Err(("expected selector.", self.lexer.next().unwrap().pos()).into());
|
return Err(("expected selector.", self.lexer.next().unwrap().pos()).into());
|
||||||
}
|
}
|
||||||
',' => {
|
',' | '!' => {
|
||||||
return Err(("expected \"{\".", self.lexer.next().unwrap().pos()).into());
|
return Err(("expected \"{\".", self.lexer.next().unwrap().pos()).into());
|
||||||
}
|
}
|
||||||
_ => todo!("unexpected toplevel token: {:?}", kind),
|
_ => todo!("unexpected toplevel token: {:?}", kind),
|
||||||
|
@ -86,3 +86,7 @@ error!(
|
|||||||
toplevel_comma,
|
toplevel_comma,
|
||||||
"a {},", "Error: expected \"{\"."
|
"a {},", "Error: expected \"{\"."
|
||||||
);
|
);
|
||||||
|
error!(
|
||||||
|
toplevel_exclamation,
|
||||||
|
"! {}", "Error: expected \"{\"."
|
||||||
|
);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user