handle ` at toplevel

This commit is contained in:
ConnorSkees 2020-05-21 01:04:11 -04:00
parent 28d5fdf636
commit a63e139cd8
2 changed files with 7 additions and 0 deletions

View File

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

View File

@ -90,3 +90,7 @@ error!(
toplevel_exclamation,
"! {}", "Error: expected \"{\"."
);
error!(
toplevel_backtick,
"` {}", "Error: expected selector."
);