Rename Token::is_op as Token::is_punct.

For consistency with `proc_macro::Punct`.
This commit is contained in:
Nicholas Nethercote 2023-08-08 11:34:07 +10:00
parent 475c71da07
commit becf4942a2
3 changed files with 7 additions and 4 deletions

View file

@ -1592,7 +1592,7 @@ impl<'a> Parser<'a> {
} else if !ate_colon
&& self.may_recover()
&& (matches!(self.token.kind, token::CloseDelim(_) | token::Comma)
|| self.token.is_op())
|| self.token.is_punct())
{
let (lit, _) =
self.recover_unclosed_char(label_.ident, Parser::mk_token_lit_char, |self_| {