Add block matcher

This commit is contained in:
Edwin Cheng 2019-04-19 18:30:43 +08:00
parent ab0a96586f
commit 8092b6487f
6 changed files with 35 additions and 0 deletions

View file

@ -46,6 +46,10 @@ impl<'a> Parser<'a> {
self.parse(|src, sink| ra_parser::parse_stmt(src, sink, false))
}
pub fn parse_block(self) -> Option<tt::TokenTree> {
self.parse(ra_parser::parse_block)
}
pub fn parse_item(self) -> Option<tt::TokenTree> {
self.parse(ra_parser::parse_item)
}