Fix panic when exporting invalid types

And also still allow to export builtin component
This commit is contained in:
Olivier Goffart 2020-11-02 17:16:51 +01:00
parent f28d6f88c2
commit decbe0ade5
4 changed files with 78 additions and 45 deletions

View file

@ -597,7 +597,10 @@ fn parse_export(p: &mut impl Parser) -> bool {
p.consume();
return true;
}
SyntaxKind::Eof => return false,
SyntaxKind::Eof => {
p.error("Expected comma");
return false;
}
SyntaxKind::Comma => {
p.consume();
}