diff options
author | Aleksey Kladov <[email protected]> | 2020-03-05 10:16:45 +0000 |
---|---|---|
committer | GitHub <[email protected]> | 2020-03-05 10:16:45 +0000 |
commit | b6819c25950eb49dd9bebf5e2190971fff19fe91 (patch) | |
tree | 79cb455a1ef804708cd7216b71a358695980bda3 /crates/ra_mbe/src/tt_iter.rs | |
parent | 9c906bd60a251c2f537000f90ea708186d8c97f6 (diff) | |
parent | 0c79e1d304d2498abfceefec4d5907b187596c6a (diff) |
Merge pull request #3451 from edwin0cheng/fix-mbe-composited
Fix mbe composited token bug
Diffstat (limited to 'crates/ra_mbe/src/tt_iter.rs')
-rw-r--r-- | crates/ra_mbe/src/tt_iter.rs | 4 |
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 | ||
58 | impl<'a> Iterator for TtIter<'a> { | 62 | impl<'a> Iterator for TtIter<'a> { |