Add vis matcher

This commit is contained in:
Edwin Cheng 2019-04-19 21:38:26 +08:00
parent c5983b85fc
commit 87ff908135
6 changed files with 33 additions and 1 deletions

View file

@ -58,6 +58,10 @@ impl<'a> Parser<'a> {
self.parse(ra_parser::parse_item)
}
pub fn parse_vis(self) -> Option<tt::TokenTree> {
self.parse(ra_parser::parse_vis)
}
fn parse<F>(self, f: F) -> Option<tt::TokenTree>
where
F: FnOnce(&dyn TokenSource, &mut dyn TreeSink),