mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-01 06:11:35 +00:00
Split ItemList & AssocItemList
This commit is contained in:
parent
72ffd851dd
commit
2984da672e
14 changed files with 131 additions and 89 deletions
|
@ -19,6 +19,13 @@ Item =
|
|||
| UnionDef
|
||||
| UseItem
|
||||
|
||||
Module =
|
||||
Attr* Visibility? 'mod' Name
|
||||
(ItemList | ';')
|
||||
|
||||
ItemList =
|
||||
'{' Item* '}'
|
||||
|
||||
FnDef =
|
||||
Attr* Visibility? Abi? 'const' 'default' 'async' 'unsafe' 'fn' Name TypeParamList?
|
||||
ParamList RetType?
|
||||
|
@ -67,17 +74,10 @@ EnumVariant =
|
|||
TraitDef =
|
||||
Attr* Visibility? 'unsafe'? 'auto'? 'trait' Name TypeParamList
|
||||
(':' TypeBoundList?)? WhereClause
|
||||
ItemList
|
||||
AssocItemList
|
||||
|
||||
Module =
|
||||
Attr* Visibility? 'mod' Name
|
||||
(ItemList | ';')
|
||||
|
||||
ItemList =
|
||||
'{'
|
||||
AssocItem*
|
||||
Item*
|
||||
'}'
|
||||
AssocItemList =
|
||||
'{' AssocItem* '}'
|
||||
|
||||
ConstDef =
|
||||
Attr* Visibility? 'default'? 'const' Name ':' ascribed_type:TypeRef
|
||||
|
@ -94,7 +94,7 @@ TypeAliasDef =
|
|||
ImplDef =
|
||||
Attr* Visibility? 'const'? 'default'? 'unsafe'? 'impl' TypeParamList? '!'? 'for'
|
||||
WhereClause?
|
||||
ItemList
|
||||
AssocItemList
|
||||
|
||||
ParenType =
|
||||
'(' TypeRef ')'
|
||||
|
@ -467,6 +467,7 @@ AssocItem =
|
|||
FnDef
|
||||
| TypeAliasDef
|
||||
| ConstDef
|
||||
| MacroCall
|
||||
|
||||
ExternItem =
|
||||
FnDef | StaticDef
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue