aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_mbe/src/tt_iter.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_mbe/src/tt_iter.rs')
-rw-r--r--crates/ra_mbe/src/tt_iter.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/crates/ra_mbe/src/tt_iter.rs b/crates/ra_mbe/src/tt_iter.rs
index 319f1ee65..100184e66 100644
--- a/crates/ra_mbe/src/tt_iter.rs
+++ b/crates/ra_mbe/src/tt_iter.rs
@@ -53,6 +53,10 @@ impl<'a> TtIter<'a> {
53 _ => Err(()), 53 _ => Err(()),
54 } 54 }
55 } 55 }
56
57 pub(crate) fn peek_n(&self, n: usize) -> Option<&tt::TokenTree> {
58 self.inner.as_slice().get(n)
59 }
56} 60}
57 61
58impl<'a> Iterator for TtIter<'a> { 62impl<'a> Iterator for TtIter<'a> {