mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 04:44:57 +00:00
Add vis matcher
This commit is contained in:
parent
c5983b85fc
commit
87ff908135
6 changed files with 33 additions and 1 deletions
|
@ -107,6 +107,13 @@ pub fn parse_item(token_source: &dyn TokenSource, tree_sink: &mut dyn TreeSink)
|
|||
parse_from_tokens(token_source, tree_sink, grammar::item);
|
||||
}
|
||||
|
||||
/// Parse given tokens into the given sink as an visibility qualifier
|
||||
pub fn parse_vis(token_source: &dyn TokenSource, tree_sink: &mut dyn TreeSink) {
|
||||
parse_from_tokens(token_source, tree_sink, |p| {
|
||||
grammar::opt_visibility(p);
|
||||
});
|
||||
}
|
||||
|
||||
pub fn parse_macro_items(token_source: &dyn TokenSource, tree_sink: &mut dyn TreeSink) {
|
||||
parse_from_tokens(token_source, tree_sink, grammar::macro_items);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue