Skip to content

Commit

Permalink
former : experimenting
Browse files Browse the repository at this point in the history
  • Loading branch information
Wandalen committed Apr 29, 2024
1 parent c1b8311 commit e8a3220
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 19 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -429,8 +429,7 @@ where
// where
// Definition : former::FormerDefinition,
// Definition::Types : former::FormerDefinitionTypes< Storage = ParentFormerStorage< >, Formed = Parent< > >,
// // xxx
// < Definition::Types as former::FormerDefinitionTypes >::Storage : former::StoragePreform,
// x < Definition::Types as former::FormerDefinitionTypes >::Storage : former::StoragePreform,
// < Definition::Types as former::FormerDefinitionTypes >::Storage : former::StoragePreform< Preformed = Parent< > >,
// Definition : former::FormerDefinition,
// Definition::Types : former::FormerDefinitionTypes< Storage = ParentFormerStorage< > >,
Expand Down Expand Up @@ -496,19 +495,19 @@ where
// Self : former::FormingEnd< ParentFormerDefinitionTypes< SuperFormer, SuperFormer >, >,
// {}

// = assign
//

#[ doc = r" Return original former after container for `vec_1` is done." ]
#[ allow( non_camel_case_types ) ]
pub struct ParentFormerAssignChildrenEnd;

#[ automatically_derived ]
impl< Definition, > former::FormingEnd< former::VectorDefinition< Child, ParentFormer< Definition, >, ParentFormer< Definition, >, former::NoEnd >, > for ParentFormerAssignChildrenEnd
impl< Definition, > former::FormingEnd
< former::VectorDefinition< Child, ParentFormer< Definition, >, ParentFormer< Definition, >, former::NoEnd >, >
for ParentFormerAssignChildrenEnd
where
Definition : former::FormerDefinition,
Definition::Types : former::FormerDefinitionTypes< Storage = ParentFormerStorage< > >,
Definition : former::FormerDefinition,
Definition::Types : former::FormerDefinitionTypes< Storage = ParentFormerStorage< > >,
{
#[ inline( always ) ]
fn call(
Expand Down
21 changes: 8 additions & 13 deletions module/core/former_meta/src/derive/former.rs
Original file line number Diff line number Diff line change
Expand Up @@ -939,12 +939,12 @@ fn field_former_assign_map
field : &FormerField< '_ >,
stru : &syn::Ident,
former : &syn::Ident,
former_storage : &syn::Ident,
_former_storage : &syn::Ident,
former_generics_impl : &syn::punctuated::Punctuated< syn::GenericParam, syn::token::Comma >,
former_generics_ty : &syn::punctuated::Punctuated< syn::GenericParam, syn::token::Comma >,
former_generics_where : &syn::punctuated::Punctuated< syn::WherePredicate, syn::token::Comma >,
_struct_generics_impl : &syn::punctuated::Punctuated< syn::GenericParam, syn::token::Comma >,
struct_generics_ty : &syn::punctuated::Punctuated< syn::GenericParam, syn::token::Comma >,
_struct_generics_ty : &syn::punctuated::Punctuated< syn::GenericParam, syn::token::Comma >,
_struct_generics_where : &syn::punctuated::Punctuated< syn::WherePredicate, syn::token::Comma >,
)
->
Expand Down Expand Up @@ -1001,11 +1001,11 @@ Result< TokenStream >
>
for #former_assign_end
where
Definition : former::FormerDefinition,
Definition::Types : former::FormerDefinitionTypes
<
Storage = #former_storage < #struct_generics_ty >
>,
// Definition : former::FormerDefinition,
// Definition::Types : former::FormerDefinitionTypes
// <
// Storage = #former_storage < #struct_generics_ty >
// >,
#former_generics_where
{
#[ inline( always ) ]
Expand Down Expand Up @@ -1104,10 +1104,6 @@ Result< TokenStream >
>,
Types2 : former::FormerDefinitionTypes
<
// Storage = < Child as former::EntityToStorage >::Storage,
// Formed = ParentFormer< Definition >,
// Context = ParentFormer< Definition >,
// Storage = < < Vec< #field_ident > as former::ContainerAdd >::Element as former::EntityToStorage >::Storage,
Storage = < < #field_ty as former::ContainerAdd >::Element as former::EntityToStorage >::Storage,
Formed = #former< #former_generics_ty >,
Context = #former< #former_generics_ty >,
Expand Down Expand Up @@ -1777,9 +1773,8 @@ pub fn former( input : proc_macro::TokenStream ) -> Result< TokenStream >

impl< #former_generics_impl > #former< #former_generics_ty >
where
Definition : former::FormerDefinition,
Definition::Types : former::FormerDefinitionTypes< Storage = #former_storage < #struct_generics_ty >, Formed = #stru < #struct_generics_ty > >,
< Definition::Types as former::FormerDefinitionTypes >::Storage : former::StoragePreform< Preformed = #stru < #struct_generics_ty > >,
// < Definition::Types as former::FormerDefinitionTypes >::Storage : former::StoragePreform< Preformed = #stru < #struct_generics_ty > >,
#former_generics_where
{

Expand Down

0 comments on commit e8a3220

Please sign in to comment.