Finish extern crates grammar

This commit is contained in:
Aleksey Kladov 2020-07-30 12:26:57 +02:00
parent 570fdf26c9
commit d032f872b6
8 changed files with 75 additions and 75 deletions

View file

@ -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",

View file

@ -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