Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/tt/src/iter.rs')
| -rw-r--r-- | crates/tt/src/iter.rs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/crates/tt/src/iter.rs b/crates/tt/src/iter.rs index c0195b835a..e96bed0319 100644 --- a/crates/tt/src/iter.rs +++ b/crates/tt/src/iter.rs @@ -143,6 +143,10 @@ impl<'a, S: Copy> TtIter<'a, S> { self.inner.as_slice().get(n) } + pub fn next_span(&self) -> Option<S> { + Some(self.inner.as_slice().first()?.first_span()) + } + pub fn as_slice(&self) -> &'a [TokenTree<S>] { self.inner.as_slice() } |