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.rs5
1 files changed, 5 insertions, 0 deletions
diff --git a/crates/ra_mbe/src/tt_cursor.rs b/crates/ra_mbe/src/tt_cursor.rs
index f6cefe087..adfe5520d 100644
--- a/crates/ra_mbe/src/tt_cursor.rs
+++ b/crates/ra_mbe/src/tt_cursor.rs
@@ -99,6 +99,11 @@ impl<'a> TtCursor<'a> {
99 parser.parse_pat() 99 parser.parse_pat()
100 } 100 }
101 101
102 pub(crate) fn eat_stmt(&mut self) -> Option<tt::TokenTree> {
103 let parser = Parser::new(&mut self.pos, self.subtree);
104 parser.parse_stmt()
105 }
106
102 pub(crate) fn expect_char(&mut self, char: char) -> Result<(), ParseError> { 107 pub(crate) fn expect_char(&mut self, char: char) -> Result<(), ParseError> {
103 if self.at_char(char) { 108 if self.at_char(char) {
104 self.bump(); 109 self.bump();