mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-01 14:21:44 +00:00
Finaize item grammar
This commit is contained in:
parent
c5798c4d75
commit
917c89c103
3 changed files with 90 additions and 82 deletions
|
@ -129,7 +129,13 @@ Trait =
|
|||
AssocItemList
|
||||
|
||||
AssocItemList =
|
||||
'{' AssocItem* '}'
|
||||
'{' Attr* AssocItem* '}'
|
||||
|
||||
AssocItem =
|
||||
Fn
|
||||
| TypeAlias
|
||||
| Const
|
||||
| MacroCall
|
||||
|
||||
Impl =
|
||||
Attr* Visibility?
|
||||
|
@ -139,6 +145,15 @@ Impl =
|
|||
) WhereClause?
|
||||
AssocItemList
|
||||
|
||||
ExternBlock =
|
||||
Attr* Abi ExternItemList
|
||||
|
||||
ExternItemList =
|
||||
'{' Attr* ExternItem* '}'
|
||||
|
||||
ExternItem =
|
||||
Fn | Static | MacroCall
|
||||
|
||||
ParenType =
|
||||
'(' TypeRef ')'
|
||||
|
||||
|
@ -449,12 +464,6 @@ LifetimeArg =
|
|||
ConstArg =
|
||||
Literal | BlockExpr BlockExpr
|
||||
|
||||
ExternBlock =
|
||||
Attr* Abi ExternItemList
|
||||
|
||||
ExternItemList =
|
||||
'{' extern_items:ExternItem* '}'
|
||||
|
||||
MetaItem =
|
||||
Path '=' AttrInput nested_meta_items:MetaItem*
|
||||
|
||||
|
@ -478,15 +487,6 @@ TypeRef =
|
|||
| ImplTraitType
|
||||
| DynTraitType
|
||||
|
||||
AssocItem =
|
||||
Fn
|
||||
| TypeAlias
|
||||
| Const
|
||||
| MacroCall
|
||||
|
||||
ExternItem =
|
||||
Fn | Static
|
||||
|
||||
AttrInput =
|
||||
Literal
|
||||
| TokenTree
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue