Rename Token::is_path.

This makes it consistent with `is_whole_expr` and `is_whole_block`.
This commit is contained in:
Nicholas Nethercote 2024-03-20 06:51:49 +11:00
parent 099e716502
commit b9ead994b3

View File

@ -664,7 +664,7 @@ pub fn is_ident_named(&self, name: Symbol) -> bool {
}
/// Returns `true` if the token is an interpolated path.
fn is_path(&self) -> bool {
fn is_whole_path(&self) -> bool {
if let Interpolated(nt) = &self.kind
&& let NtPath(..) = &nt.0
{
@ -710,7 +710,7 @@ pub fn is_qpath_start(&self) -> bool {
pub fn is_path_start(&self) -> bool {
self == &ModSep
|| self.is_qpath_start()
|| self.is_path()
|| self.is_whole_path()
|| self.is_path_segment_keyword()
|| self.is_ident() && !self.is_reserved_ident()
}