diff --git a/crates/ra_syntax/src/ast/generated.rs b/crates/ra_syntax/src/ast/generated.rs index 1e0ba3f71b..f5199e09f2 100644 --- a/crates/ra_syntax/src/ast/generated.rs +++ b/crates/ra_syntax/src/ast/generated.rs @@ -1,4 +1,6 @@ //! This file is actually hand-written, but the submodules are indeed generated. +#[rustfmt::skip] pub(super) mod nodes; +#[rustfmt::skip] pub(super) mod tokens; diff --git a/crates/ra_syntax/src/ast/generated/nodes.rs b/crates/ra_syntax/src/ast/generated/nodes.rs index 18bf306577..6e258250c4 100644 --- a/crates/ra_syntax/src/ast/generated/nodes.rs +++ b/crates/ra_syntax/src/ast/generated/nodes.rs @@ -29,17 +29,13 @@ impl AstNode for SourceFile { None } } - fn syntax(&self) -> &SyntaxNode { - &self.syntax - } + fn syntax(&self) -> &SyntaxNode { &self.syntax } } impl ast::ModuleItemOwner for SourceFile {} impl ast::FnDefOwner for SourceFile {} impl ast::AttrsOwner for SourceFile {} impl SourceFile { - pub fn modules(&self) -> AstChildren { - support::children(&self.syntax) - } + pub fn modules(&self) -> AstChildren { support::children(&self.syntax) } } #[derive(Debug, Clone, PartialEq, Eq, Hash)] pub struct FnDef { @@ -64,9 +60,7 @@ impl AstNode for FnDef { None } } - fn syntax(&self) -> &SyntaxNode { - &self.syntax - } + fn syntax(&self) -> &SyntaxNode { &self.syntax } } impl ast::VisibilityOwner for FnDef {} impl ast::NameOwner for FnDef {} @@ -74,36 +68,16 @@ impl ast::TypeParamsOwner for FnDef {} impl ast::DocCommentsOwner for FnDef {} impl ast::AttrsOwner for FnDef {} impl FnDef { - pub fn abi(&self) -> Option { - support::child(&self.syntax) - } - pub fn const_kw(&self) -> Option { - support::token(&self.syntax) - } - pub fn default_kw(&self) -> Option { - support::token(&self.syntax) - } - pub fn async_kw(&self) -> Option { - support::token(&self.syntax) - } - pub fn unsafe_kw(&self) -> Option { - support::token(&self.syntax) - } - pub fn fn_kw(&self) -> Option { - support::token(&self.syntax) - } - pub fn param_list(&self) -> Option { - support::child(&self.syntax) - } - pub fn ret_type(&self) -> Option { - support::child(&self.syntax) - } - pub fn body(&self) -> Option { - support::child(&self.syntax) - } - pub fn semi(&self) -> Option { - support::token(&self.syntax) - } + pub fn abi(&self) -> Option { support::child(&self.syntax) } + pub fn const_kw(&self) -> Option { support::token(&self.syntax) } + pub fn default_kw(&self) -> Option { support::token(&self.syntax) } + pub fn async_kw(&self) -> Option { support::token(&self.syntax) } + pub fn unsafe_kw(&self) -> Option { support::token(&self.syntax) } + pub fn fn_kw(&self) -> Option { support::token(&self.syntax) } + pub fn param_list(&self) -> Option { support::child(&self.syntax) } + pub fn ret_type(&self) -> Option { support::child(&self.syntax) } + pub fn body(&self) -> Option { support::child(&self.syntax) } + pub fn semi(&self) -> Option { support::token(&self.syntax) } } #[derive(Debug, Clone, PartialEq, Eq, Hash)] pub struct RetType { @@ -128,17 +102,11 @@ impl AstNode for RetType { None } } - fn syntax(&self) -> &SyntaxNode { - &self.syntax - } + fn syntax(&self) -> &SyntaxNode { &self.syntax } } impl RetType { - pub fn thin_arrow(&self) -> Option { - support::token(&self.syntax) - } - pub fn type_ref(&self) -> Option { - support::child(&self.syntax) - } + pub fn thin_arrow(&self) -> Option { support::token(&self.syntax) } + pub fn type_ref(&self) -> Option { support::child(&self.syntax) } } #[derive(Debug, Clone, PartialEq, Eq, Hash)] pub struct StructDef { @@ -163,9 +131,7 @@ impl AstNode for StructDef { None } } - fn syntax(&self) -> &SyntaxNode { - &self.syntax - } + fn syntax(&self) -> &SyntaxNode { &self.syntax } } impl ast::VisibilityOwner for StructDef {} impl ast::NameOwner for StructDef {} @@ -173,15 +139,9 @@ impl ast::TypeParamsOwner for StructDef {} impl ast::AttrsOwner for StructDef {} impl ast::DocCommentsOwner for StructDef {} impl StructDef { - pub fn struct_kw(&self) -> Option { - support::token(&self.syntax) - } - pub fn field_def_list(&self) -> Option { - support::child(&self.syntax) - } - pub fn semi(&self) -> Option { - support::token(&self.syntax) - } + pub fn struct_kw(&self) -> Option { support::token(&self.syntax) } + pub fn field_def_list(&self) -> Option { support::child(&self.syntax) } + pub fn semi(&self) -> Option { support::token(&self.syntax) } } #[derive(Debug, Clone, PartialEq, Eq, Hash)] pub struct UnionDef { @@ -206,9 +166,7 @@ impl AstNode for UnionDef { None } } - fn syntax(&self) -> &SyntaxNode { - &self.syntax - } + fn syntax(&self) -> &SyntaxNode { &self.syntax } } impl ast::VisibilityOwner for UnionDef {} impl ast::NameOwner for UnionDef {} @@ -216,9 +174,7 @@ impl ast::TypeParamsOwner for UnionDef {} impl ast::AttrsOwner for UnionDef {} impl ast::DocCommentsOwner for UnionDef {} impl UnionDef { - pub fn union_kw(&self) -> Option { - support::token(&self.syntax) - } + pub fn union_kw(&self) -> Option { support::token(&self.syntax) } pub fn record_field_def_list(&self) -> Option { support::child(&self.syntax) } @@ -246,20 +202,12 @@ impl AstNode for RecordFieldDefList { None } } - fn syntax(&self) -> &SyntaxNode { - &self.syntax - } + fn syntax(&self) -> &SyntaxNode { &self.syntax } } impl RecordFieldDefList { - pub fn l_curly(&self) -> Option { - support::token(&self.syntax) - } - pub fn fields(&self) -> AstChildren { - support::children(&self.syntax) - } - pub fn r_curly(&self) -> Option { - support::token(&self.syntax) - } + pub fn l_curly(&self) -> Option { support::token(&self.syntax) } + pub fn fields(&self) -> AstChildren { support::children(&self.syntax) } + pub fn r_curly(&self) -> Option { support::token(&self.syntax) } } #[derive(Debug, Clone, PartialEq, Eq, Hash)] pub struct RecordFieldDef { @@ -284,9 +232,7 @@ impl AstNode for RecordFieldDef { None } } - fn syntax(&self) -> &SyntaxNode { - &self.syntax - } + fn syntax(&self) -> &SyntaxNode { &self.syntax } } impl ast::VisibilityOwner for RecordFieldDef {} impl ast::NameOwner for RecordFieldDef {} @@ -317,20 +263,12 @@ impl AstNode for TupleFieldDefList { None } } - fn syntax(&self) -> &SyntaxNode { - &self.syntax - } + fn syntax(&self) -> &SyntaxNode { &self.syntax } } impl TupleFieldDefList { - pub fn l_paren(&self) -> Option { - support::token(&self.syntax) - } - pub fn fields(&self) -> AstChildren { - support::children(&self.syntax) - } - pub fn r_paren(&self) -> Option { - support::token(&self.syntax) - } + pub fn l_paren(&self) -> Option { support::token(&self.syntax) } + pub fn fields(&self) -> AstChildren { support::children(&self.syntax) } + pub fn r_paren(&self) -> Option { support::token(&self.syntax) } } #[derive(Debug, Clone, PartialEq, Eq, Hash)] pub struct TupleFieldDef { @@ -355,16 +293,12 @@ impl AstNode for TupleFieldDef { None } } - fn syntax(&self) -> &SyntaxNode { - &self.syntax - } + fn syntax(&self) -> &SyntaxNode { &self.syntax } } impl ast::VisibilityOwner for TupleFieldDef {} impl ast::AttrsOwner for TupleFieldDef {} impl TupleFieldDef { - pub fn type_ref(&self) -> Option { - support::child(&self.syntax) - } + pub fn type_ref(&self) -> Option { support::child(&self.syntax) } } #[derive(Debug, Clone, PartialEq, Eq, Hash)] pub struct EnumDef { @@ -389,9 +323,7 @@ impl AstNode for EnumDef { None } } - fn syntax(&self) -> &SyntaxNode { - &self.syntax - } + fn syntax(&self) -> &SyntaxNode { &self.syntax } } impl ast::VisibilityOwner for EnumDef {} impl ast::NameOwner for EnumDef {} @@ -399,12 +331,8 @@ impl ast::TypeParamsOwner for EnumDef {} impl ast::AttrsOwner for EnumDef {} impl ast::DocCommentsOwner for EnumDef {} impl EnumDef { - pub fn enum_kw(&self) -> Option { - support::token(&self.syntax) - } - pub fn variant_list(&self) -> Option { - support::child(&self.syntax) - } + pub fn enum_kw(&self) -> Option { support::token(&self.syntax) } + pub fn variant_list(&self) -> Option { support::child(&self.syntax) } } #[derive(Debug, Clone, PartialEq, Eq, Hash)] pub struct EnumVariantList { @@ -429,20 +357,12 @@ impl AstNode for EnumVariantList { None } } - fn syntax(&self) -> &SyntaxNode { - &self.syntax - } + fn syntax(&self) -> &SyntaxNode { &self.syntax } } impl EnumVariantList { - pub fn l_curly(&self) -> Option { - support::token(&self.syntax) - } - pub fn variants(&self) -> AstChildren { - support::children(&self.syntax) - } - pub fn r_curly(&self) -> Option { - support::token(&self.syntax) - } + pub fn l_curly(&self) -> Option { support::token(&self.syntax) } + pub fn variants(&self) -> AstChildren { support::children(&self.syntax) } + pub fn r_curly(&self) -> Option { support::token(&self.syntax) } } #[derive(Debug, Clone, PartialEq, Eq, Hash)] pub struct EnumVariant { @@ -467,24 +387,16 @@ impl AstNode for EnumVariant { None } } - fn syntax(&self) -> &SyntaxNode { - &self.syntax - } + fn syntax(&self) -> &SyntaxNode { &self.syntax } } impl ast::VisibilityOwner for EnumVariant {} impl ast::NameOwner for EnumVariant {} impl ast::DocCommentsOwner for EnumVariant {} impl ast::AttrsOwner for EnumVariant {} impl EnumVariant { - pub fn field_def_list(&self) -> Option { - support::child(&self.syntax) - } - pub fn eq(&self) -> Option { - support::token(&self.syntax) - } - pub fn expr(&self) -> Option { - support::child(&self.syntax) - } + pub fn field_def_list(&self) -> Option { support::child(&self.syntax) } + pub fn eq(&self) -> Option { support::token(&self.syntax) } + pub fn expr(&self) -> Option { support::child(&self.syntax) } } #[derive(Debug, Clone, PartialEq, Eq, Hash)] pub struct TraitDef { @@ -509,9 +421,7 @@ impl AstNode for TraitDef { None } } - fn syntax(&self) -> &SyntaxNode { - &self.syntax - } + fn syntax(&self) -> &SyntaxNode { &self.syntax } } impl ast::VisibilityOwner for TraitDef {} impl ast::NameOwner for TraitDef {} @@ -520,18 +430,10 @@ impl ast::DocCommentsOwner for TraitDef {} impl ast::TypeParamsOwner for TraitDef {} impl ast::TypeBoundsOwner for TraitDef {} impl TraitDef { - pub fn unsafe_kw(&self) -> Option { - support::token(&self.syntax) - } - pub fn auto_kw(&self) -> Option { - support::token(&self.syntax) - } - pub fn trait_kw(&self) -> Option { - support::token(&self.syntax) - } - pub fn item_list(&self) -> Option { - support::child(&self.syntax) - } + pub fn unsafe_kw(&self) -> Option { support::token(&self.syntax) } + pub fn auto_kw(&self) -> Option { support::token(&self.syntax) } + pub fn trait_kw(&self) -> Option { support::token(&self.syntax) } + pub fn item_list(&self) -> Option { support::child(&self.syntax) } } #[derive(Debug, Clone, PartialEq, Eq, Hash)] pub struct Module { @@ -556,24 +458,16 @@ impl AstNode for Module { None } } - fn syntax(&self) -> &SyntaxNode { - &self.syntax - } + fn syntax(&self) -> &SyntaxNode { &self.syntax } } impl ast::VisibilityOwner for Module {} impl ast::NameOwner for Module {} impl ast::AttrsOwner for Module {} impl ast::DocCommentsOwner for Module {} impl Module { - pub fn mod_kw(&self) -> Option { - support::token(&self.syntax) - } - pub fn item_list(&self) -> Option { - support::child(&self.syntax) - } - pub fn semi(&self) -> Option { - support::token(&self.syntax) - } + pub fn mod_kw(&self) -> Option { support::token(&self.syntax) } + pub fn item_list(&self) -> Option { support::child(&self.syntax) } + pub fn semi(&self) -> Option { support::token(&self.syntax) } } #[derive(Debug, Clone, PartialEq, Eq, Hash)] pub struct ItemList { @@ -598,22 +492,14 @@ impl AstNode for ItemList { None } } - fn syntax(&self) -> &SyntaxNode { - &self.syntax - } + fn syntax(&self) -> &SyntaxNode { &self.syntax } } impl ast::FnDefOwner for ItemList {} impl ast::ModuleItemOwner for ItemList {} impl ItemList { - pub fn l_curly(&self) -> Option { - support::token(&self.syntax) - } - pub fn impl_items(&self) -> AstChildren { - support::children(&self.syntax) - } - pub fn r_curly(&self) -> Option { - support::token(&self.syntax) - } + pub fn l_curly(&self) -> Option { support::token(&self.syntax) } + pub fn impl_items(&self) -> AstChildren { support::children(&self.syntax) } + pub fn r_curly(&self) -> Option { support::token(&self.syntax) } } #[derive(Debug, Clone, PartialEq, Eq, Hash)] pub struct ConstDef { @@ -638,9 +524,7 @@ impl AstNode for ConstDef { None } } - fn syntax(&self) -> &SyntaxNode { - &self.syntax - } + fn syntax(&self) -> &SyntaxNode { &self.syntax } } impl ast::VisibilityOwner for ConstDef {} impl ast::NameOwner for ConstDef {} @@ -649,21 +533,11 @@ impl ast::AttrsOwner for ConstDef {} impl ast::DocCommentsOwner for ConstDef {} impl ast::TypeAscriptionOwner for ConstDef {} impl ConstDef { - pub fn default_kw(&self) -> Option { - support::token(&self.syntax) - } - pub fn const_kw(&self) -> Option { - support::token(&self.syntax) - } - pub fn eq(&self) -> Option { - support::token(&self.syntax) - } - pub fn body(&self) -> Option { - support::child(&self.syntax) - } - pub fn semi(&self) -> Option { - support::token(&self.syntax) - } + pub fn default_kw(&self) -> Option { support::token(&self.syntax) } + pub fn const_kw(&self) -> Option { support::token(&self.syntax) } + pub fn eq(&self) -> Option { support::token(&self.syntax) } + pub fn body(&self) -> Option { support::child(&self.syntax) } + pub fn semi(&self) -> Option { support::token(&self.syntax) } } #[derive(Debug, Clone, PartialEq, Eq, Hash)] pub struct StaticDef { @@ -688,9 +562,7 @@ impl AstNode for StaticDef { None } } - fn syntax(&self) -> &SyntaxNode { - &self.syntax - } + fn syntax(&self) -> &SyntaxNode { &self.syntax } } impl ast::VisibilityOwner for StaticDef {} impl ast::NameOwner for StaticDef {} @@ -699,21 +571,11 @@ impl ast::AttrsOwner for StaticDef {} impl ast::DocCommentsOwner for StaticDef {} impl ast::TypeAscriptionOwner for StaticDef {} impl StaticDef { - pub fn static_kw(&self) -> Option { - support::token(&self.syntax) - } - pub fn mut_kw(&self) -> Option { - support::token(&self.syntax) - } - pub fn eq(&self) -> Option { - support::token(&self.syntax) - } - pub fn body(&self) -> Option { - support::child(&self.syntax) - } - pub fn semi(&self) -> Option { - support::token(&self.syntax) - } + pub fn static_kw(&self) -> Option { support::token(&self.syntax) } + pub fn mut_kw(&self) -> Option { support::token(&self.syntax) } + pub fn eq(&self) -> Option { support::token(&self.syntax) } + pub fn body(&self) -> Option { support::child(&self.syntax) } + pub fn semi(&self) -> Option { support::token(&self.syntax) } } #[derive(Debug, Clone, PartialEq, Eq, Hash)] pub struct TypeAliasDef { @@ -738,9 +600,7 @@ impl AstNode for TypeAliasDef { None } } - fn syntax(&self) -> &SyntaxNode { - &self.syntax - } + fn syntax(&self) -> &SyntaxNode { &self.syntax } } impl ast::VisibilityOwner for TypeAliasDef {} impl ast::NameOwner for TypeAliasDef {} @@ -749,21 +609,11 @@ impl ast::AttrsOwner for TypeAliasDef {} impl ast::DocCommentsOwner for TypeAliasDef {} impl ast::TypeBoundsOwner for TypeAliasDef {} impl TypeAliasDef { - pub fn default_kw(&self) -> Option { - support::token(&self.syntax) - } - pub fn type_kw(&self) -> Option { - support::token(&self.syntax) - } - pub fn eq(&self) -> Option { - support::token(&self.syntax) - } - pub fn type_ref(&self) -> Option { - support::child(&self.syntax) - } - pub fn semi(&self) -> Option { - support::token(&self.syntax) - } + pub fn default_kw(&self) -> Option { support::token(&self.syntax) } + pub fn type_kw(&self) -> Option { support::token(&self.syntax) } + pub fn eq(&self) -> Option { support::token(&self.syntax) } + pub fn type_ref(&self) -> Option { support::child(&self.syntax) } + pub fn semi(&self) -> Option { support::token(&self.syntax) } } #[derive(Debug, Clone, PartialEq, Eq, Hash)] pub struct ImplDef { @@ -788,34 +638,18 @@ impl AstNode for ImplDef { None } } - fn syntax(&self) -> &SyntaxNode { - &self.syntax - } + fn syntax(&self) -> &SyntaxNode { &self.syntax } } impl ast::TypeParamsOwner for ImplDef {} impl ast::AttrsOwner for ImplDef {} impl ImplDef { - pub fn default_kw(&self) -> Option { - support::token(&self.syntax) - } - pub fn const_kw(&self) -> Option { - support::token(&self.syntax) - } - pub fn unsafe_kw(&self) -> Option { - support::token(&self.syntax) - } - pub fn impl_kw(&self) -> Option { - support::token(&self.syntax) - } - pub fn excl(&self) -> Option { - support::token(&self.syntax) - } - pub fn for_kw(&self) -> Option { - support::token(&self.syntax) - } - pub fn item_list(&self) -> Option { - support::child(&self.syntax) - } + pub fn default_kw(&self) -> Option { support::token(&self.syntax) } + pub fn const_kw(&self) -> Option { support::token(&self.syntax) } + pub fn unsafe_kw(&self) -> Option { support::token(&self.syntax) } + pub fn impl_kw(&self) -> Option { support::token(&self.syntax) } + pub fn excl(&self) -> Option { support::token(&self.syntax) } + pub fn for_kw(&self) -> Option { support::token(&self.syntax) } + pub fn item_list(&self) -> Option { support::child(&self.syntax) } } #[derive(Debug, Clone, PartialEq, Eq, Hash)] pub struct ParenType { @@ -840,20 +674,12 @@ impl AstNode for ParenType { None } } - fn syntax(&self) -> &SyntaxNode { - &self.syntax - } + fn syntax(&self) -> &SyntaxNode { &self.syntax } } impl ParenType { - pub fn l_paren(&self) -> Option { - support::token(&self.syntax) - } - pub fn type_ref(&self) -> Option { - support::child(&self.syntax) - } - pub fn r_paren(&self) -> Option { - support::token(&self.syntax) - } + pub fn l_paren(&self) -> Option { support::token(&self.syntax) } + pub fn type_ref(&self) -> Option { support::child(&self.syntax) } + pub fn r_paren(&self) -> Option { support::token(&self.syntax) } } #[derive(Debug, Clone, PartialEq, Eq, Hash)] pub struct TupleType { @@ -878,20 +704,12 @@ impl AstNode for TupleType { None } } - fn syntax(&self) -> &SyntaxNode { - &self.syntax - } + fn syntax(&self) -> &SyntaxNode { &self.syntax } } impl TupleType { - pub fn l_paren(&self) -> Option { - support::token(&self.syntax) - } - pub fn fields(&self) -> AstChildren { - support::children(&self.syntax) - } - pub fn r_paren(&self) -> Option { - support::token(&self.syntax) - } + pub fn l_paren(&self) -> Option { support::token(&self.syntax) } + pub fn fields(&self) -> AstChildren { support::children(&self.syntax) } + pub fn r_paren(&self) -> Option { support::token(&self.syntax) } } #[derive(Debug, Clone, PartialEq, Eq, Hash)] pub struct NeverType { @@ -916,14 +734,10 @@ impl AstNode for NeverType { None } } - fn syntax(&self) -> &SyntaxNode { - &self.syntax - } + fn syntax(&self) -> &SyntaxNode { &self.syntax } } impl NeverType { - pub fn excl(&self) -> Option { - support::token(&self.syntax) - } + pub fn excl(&self) -> Option { support::token(&self.syntax) } } #[derive(Debug, Clone, PartialEq, Eq, Hash)] pub struct PathType { @@ -948,14 +762,10 @@ impl AstNode for PathType { None } } - fn syntax(&self) -> &SyntaxNode { - &self.syntax - } + fn syntax(&self) -> &SyntaxNode { &self.syntax } } impl PathType { - pub fn path(&self) -> Option { - support::child(&self.syntax) - } + pub fn path(&self) -> Option { support::child(&self.syntax) } } #[derive(Debug, Clone, PartialEq, Eq, Hash)] pub struct PointerType { @@ -980,20 +790,12 @@ impl AstNode for PointerType { None } } - fn syntax(&self) -> &SyntaxNode { - &self.syntax - } + fn syntax(&self) -> &SyntaxNode { &self.syntax } } impl PointerType { - pub fn star(&self) -> Option { - support::token(&self.syntax) - } - pub fn const_kw(&self) -> Option { - support::token(&self.syntax) - } - pub fn type_ref(&self) -> Option { - support::child(&self.syntax) - } + pub fn star(&self) -> Option { support::token(&self.syntax) } + pub fn const_kw(&self) -> Option { support::token(&self.syntax) } + pub fn type_ref(&self) -> Option { support::child(&self.syntax) } } #[derive(Debug, Clone, PartialEq, Eq, Hash)] pub struct ArrayType { @@ -1018,26 +820,14 @@ impl AstNode for ArrayType { None } } - fn syntax(&self) -> &SyntaxNode { - &self.syntax - } + fn syntax(&self) -> &SyntaxNode { &self.syntax } } impl ArrayType { - pub fn l_brack(&self) -> Option { - support::token(&self.syntax) - } - pub fn type_ref(&self) -> Option { - support::child(&self.syntax) - } - pub fn semi(&self) -> Option { - support::token(&self.syntax) - } - pub fn expr(&self) -> Option { - support::child(&self.syntax) - } - pub fn r_brack(&self) -> Option { - support::token(&self.syntax) - } + pub fn l_brack(&self) -> Option { support::token(&self.syntax) } + pub fn type_ref(&self) -> Option { support::child(&self.syntax) } + pub fn semi(&self) -> Option { support::token(&self.syntax) } + pub fn expr(&self) -> Option { support::child(&self.syntax) } + pub fn r_brack(&self) -> Option { support::token(&self.syntax) } } #[derive(Debug, Clone, PartialEq, Eq, Hash)] pub struct SliceType { @@ -1062,20 +852,12 @@ impl AstNode for SliceType { None } } - fn syntax(&self) -> &SyntaxNode { - &self.syntax - } + fn syntax(&self) -> &SyntaxNode { &self.syntax } } impl SliceType { - pub fn l_brack(&self) -> Option { - support::token(&self.syntax) - } - pub fn type_ref(&self) -> Option { - support::child(&self.syntax) - } - pub fn r_brack(&self) -> Option { - support::token(&self.syntax) - } + pub fn l_brack(&self) -> Option { support::token(&self.syntax) } + pub fn type_ref(&self) -> Option { support::child(&self.syntax) } + pub fn r_brack(&self) -> Option { support::token(&self.syntax) } } #[derive(Debug, Clone, PartialEq, Eq, Hash)] pub struct ReferenceType { @@ -1100,23 +882,13 @@ impl AstNode for ReferenceType { None } } - fn syntax(&self) -> &SyntaxNode { - &self.syntax - } + fn syntax(&self) -> &SyntaxNode { &self.syntax } } impl ReferenceType { - pub fn amp(&self) -> Option { - support::token(&self.syntax) - } - pub fn lifetime(&self) -> Option { - support::token(&self.syntax) - } - pub fn mut_kw(&self) -> Option { - support::token(&self.syntax) - } - pub fn type_ref(&self) -> Option { - support::child(&self.syntax) - } + pub fn amp(&self) -> Option { support::token(&self.syntax) } + pub fn lifetime(&self) -> Option { support::token(&self.syntax) } + pub fn mut_kw(&self) -> Option { support::token(&self.syntax) } + pub fn type_ref(&self) -> Option { support::child(&self.syntax) } } #[derive(Debug, Clone, PartialEq, Eq, Hash)] pub struct PlaceholderType { @@ -1141,14 +913,10 @@ impl AstNode for PlaceholderType { None } } - fn syntax(&self) -> &SyntaxNode { - &self.syntax - } + fn syntax(&self) -> &SyntaxNode { &self.syntax } } impl PlaceholderType { - pub fn underscore(&self) -> Option { - support::token(&self.syntax) - } + pub fn underscore(&self) -> Option { support::token(&self.syntax) } } #[derive(Debug, Clone, PartialEq, Eq, Hash)] pub struct FnPointerType { @@ -1173,26 +941,14 @@ impl AstNode for FnPointerType { None } } - fn syntax(&self) -> &SyntaxNode { - &self.syntax - } + fn syntax(&self) -> &SyntaxNode { &self.syntax } } impl FnPointerType { - pub fn abi(&self) -> Option { - support::child(&self.syntax) - } - pub fn unsafe_kw(&self) -> Option { - support::token(&self.syntax) - } - pub fn fn_kw(&self) -> Option { - support::token(&self.syntax) - } - pub fn param_list(&self) -> Option { - support::child(&self.syntax) - } - pub fn ret_type(&self) -> Option { - support::child(&self.syntax) - } + pub fn abi(&self) -> Option { support::child(&self.syntax) } + pub fn unsafe_kw(&self) -> Option { support::token(&self.syntax) } + pub fn fn_kw(&self) -> Option { support::token(&self.syntax) } + pub fn param_list(&self) -> Option { support::child(&self.syntax) } + pub fn ret_type(&self) -> Option { support::child(&self.syntax) } } #[derive(Debug, Clone, PartialEq, Eq, Hash)] pub struct ForType { @@ -1217,20 +973,12 @@ impl AstNode for ForType { None } } - fn syntax(&self) -> &SyntaxNode { - &self.syntax - } + fn syntax(&self) -> &SyntaxNode { &self.syntax } } impl ForType { - pub fn for_kw(&self) -> Option { - support::token(&self.syntax) - } - pub fn type_param_list(&self) -> Option { - support::child(&self.syntax) - } - pub fn type_ref(&self) -> Option { - support::child(&self.syntax) - } + pub fn for_kw(&self) -> Option { support::token(&self.syntax) } + pub fn type_param_list(&self) -> Option { support::child(&self.syntax) } + pub fn type_ref(&self) -> Option { support::child(&self.syntax) } } #[derive(Debug, Clone, PartialEq, Eq, Hash)] pub struct ImplTraitType { @@ -1255,15 +1003,11 @@ impl AstNode for ImplTraitType { None } } - fn syntax(&self) -> &SyntaxNode { - &self.syntax - } + fn syntax(&self) -> &SyntaxNode { &self.syntax } } impl ast::TypeBoundsOwner for ImplTraitType {} impl ImplTraitType { - pub fn impl_kw(&self) -> Option { - support::token(&self.syntax) - } + pub fn impl_kw(&self) -> Option { support::token(&self.syntax) } } #[derive(Debug, Clone, PartialEq, Eq, Hash)] pub struct DynTraitType { @@ -1288,15 +1032,11 @@ impl AstNode for DynTraitType { None } } - fn syntax(&self) -> &SyntaxNode { - &self.syntax - } + fn syntax(&self) -> &SyntaxNode { &self.syntax } } impl ast::TypeBoundsOwner for DynTraitType {} impl DynTraitType { - pub fn dyn_kw(&self) -> Option { - support::token(&self.syntax) - } + pub fn dyn_kw(&self) -> Option { support::token(&self.syntax) } } #[derive(Debug, Clone, PartialEq, Eq, Hash)] pub struct TupleExpr { @@ -1321,21 +1061,13 @@ impl AstNode for TupleExpr { None } } - fn syntax(&self) -> &SyntaxNode { - &self.syntax - } + fn syntax(&self) -> &SyntaxNode { &self.syntax } } impl ast::AttrsOwner for TupleExpr {} impl TupleExpr { - pub fn l_paren(&self) -> Option { - support::token(&self.syntax) - } - pub fn exprs(&self) -> AstChildren { - support::children(&self.syntax) - } - pub fn r_paren(&self) -> Option { - support::token(&self.syntax) - } + pub fn l_paren(&self) -> Option { support::token(&self.syntax) } + pub fn exprs(&self) -> AstChildren { support::children(&self.syntax) } + pub fn r_paren(&self) -> Option { support::token(&self.syntax) } } #[derive(Debug, Clone, PartialEq, Eq, Hash)] pub struct ArrayExpr { @@ -1360,24 +1092,14 @@ impl AstNode for ArrayExpr { None } } - fn syntax(&self) -> &SyntaxNode { - &self.syntax - } + fn syntax(&self) -> &SyntaxNode { &self.syntax } } impl ast::AttrsOwner for ArrayExpr {} impl ArrayExpr { - pub fn l_brack(&self) -> Option { - support::token(&self.syntax) - } - pub fn exprs(&self) -> AstChildren { - support::children(&self.syntax) - } - pub fn semi(&self) -> Option { - support::token(&self.syntax) - } - pub fn r_brack(&self) -> Option { - support::token(&self.syntax) - } + pub fn l_brack(&self) -> Option { support::token(&self.syntax) } + pub fn exprs(&self) -> AstChildren { support::children(&self.syntax) } + pub fn semi(&self) -> Option { support::token(&self.syntax) } + pub fn r_brack(&self) -> Option { support::token(&self.syntax) } } #[derive(Debug, Clone, PartialEq, Eq, Hash)] pub struct ParenExpr { @@ -1402,21 +1124,13 @@ impl AstNode for ParenExpr { None } } - fn syntax(&self) -> &SyntaxNode { - &self.syntax - } + fn syntax(&self) -> &SyntaxNode { &self.syntax } } impl ast::AttrsOwner for ParenExpr {} impl ParenExpr { - pub fn l_paren(&self) -> Option { - support::token(&self.syntax) - } - pub fn expr(&self) -> Option { - support::child(&self.syntax) - } - pub fn r_paren(&self) -> Option { - support::token(&self.syntax) - } + pub fn l_paren(&self) -> Option { support::token(&self.syntax) } + pub fn expr(&self) -> Option { support::child(&self.syntax) } + pub fn r_paren(&self) -> Option { support::token(&self.syntax) } } #[derive(Debug, Clone, PartialEq, Eq, Hash)] pub struct PathExpr { @@ -1441,14 +1155,10 @@ impl AstNode for PathExpr { None } } - fn syntax(&self) -> &SyntaxNode { - &self.syntax - } + fn syntax(&self) -> &SyntaxNode { &self.syntax } } impl PathExpr { - pub fn path(&self) -> Option { - support::child(&self.syntax) - } + pub fn path(&self) -> Option { support::child(&self.syntax) } } #[derive(Debug, Clone, PartialEq, Eq, Hash)] pub struct LambdaExpr { @@ -1473,30 +1183,16 @@ impl AstNode for LambdaExpr { None } } - fn syntax(&self) -> &SyntaxNode { - &self.syntax - } + fn syntax(&self) -> &SyntaxNode { &self.syntax } } impl ast::AttrsOwner for LambdaExpr {} impl LambdaExpr { - pub fn static_kw(&self) -> Option { - support::token(&self.syntax) - } - pub fn async_kw(&self) -> Option { - support::token(&self.syntax) - } - pub fn move_kw(&self) -> Option { - support::token(&self.syntax) - } - pub fn param_list(&self) -> Option { - support::child(&self.syntax) - } - pub fn ret_type(&self) -> Option { - support::child(&self.syntax) - } - pub fn body(&self) -> Option { - support::child(&self.syntax) - } + pub fn static_kw(&self) -> Option { support::token(&self.syntax) } + pub fn async_kw(&self) -> Option { support::token(&self.syntax) } + pub fn move_kw(&self) -> Option { support::token(&self.syntax) } + pub fn param_list(&self) -> Option { support::child(&self.syntax) } + pub fn ret_type(&self) -> Option { support::child(&self.syntax) } + pub fn body(&self) -> Option { support::child(&self.syntax) } } #[derive(Debug, Clone, PartialEq, Eq, Hash)] pub struct IfExpr { @@ -1521,18 +1217,12 @@ impl AstNode for IfExpr { None } } - fn syntax(&self) -> &SyntaxNode { - &self.syntax - } + fn syntax(&self) -> &SyntaxNode { &self.syntax } } impl ast::AttrsOwner for IfExpr {} impl IfExpr { - pub fn if_kw(&self) -> Option { - support::token(&self.syntax) - } - pub fn condition(&self) -> Option { - support::child(&self.syntax) - } + pub fn if_kw(&self) -> Option { support::token(&self.syntax) } + pub fn condition(&self) -> Option { support::child(&self.syntax) } } #[derive(Debug, Clone, PartialEq, Eq, Hash)] pub struct LoopExpr { @@ -1557,16 +1247,12 @@ impl AstNode for LoopExpr { None } } - fn syntax(&self) -> &SyntaxNode { - &self.syntax - } + fn syntax(&self) -> &SyntaxNode { &self.syntax } } impl ast::AttrsOwner for LoopExpr {} impl ast::LoopBodyOwner for LoopExpr {} impl LoopExpr { - pub fn loop_kw(&self) -> Option { - support::token(&self.syntax) - } + pub fn loop_kw(&self) -> Option { support::token(&self.syntax) } } #[derive(Debug, Clone, PartialEq, Eq, Hash)] pub struct TryBlockExpr { @@ -1591,18 +1277,12 @@ impl AstNode for TryBlockExpr { None } } - fn syntax(&self) -> &SyntaxNode { - &self.syntax - } + fn syntax(&self) -> &SyntaxNode { &self.syntax } } impl ast::AttrsOwner for TryBlockExpr {} impl TryBlockExpr { - pub fn try_kw(&self) -> Option { - support::token(&self.syntax) - } - pub fn body(&self) -> Option { - support::child(&self.syntax) - } + pub fn try_kw(&self) -> Option { support::token(&self.syntax) } + pub fn body(&self) -> Option { support::child(&self.syntax) } } #[derive(Debug, Clone, PartialEq, Eq, Hash)] pub struct ForExpr { @@ -1627,25 +1307,15 @@ impl AstNode for ForExpr { None } } - fn syntax(&self) -> &SyntaxNode { - &self.syntax - } + fn syntax(&self) -> &SyntaxNode { &self.syntax } } impl ast::AttrsOwner for ForExpr {} impl ast::LoopBodyOwner for ForExpr {} impl ForExpr { - pub fn for_kw(&self) -> Option { - support::token(&self.syntax) - } - pub fn pat(&self) -> Option { - support::child(&self.syntax) - } - pub fn in_kw(&self) -> Option { - support::token(&self.syntax) - } - pub fn iterable(&self) -> Option { - support::child(&self.syntax) - } + pub fn for_kw(&self) -> Option { support::token(&self.syntax) } + pub fn pat(&self) -> Option { support::child(&self.syntax) } + pub fn in_kw(&self) -> Option { support::token(&self.syntax) } + pub fn iterable(&self) -> Option { support::child(&self.syntax) } } #[derive(Debug, Clone, PartialEq, Eq, Hash)] pub struct WhileExpr { @@ -1670,19 +1340,13 @@ impl AstNode for WhileExpr { None } } - fn syntax(&self) -> &SyntaxNode { - &self.syntax - } + fn syntax(&self) -> &SyntaxNode { &self.syntax } } impl ast::AttrsOwner for WhileExpr {} impl ast::LoopBodyOwner for WhileExpr {} impl WhileExpr { - pub fn while_kw(&self) -> Option { - support::token(&self.syntax) - } - pub fn condition(&self) -> Option { - support::child(&self.syntax) - } + pub fn while_kw(&self) -> Option { support::token(&self.syntax) } + pub fn condition(&self) -> Option { support::child(&self.syntax) } } #[derive(Debug, Clone, PartialEq, Eq, Hash)] pub struct ContinueExpr { @@ -1707,18 +1371,12 @@ impl AstNode for ContinueExpr { None } } - fn syntax(&self) -> &SyntaxNode { - &self.syntax - } + fn syntax(&self) -> &SyntaxNode { &self.syntax } } impl ast::AttrsOwner for ContinueExpr {} impl ContinueExpr { - pub fn continue_kw(&self) -> Option { - support::token(&self.syntax) - } - pub fn lifetime(&self) -> Option { - support::token(&self.syntax) - } + pub fn continue_kw(&self) -> Option { support::token(&self.syntax) } + pub fn lifetime(&self) -> Option { support::token(&self.syntax) } } #[derive(Debug, Clone, PartialEq, Eq, Hash)] pub struct BreakExpr { @@ -1743,21 +1401,13 @@ impl AstNode for BreakExpr { None } } - fn syntax(&self) -> &SyntaxNode { - &self.syntax - } + fn syntax(&self) -> &SyntaxNode { &self.syntax } } impl ast::AttrsOwner for BreakExpr {} impl BreakExpr { - pub fn break_kw(&self) -> Option { - support::token(&self.syntax) - } - pub fn lifetime(&self) -> Option { - support::token(&self.syntax) - } - pub fn expr(&self) -> Option { - support::child(&self.syntax) - } + pub fn break_kw(&self) -> Option { support::token(&self.syntax) } + pub fn lifetime(&self) -> Option { support::token(&self.syntax) } + pub fn expr(&self) -> Option { support::child(&self.syntax) } } #[derive(Debug, Clone, PartialEq, Eq, Hash)] pub struct Label { @@ -1782,14 +1432,10 @@ impl AstNode for Label { None } } - fn syntax(&self) -> &SyntaxNode { - &self.syntax - } + fn syntax(&self) -> &SyntaxNode { &self.syntax } } impl Label { - pub fn lifetime(&self) -> Option { - support::token(&self.syntax) - } + pub fn lifetime(&self) -> Option { support::token(&self.syntax) } } #[derive(Debug, Clone, PartialEq, Eq, Hash)] pub struct BlockExpr { @@ -1814,21 +1460,13 @@ impl AstNode for BlockExpr { None } } - fn syntax(&self) -> &SyntaxNode { - &self.syntax - } + fn syntax(&self) -> &SyntaxNode { &self.syntax } } impl ast::AttrsOwner for BlockExpr {} impl BlockExpr { - pub fn label(&self) -> Option