mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-29 05:15:04 +00:00
Finish extern crates grammar
This commit is contained in:
parent
570fdf26c9
commit
d032f872b6
8 changed files with 75 additions and 75 deletions
|
@ -98,7 +98,7 @@ pub(crate) const KINDS_SRC: KindsSrc = KindsSrc {
|
|||
"ENUM_DEF",
|
||||
"FN_DEF",
|
||||
"RET_TYPE",
|
||||
"EXTERN_CRATE_ITEM",
|
||||
"EXTERN_CRATE",
|
||||
"MODULE",
|
||||
"USE_ITEM",
|
||||
"STATIC_DEF",
|
||||
|
|
|
@ -7,7 +7,7 @@ Item =
|
|||
ConstDef
|
||||
| EnumDef
|
||||
| ExternBlock
|
||||
| ExternCrateItem
|
||||
| ExternCrate
|
||||
| FnDef
|
||||
| ImplDef
|
||||
| MacroCall
|
||||
|
@ -26,6 +26,9 @@ Module =
|
|||
ItemList =
|
||||
'{' Attr* Item* '}'
|
||||
|
||||
ExternCrate =
|
||||
Attr* Visibility? 'extern' 'crate' (NameRef | 'self') Rename? ';'
|
||||
|
||||
FnDef =
|
||||
Attr* Visibility? Abi? 'const' 'default' 'async' 'unsafe' 'fn' Name TypeParamList?
|
||||
ParamList RetType?
|
||||
|
@ -404,9 +407,6 @@ UseTreeList =
|
|||
Rename =
|
||||
'as' Name
|
||||
|
||||
ExternCrateItem =
|
||||
Attr* Visibility? 'extern' 'crate' (NameRef | 'self') Rename? ';'
|
||||
|
||||
Path =
|
||||
(qualifier:Path '::')? segment:PathSegment
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue