fix assertion failed for break_last_token and trailing token

This commit is contained in:
yukang
2022-10-20 19:40:21 +08:00
parent 53728ff751
commit 2414357374
5 changed files with 36 additions and 5 deletions

View File

@@ -3080,6 +3080,8 @@ impl<'a> Parser<'a> {
&& this.token.kind == token::Semi
{
TrailingToken::Semi
} else if this.token.kind == token::Gt {
TrailingToken::Gt
} else {
// FIXME - pass this through from the place where we know
// we need a comma, rather than assuming that `#[attr] expr,`