forked from enlightenment/efl
csharp: Respect beta for type aliases
Summary: Also add beta info to `alias_def` in eolian_cxx. Reviewers: brunobelo, felipealmeida, woohyun, segfaultxavi Reviewed By: segfaultxavi Subscribers: segfaultxavi, cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D10315
This commit is contained in:
parent
9dcfe4bbbc
commit
fb7c35269c
|
@ -18,7 +18,7 @@ struct alias_definition_generator
|
||||||
template<typename OutputIterator, typename Context>
|
template<typename OutputIterator, typename Context>
|
||||||
bool generate(OutputIterator sink, attributes::alias_def const& alias, Context const& context) const
|
bool generate(OutputIterator sink, attributes::alias_def const& alias, Context const& context) const
|
||||||
{
|
{
|
||||||
if (blacklist::is_alias_blacklisted(alias))
|
if (blacklist::is_alias_blacklisted(alias, context))
|
||||||
{
|
{
|
||||||
EINA_CXX_DOM_LOG_DBG(eolian_mono::domain) << "Alias " << name_helpers::alias_full_eolian_name(alias) << "is blacklisted. Skipping.";
|
EINA_CXX_DOM_LOG_DBG(eolian_mono::domain) << "Alias " << name_helpers::alias_full_eolian_name(alias) << "is blacklisted. Skipping.";
|
||||||
return true;
|
return true;
|
||||||
|
|
|
@ -119,8 +119,13 @@ inline bool is_struct_blacklisted(attributes::regular_type_def const& struct_)
|
||||||
return is_struct_blacklisted(name_helpers::type_full_eolian_name(struct_));
|
return is_struct_blacklisted(name_helpers::type_full_eolian_name(struct_));
|
||||||
}
|
}
|
||||||
|
|
||||||
inline bool is_alias_blacklisted(attributes::alias_def const& alias)
|
template <typename Context>
|
||||||
|
inline bool is_alias_blacklisted(attributes::alias_def const& alias, Context const& context)
|
||||||
{
|
{
|
||||||
|
auto options = efl::eolian::grammar::context_find_tag<options_context>(context);
|
||||||
|
if (alias.is_beta && !options.want_beta)
|
||||||
|
return true;
|
||||||
|
|
||||||
return name_helpers::alias_full_eolian_name(alias) == "Eina.Error";
|
return name_helpers::alias_full_eolian_name(alias) == "Eina.Error";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -554,8 +554,10 @@ struct alias_def
|
||||||
bool is_undefined;
|
bool is_undefined;
|
||||||
type_def base_type {};
|
type_def base_type {};
|
||||||
documentation_def documentation;
|
documentation_def documentation;
|
||||||
|
bool is_beta;
|
||||||
|
|
||||||
alias_def(Eolian_Typedecl const* alias_obj, Eolian_Unit const* unit)
|
alias_def(Eolian_Typedecl const* alias_obj, Eolian_Unit const* unit)
|
||||||
|
: is_beta(::eolian_typedecl_is_beta(alias_obj))
|
||||||
{
|
{
|
||||||
cxx_name = eolian_name = ::eolian_typedecl_short_name_get(alias_obj);
|
cxx_name = eolian_name = ::eolian_typedecl_short_name_get(alias_obj);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue