handle ( and ) at toplevel
This commit is contained in:
parent
5137353cb4
commit
90f7023896
@ -334,9 +334,12 @@ 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());
|
||||
}
|
||||
'{' => {
|
||||
return Err(("expected \"}\".", self.lexer.next().unwrap().pos).into());
|
||||
}
|
||||
'`' | '\'' | '"' => {
|
||||
return Err(("expected selector.", self.lexer.next().unwrap().pos).into());
|
||||
}
|
||||
|
@ -87,7 +87,15 @@ error!(toplevel_exclamation, "! {}", "Error: expected \"{\".");
|
||||
error!(toplevel_backtick, "` {}", "Error: expected selector.");
|
||||
error!(
|
||||
toplevel_open_curly_brace,
|
||||
"{ {color: red;}", "Error: expected \"{\"."
|
||||
"{ {color: red;}", "Error: expected \"}\"."
|
||||
);
|
||||
error!(
|
||||
toplevel_open_paren,
|
||||
"(", "Error: expected \"{\"."
|
||||
);
|
||||
error!(
|
||||
toplevel_close_paren,
|
||||
"(", "Error: expected \"{\"."
|
||||
);
|
||||
error!(
|
||||
backtick_in_value,
|
||||
|
Loading…
x
Reference in New Issue
Block a user