Fix is_keyword_ahead visibility

Co-authored-by: Takayuki Maeda <takoyaki0316@gmail.com>
This commit is contained in:
sjwang05 2023-11-12 14:46:01 -08:00 committed by GitHub
parent f88cf0206f
commit 274824b917
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1115,7 +1115,7 @@ pub fn look_ahead<R>(&self, dist: usize, looker: impl FnOnce(&Token) -> R) -> R
}
/// Returns whether any of the given keywords are `dist` tokens ahead of the current one.
pub fn is_keyword_ahead(&self, dist: usize, kws: &[Symbol]) -> bool {
pub(crate) fn is_keyword_ahead(&self, dist: usize, kws: &[Symbol]) -> bool {
self.look_ahead(dist, |t| kws.iter().any(|&kw| t.is_keyword(kw)))
}