1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
// use std::fmt::Debug;
// use quote::ToTokens;
// use syn::Field;
// use syn::punctuated::Punctuated;
// use crate::composable::FieldComposer;
// use crate::composer::{field_composers_iterator, FieldsComposerRef};
// use crate::ext::ToType;
// use crate::lang::{LangFermentable, Specification};
// use crate::presentable::{Aspect, Expression, ScopeContextPresentable};
// use crate::presentation::Name;
// pub const fn objc_empty_fields_composer<LANG, SPEC>()
// -> FieldsComposerRef<LANG, SPEC>
// where LANG: LangFermentable,
// SPEC: Specification<LANG, Attr: Debug, Expr=Expression<LANG, SPEC>>,
// SPEC::Expr: ScopeContextPresentable,
// Aspect<SPEC::TYC>: ScopeContextPresentable {
// |_| Punctuated::new()
// }
// pub const fn objc_struct_unnamed_fields_composer<LANG, SPEC>()
// -> FieldsComposerRef<LANG, SPEC>
// where LANG: LangFermentable,
// SPEC: Specification<LANG, Attr: Debug, Expr=Expression<LANG, SPEC>, Name=Name<LANG, SPEC>>,
// SPEC::Expr: ScopeContextPresentable,
// Name<LANG, SPEC>: ToTokens,
// Aspect<SPEC::TYC>: ScopeContextPresentable {
// |fields|
// field_composers_iterator(
// fields,
// |index, Field { ty, attrs, .. }|
// FieldComposer::typed(Name::UnnamedStructFieldsComp(ty.clone(), index), ty, false, attrs))
// }
// pub const fn objc_struct_named_fields_composer<LANG, SPEC>()
// -> FieldsComposerRef<LANG, SPEC>
// where LANG: LangFermentable,
// SPEC: Specification<LANG, Attr: Debug, Expr=Expression<LANG, SPEC>, Name=Name<LANG, SPEC>>,
// SPEC::Expr: ScopeContextPresentable,
// Name<LANG, SPEC>: ToTokens,
// Aspect<SPEC::TYC>: ScopeContextPresentable {
// |fields|
// field_composers_iterator(fields, |_index, Field { ident, ty, attrs, .. }|
// FieldComposer::typed(Name::Optional(ident.clone()), ty, true, attrs))
// }
// pub const fn objc_enum_variant_unnamed_fields_composer<LANG, SPEC>()
// -> FieldsComposerRef<LANG, SPEC>
// where LANG: LangFermentable,
// SPEC: Specification<LANG, Attr: Debug, Expr=Expression<LANG, SPEC>, Name=Name<LANG, SPEC>>,
// SPEC::Expr: ScopeContextPresentable,
// Name<LANG, SPEC>: ToTokens,
// Aspect<SPEC::TYC>: ScopeContextPresentable {
// |fields|
// field_composers_iterator(fields, |index, Field { ty, attrs, .. }|
// FieldComposer::typed(Name::UnnamedArg(index), ty, false, attrs))
// }
// pub const OBJC_EMPTY_FIELDS_COMPOSER: FieldsComposerRef<ObjCFermentate, AttrWrapper> = |_| Punctuated::new();
// pub const OBJC_STRUCT_UNNAMED_FIELDS_COMPOSER: FieldsComposerRef<ObjCFermentate, AttrWrapper> = |fields|
// field_composers_iterator(
// fields,
// |index, Field { ty, attrs, .. }|
// FieldComposer::new(
// Name::UnnamedStructFieldsComp(ty.clone(), index),
// FieldTypeKind::r#type(ty),
// false,
// AttrWrapper::from(attrs.cfg_attributes())
// ));
// pub const OBJC_STRUCT_NAMED_FIELDS_COMPOSER: ComposerPresenterByRef<
// CommaPunctuatedFields,
// FieldComposers<ObjCFermentate, AttrWrapper>> = |fields|
// field_composers_iterator(fields, |_index, Field { ident, ty, attrs, .. }|
// FieldComposer::new(
// Name::Optional(ident.clone()),
// FieldTypeKind::r#type(ty),
// true,
// AttrWrapper::from(attrs.cfg_attributes()),
// ));
//
// pub const OBJC_ENUM_VARIANT_UNNAMED_FIELDS_COMPOSER: FieldsComposerRef<ObjCFermentate, AttrWrapper> = |fields|
// field_composers_iterator(fields, |index, Field { ty, attrs, .. }| FieldComposer::new(
// Name::UnnamedArg(index),
// FieldTypeKind::r#type(ty),
// false,
// AttrWrapper::from(attrs.cfg_attributes())));