summaryrefslogtreecommitdiff
path: root/src/bin
diff options
context:
space:
mode:
authorLauro Moura <lauromoura@expertisesolutions.com.br>2019-10-09 16:39:38 +0200
committerXavi Artigas <xavierartigas@yahoo.es>2019-10-09 16:45:30 +0200
commitfb7c35269ccc754f257e4fac98d228286ac4f43b (patch)
tree63e36c9225d2d8494a0368e6c9b83390d2859d13 /src/bin
parent9dcfe4bbbce4bef369d4ab7cd23f5c3a61d3a73d (diff)
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
Diffstat (limited to 'src/bin')
-rw-r--r--src/bin/eolian_mono/eolian/mono/alias_definition.hh2
-rw-r--r--src/bin/eolian_mono/eolian/mono/blacklist.hh7
2 files changed, 7 insertions, 2 deletions
diff --git a/src/bin/eolian_mono/eolian/mono/alias_definition.hh b/src/bin/eolian_mono/eolian/mono/alias_definition.hh
index d4a4b5d..5d275a3 100644
--- a/src/bin/eolian_mono/eolian/mono/alias_definition.hh
+++ b/src/bin/eolian_mono/eolian/mono/alias_definition.hh
@@ -18,7 +18,7 @@ struct alias_definition_generator
18 template<typename OutputIterator, typename Context> 18 template<typename OutputIterator, typename Context>
19 bool generate(OutputIterator sink, attributes::alias_def const& alias, Context const& context) const 19 bool generate(OutputIterator sink, attributes::alias_def const& alias, Context const& context) const
20 { 20 {
21 if (blacklist::is_alias_blacklisted(alias)) 21 if (blacklist::is_alias_blacklisted(alias, context))
22 { 22 {
23 EINA_CXX_DOM_LOG_DBG(eolian_mono::domain) << "Alias " << name_helpers::alias_full_eolian_name(alias) << "is blacklisted. Skipping."; 23 EINA_CXX_DOM_LOG_DBG(eolian_mono::domain) << "Alias " << name_helpers::alias_full_eolian_name(alias) << "is blacklisted. Skipping.";
24 return true; 24 return true;
diff --git a/src/bin/eolian_mono/eolian/mono/blacklist.hh b/src/bin/eolian_mono/eolian/mono/blacklist.hh
index 95a5000..ff8080b 100644
--- a/src/bin/eolian_mono/eolian/mono/blacklist.hh
+++ b/src/bin/eolian_mono/eolian/mono/blacklist.hh
@@ -119,8 +119,13 @@ inline bool is_struct_blacklisted(attributes::regular_type_def const& struct_)
119 return is_struct_blacklisted(name_helpers::type_full_eolian_name(struct_)); 119 return is_struct_blacklisted(name_helpers::type_full_eolian_name(struct_));
120} 120}
121 121
122inline bool is_alias_blacklisted(attributes::alias_def const& alias) 122template <typename Context>
123inline bool is_alias_blacklisted(attributes::alias_def const& alias, Context const& context)
123{ 124{
125 auto options = efl::eolian::grammar::context_find_tag<options_context>(context);
126 if (alias.is_beta && !options.want_beta)
127 return true;
128
124 return name_helpers::alias_full_eolian_name(alias) == "Eina.Error"; 129 return name_helpers::alias_full_eolian_name(alias) == "Eina.Error";
125} 130}
126 131