From 609680ef97dbf82c07b6b06e21aa366423892304 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Thu, 30 Jul 2020 17:52:53 +0200 Subject: Rename EnumDef -> Enum --- xtask/src/ast_src.rs | 2 +- xtask/src/codegen/rust.ungram | 14 +++++++------- 2 files changed, 8 insertions(+), 8 deletions(-) (limited to 'xtask') diff --git a/xtask/src/ast_src.rs b/xtask/src/ast_src.rs index e8a90636e..fe8381e41 100644 --- a/xtask/src/ast_src.rs +++ b/xtask/src/ast_src.rs @@ -95,7 +95,7 @@ pub(crate) const KINDS_SRC: KindsSrc = KindsSrc { "SOURCE_FILE", "STRUCT", "UNION", - "ENUM_DEF", + "ENUM", "FN", "RET_TYPE", "EXTERN_CRATE", diff --git a/xtask/src/codegen/rust.ungram b/xtask/src/codegen/rust.ungram index d038c5c5a..9c6797cb7 100644 --- a/xtask/src/codegen/rust.ungram +++ b/xtask/src/codegen/rust.ungram @@ -5,7 +5,7 @@ SourceFile = Item = ConstDef -| EnumDef +| Enum | ExternBlock | ExternCrate | Fn @@ -98,11 +98,7 @@ FieldList = RecordFieldList | TupleFieldList -Union = - Attr* Visibility? 'union' Name GenericParamList? WhereClause? - RecordFieldList - -EnumDef = +Enum = Attr* Visibility? 'enum' Name GenericParamList? WhereClause? variant_list:EnumVariantList @@ -112,6 +108,10 @@ EnumVariantList = EnumVariant = Attr* Visibility? Name FieldList ('=' Expr)? +Union = + Attr* Visibility? 'union' Name GenericParamList? WhereClause? + RecordFieldList + TraitDef = Attr* Visibility? 'unsafe'? 'auto'? 'trait' Name GenericParamList (':' TypeBoundList?)? WhereClause @@ -454,7 +454,7 @@ MetaItem = AdtDef = Struct -| EnumDef +| Enum | Union TypeRef = -- cgit v1.2.3