From 216a5344c8ef3c3e430d2761dc8b1a7b60250a15 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Thu, 30 Jul 2020 17:50:40 +0200 Subject: Rename StructDef -> Struct --- xtask/src/ast_src.rs | 2 +- xtask/src/codegen/gen_syntax.rs | 2 +- xtask/src/codegen/rust.ungram | 6 +++--- 3 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 e21618cbd..e8a90636e 100644 --- a/xtask/src/ast_src.rs +++ b/xtask/src/ast_src.rs @@ -93,7 +93,7 @@ pub(crate) const KINDS_SRC: KindsSrc = KindsSrc { ], nodes: &[ "SOURCE_FILE", - "STRUCT_DEF", + "STRUCT", "UNION", "ENUM_DEF", "FN", diff --git a/xtask/src/codegen/gen_syntax.rs b/xtask/src/codegen/gen_syntax.rs index 84ddda5cb..e993a750c 100644 --- a/xtask/src/codegen/gen_syntax.rs +++ b/xtask/src/codegen/gen_syntax.rs @@ -307,7 +307,7 @@ fn generate_syntax_kinds(grammar: KindsSrc<'_>) -> Result { let ast = quote! { #![allow(bad_style, missing_docs, unreachable_pub)] - /// The kind of syntax node, e.g. `IDENT`, `USE_KW`, or `STRUCT_DEF`. + /// The kind of syntax node, e.g. `IDENT`, `USE_KW`, or `STRUCT`. #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Debug)] #[repr(u16)] pub enum SyntaxKind { diff --git a/xtask/src/codegen/rust.ungram b/xtask/src/codegen/rust.ungram index 65082f3d9..d038c5c5a 100644 --- a/xtask/src/codegen/rust.ungram +++ b/xtask/src/codegen/rust.ungram @@ -13,7 +13,7 @@ Item = | MacroCall | Module | StaticDef -| StructDef +| Struct | TraitDef | TypeAlias | Union @@ -76,7 +76,7 @@ TypeAlias = Attr* Visibility? 'default'? 'type' Name GenericParamList? (':' TypeBoundList?)? WhereClause? '=' TypeRef ';' -StructDef = +Struct = Attr* Visibility? 'struct' Name GenericParamList? ( WhereClause? (RecordFieldList | ';') | TupleFieldList WhereClause? ';' @@ -453,7 +453,7 @@ MetaItem = Path '=' AttrInput nested_meta_items:MetaItem* AdtDef = - StructDef + Struct | EnumDef | Union -- cgit v1.2.3