mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 12:54:58 +00:00
simplify
This commit is contained in:
parent
369001615f
commit
8e7fc7be65
5 changed files with 27 additions and 104 deletions
|
@ -75,6 +75,13 @@ pub(crate) mod entry {
|
|||
pub(crate) fn path(p: &mut Parser) {
|
||||
let _ = paths::type_path(p);
|
||||
}
|
||||
pub(crate) fn item(p: &mut Parser) {
|
||||
items::item_or_macro(p, true);
|
||||
}
|
||||
// Parse a meta item , which excluded [], e.g : #[ MetaItem ]
|
||||
pub(crate) fn meta_item(p: &mut Parser) {
|
||||
attributes::meta(p);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -92,15 +99,6 @@ pub(crate) mod entry_points {
|
|||
expressions::stmt(p, expressions::StmtWithSemi::Optional, false);
|
||||
}
|
||||
|
||||
// Parse a meta item , which excluded [], e.g : #[ MetaItem ]
|
||||
pub(crate) fn meta_item(p: &mut Parser) {
|
||||
attributes::meta(p);
|
||||
}
|
||||
|
||||
pub(crate) fn item(p: &mut Parser) {
|
||||
items::item_or_macro(p, true);
|
||||
}
|
||||
|
||||
pub(crate) fn macro_items(p: &mut Parser) {
|
||||
let m = p.start();
|
||||
items::mod_contents(p, false);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue