aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_mbe/src/subtree_parser.rs
diff options
context:
space:
mode:
authorEdwin Cheng <[email protected]>2019-04-19 11:30:43 +0100
committerEdwin Cheng <[email protected]>2019-04-19 11:30:43 +0100
commit8092b6487f301bf9219c55fc714744fa2616fb9a (patch)
treeea65ea5146b62c5505737c81c7026bae9973693d /crates/ra_mbe/src/subtree_parser.rs
parentab0a96586fd54858106cb6ac112d61eb657426f6 (diff)
Add block matcher
Diffstat (limited to 'crates/ra_mbe/src/subtree_parser.rs')
-rw-r--r--crates/ra_mbe/src/subtree_parser.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/crates/ra_mbe/src/subtree_parser.rs b/crates/ra_mbe/src/subtree_parser.rs
index 195e4c3ac..2b11186c4 100644
--- a/crates/ra_mbe/src/subtree_parser.rs
+++ b/crates/ra_mbe/src/subtree_parser.rs
@@ -46,6 +46,10 @@ impl<'a> Parser<'a> {
46 self.parse(|src, sink| ra_parser::parse_stmt(src, sink, false)) 46 self.parse(|src, sink| ra_parser::parse_stmt(src, sink, false))
47 } 47 }
48 48
49 pub fn parse_block(self) -> Option<tt::TokenTree> {
50 self.parse(ra_parser::parse_block)
51 }
52
49 pub fn parse_item(self) -> Option<tt::TokenTree> { 53 pub fn parse_item(self) -> Option<tt::TokenTree> {
50 self.parse(ra_parser::parse_item) 54 self.parse(ra_parser::parse_item)
51 } 55 }