Add Ident::is_non_reserved_ident

This commit is contained in:
Michael Goulet
2025-06-26 17:53:01 +00:00
parent 3b9d04c62f
commit 94e9973b92
7 changed files with 14 additions and 15 deletions

View File

@@ -685,7 +685,7 @@ impl<'a> Parser<'a> {
/// Is the given keyword `kw` followed by a non-reserved identifier?
fn is_kw_followed_by_ident(&self, kw: Symbol) -> bool {
self.token.is_keyword(kw) && self.look_ahead(1, |t| t.is_ident() && !t.is_reserved_ident())
self.token.is_keyword(kw) && self.look_ahead(1, |t| t.is_non_reserved_ident())
}
#[inline]