aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_mbe/src/tt_cursor.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_mbe/src/tt_cursor.rs')
-rw-r--r--crates/ra_mbe/src/tt_cursor.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/crates/ra_mbe/src/tt_cursor.rs b/crates/ra_mbe/src/tt_cursor.rs
index 04bb6b563..9c49648fa 100644
--- a/crates/ra_mbe/src/tt_cursor.rs
+++ b/crates/ra_mbe/src/tt_cursor.rs
@@ -119,6 +119,10 @@ impl<'a> TtCursor<'a> {
119 parser.parse_item() 119 parser.parse_item()
120 } 120 }
121 121
122 pub(crate) fn eat_lifetime(&mut self) -> Option<tt::TokenTree> {
123 self.eat_ident().cloned().map(|ident| tt::Leaf::from(ident).into())
124 }
125
122 pub(crate) fn expect_char(&mut self, char: char) -> Result<(), ParseError> { 126 pub(crate) fn expect_char(&mut self, char: char) -> Result<(), ParseError> {
123 if self.at_char(char) { 127 if self.at_char(char) {
124 self.bump(); 128 self.bump();