Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/parser/src/grammar.rs')
| -rw-r--r-- | crates/parser/src/grammar.rs | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/crates/parser/src/grammar.rs b/crates/parser/src/grammar.rs index 8310b38b92..0e663b9ac0 100644 --- a/crates/parser/src/grammar.rs +++ b/crates/parser/src/grammar.rs @@ -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); |