From d032f872b619c651dc66bfd669ef783108fc122c Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Thu, 30 Jul 2020 12:26:57 +0200 Subject: Finish extern crates grammar --- xtask/src/ast_src.rs | 2 +- xtask/src/codegen/rust.ungram | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'xtask/src') diff --git a/xtask/src/ast_src.rs b/xtask/src/ast_src.rs index bcd92c3bc..083727c5c 100644 --- a/xtask/src/ast_src.rs +++ b/xtask/src/ast_src.rs @@ -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", diff --git a/xtask/src/codegen/rust.ungram b/xtask/src/codegen/rust.ungram index 76c070402..e6e7c7518 100644 --- a/xtask/src/codegen/rust.ungram +++ b/xtask/src/codegen/rust.ungram @@ -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 -- cgit v1.2.3