Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/parser/src/lib.rs')
| -rw-r--r-- | crates/parser/src/lib.rs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/crates/parser/src/lib.rs b/crates/parser/src/lib.rs index c5014be6c3..72d529d6cf 100644 --- a/crates/parser/src/lib.rs +++ b/crates/parser/src/lib.rs @@ -110,6 +110,8 @@ pub enum TopEntryPoint { Pattern, Type, Expr, + /// Edge case -- macros generally don't expand to attributes, with the + /// exception of `cfg_attr` which does! MetaItem, } @@ -119,9 +121,9 @@ impl TopEntryPoint { TopEntryPoint::SourceFile => grammar::entry::top::source_file, TopEntryPoint::MacroStmts => grammar::entry::top::macro_stmts, TopEntryPoint::MacroItems => grammar::entry::top::macro_items, + TopEntryPoint::Pattern => grammar::entry::top::pattern, + TopEntryPoint::Type => grammar::entry::top::type_, // FIXME - TopEntryPoint::Pattern => grammar::entry::prefix::pat, - TopEntryPoint::Type => grammar::entry::prefix::ty, TopEntryPoint::Expr => grammar::entry::prefix::expr, TopEntryPoint::MetaItem => grammar::entry::prefix::meta_item, }; |