From 0a9e3ccc262fbcbd4cdaab30384f8cb71584544b Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Thu, 30 Jul 2020 16:49:13 +0200 Subject: Rename FieldDef -> Field --- xtask/src/ast_src.rs | 8 ++++---- xtask/src/codegen/rust.ungram | 26 +++++++++++++------------- 2 files changed, 17 insertions(+), 17 deletions(-) (limited to 'xtask') diff --git a/xtask/src/ast_src.rs b/xtask/src/ast_src.rs index 38709c63e..ad661218f 100644 --- a/xtask/src/ast_src.rs +++ b/xtask/src/ast_src.rs @@ -180,10 +180,10 @@ pub(crate) const KINDS_SRC: KindsSrc = KindsSrc { "EXTERN_BLOCK", "EXTERN_ITEM_LIST", "ENUM_VARIANT", - "RECORD_FIELD_DEF_LIST", - "RECORD_FIELD_DEF", - "TUPLE_FIELD_DEF_LIST", - "TUPLE_FIELD_DEF", + "RECORD_FIELD_LIST", + "RECORD_FIELD", + "TUPLE_FIELD_LIST", + "TUPLE_FIELD", "ENUM_VARIANT_LIST", "ITEM_LIST", "ASSOC_ITEM_LIST", diff --git a/xtask/src/codegen/rust.ungram b/xtask/src/codegen/rust.ungram index 49b2c9ff8..ba922af0d 100644 --- a/xtask/src/codegen/rust.ungram +++ b/xtask/src/codegen/rust.ungram @@ -78,30 +78,30 @@ TypeAlias = StructDef = Attr* Visibility? 'struct' Name GenericParamList? ( - WhereClause? (RecordFieldDefList | ';') - | TupleFieldDefList WhereClause? ';' + WhereClause? (RecordFieldList | ';') + | TupleFieldList WhereClause? ';' ) -RecordFieldDefList = - '{' fields:RecordFieldDef* '}' +RecordFieldList = + '{' fields:RecordField* '}' -RecordFieldDef = +RecordField = Attr* Visibility? Name ':' ascribed_type:TypeRef -TupleFieldDefList = - '(' fields:TupleFieldDef* ')' +TupleFieldList = + '(' fields:TupleField* ')' -TupleFieldDef = +TupleField = Attr* Visibility? Name TypeRef -FieldDefList = - RecordFieldDefList -| TupleFieldDefList +FieldList = + RecordFieldList +| TupleFieldList UnionDef = Attr* Visibility? 'union' Name GenericParamList? WhereClause? - RecordFieldDefList + RecordFieldList EnumDef = Attr* Visibility? 'enum' Name GenericParamList? WhereClause? @@ -111,7 +111,7 @@ EnumVariantList = '{' variants:EnumVariant* '}' EnumVariant = - Attr* Visibility? Name FieldDefList ('=' Expr)? + Attr* Visibility? Name FieldList ('=' Expr)? TraitDef = Attr* Visibility? 'unsafe'? 'auto'? 'trait' Name GenericParamList -- cgit v1.2.3