eolian_mono: Respect beta for enum

Summary: this prevent generating beta enum with `-Dmono-beta=false`.

Test Plan: meson setup -Dbindings=mono,cxx -Dmono-beta=false

Reviewers: lauromoura, Jaehyun_Cho

Reviewed By: Jaehyun_Cho

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D10245
This commit is contained in:
Yeongjong Lee 2019-09-30 13:52:45 +09:00 committed by Jaehyun Cho
parent 4429b16e36
commit d1dd3c30b9
2 changed files with 5 additions and 0 deletions

View File

@ -17,6 +17,9 @@ struct enum_definition_generator
template <typename OutputIterator, typename Context>
bool generate(OutputIterator sink, attributes::enum_def const& enum_, Context const& context) const
{
if(enum_.is_beta)
return true;
if(!name_helpers::open_namespaces(sink, enum_.namespaces, context))
return false;

View File

@ -1617,6 +1617,7 @@ struct enum_def
std::vector<std::string> namespaces;
std::vector<enum_value_def> fields;
documentation_def documentation;
bool is_beta;
enum_def(Eolian_Typedecl const* enum_obj, Eolian_Unit const* unit)
{
@ -1634,6 +1635,7 @@ struct enum_def
enum_value_def field_def(&*field_iterator, unit);
this->fields.push_back(field_def);
}
is_beta = eolian_object_is_beta(EOLIAN_OBJECT(enum_obj));
documentation = ::eolian_typedecl_documentation_get(enum_obj);
}