summaryrefslogtreecommitdiff
path: root/src/lib/eolian_cxx/grammar/types_definition.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/eolian_cxx/grammar/types_definition.hpp')
-rw-r--r--src/lib/eolian_cxx/grammar/types_definition.hpp38
1 files changed, 38 insertions, 0 deletions
diff --git a/src/lib/eolian_cxx/grammar/types_definition.hpp b/src/lib/eolian_cxx/grammar/types_definition.hpp
new file mode 100644
index 0000000000..e4c40737d6
--- /dev/null
+++ b/src/lib/eolian_cxx/grammar/types_definition.hpp
@@ -0,0 +1,38 @@
1#ifndef EOLIAN_CXX_TYPES_DEFINITION_HH
2#define EOLIAN_CXX_TYPES_DEFINITION_HH
3
4#include "header_guards.hpp"
5#include "eps.hpp"
6#include "string.hpp"
7#include "sequence.hpp"
8#include "kleene.hpp"
9#include "header_include_directive.hpp"
10#include "type_function_declaration.hpp"
11
12namespace efl { namespace eolian { namespace grammar {
13
14struct types_definition_generator
15{
16 template <typename OutputIterator, typename Context>
17 bool generate(OutputIterator sink, std::vector<attributes::function_def> const& functions, Context const& ctx) const
18 {
19 if(!as_generator(*(type_function_declaration()))
20 .generate(sink, functions, ctx))
21 return false;
22 return true;
23 }
24};
25
26template <>
27struct is_eager_generator<types_definition_generator> : std::true_type {};
28
29namespace type_traits {
30template <>
31struct attributes_needed<types_definition_generator> : std::integral_constant<int, 1> {};
32}
33
34types_definition_generator const types_definition = {};
35
36} } }
37
38#endif