MimIR
0.4-dev
MimIR is my Intermediate Representation
Toggle main menu visibility
Loading...
Searching...
No Matches
autogen.h
Go to the documentation of this file.
1
#pragma once
2
3
#include <
mim/axm.h
>
4
#include <
mim/plugin.h
>
5
6
/// @namespace mim::plug::option @ref option
7
namespace
mim
{
8
namespace
plug::option
{
9
10
static
constexpr
plugin_t
Plugin_Id
= 0x41154a40f0000000;
11
12
/// @name %%option.Opt
13
///@{
14
enum class
Opt
:
flags_t
{
15
};
16
17
///@}
18
19
/// @name %%option.some
20
///@{
21
enum class
some
:
flags_t
{
22
};
23
24
///@}
25
26
/// @name %%option.none
27
///@{
28
enum class
none
:
flags_t
{
29
};
30
31
///@}
32
33
/// @name %%option.some_if
34
///@{
35
enum class
some_if
:
flags_t
{
36
};
37
38
///@}
39
40
/// @name %%option.is_some
41
///@{
42
enum class
is_some
:
flags_t
{
43
};
44
45
///@}
46
47
/// @name %%option.unwrap_unsafe
48
///@{
49
enum class
unwrap_unsafe
:
flags_t
{
50
};
51
52
const
Def
*
normalize_unwrap_unsafe
(
const
Def
*,
const
Def
*,
const
Def
*);
53
///@}
54
55
/// @name %%option.unwrap_or
56
///@{
57
enum class
unwrap_or
:
flags_t
{
58
};
59
60
///@}
61
62
void
register_normalizers
(
Normalizers
& normalizers);
63
64
#define MIM_option_NORMALIZER_IMPL \
65
void register_normalizers(Normalizers& normalizers) {\
66
normalizers[flags_t(Annex::Base<unwrap_unsafe>)] = &normalize_unwrap_unsafe; \
67
}
68
}
// namespace plug::option
69
70
#ifndef DOXYGEN
// don't include in Doxygen documentation
71
72
template
<>
constexpr
flags_t
Annex::Base<plug::option::Opt>
= 0x41154a40f0000000;
73
template
<>
constexpr
size_t
Annex::Num<plug::option::Opt>
= 0;
74
template
<>
constexpr
flags_t
Annex::Base<plug::option::some>
= 0x41154a40f0000100;
75
template
<>
constexpr
size_t
Annex::Num<plug::option::some>
= 0;
76
template
<>
constexpr
flags_t
Annex::Base<plug::option::none>
= 0x41154a40f0000200;
77
template
<>
constexpr
size_t
Annex::Num<plug::option::none>
= 0;
78
template
<>
constexpr
flags_t
Annex::Base<plug::option::some_if>
= 0x41154a40f0000300;
79
template
<>
constexpr
size_t
Annex::Num<plug::option::some_if>
= 0;
80
template
<>
constexpr
flags_t
Annex::Base<plug::option::is_some>
= 0x41154a40f0000400;
81
template
<>
constexpr
size_t
Annex::Num<plug::option::is_some>
= 0;
82
template
<>
constexpr
flags_t
Annex::Base<plug::option::unwrap_unsafe>
= 0x41154a40f0000500;
83
template
<>
constexpr
size_t
Annex::Num<plug::option::unwrap_unsafe>
= 0;
84
template
<>
constexpr
flags_t
Annex::Base<plug::option::unwrap_or>
= 0x41154a40f0000600;
85
template
<>
constexpr
size_t
Annex::Num<plug::option::unwrap_or>
= 0;
86
87
template
<>
struct
Axm::IsANode
<
plug
::option::Opt> {
using
type
=
Axm
; };
88
template
<>
struct
Axm::IsANode
<
plug
::option::some> {
using
type
=
Axm
; };
89
template
<>
struct
Axm::IsANode
<
plug
::option::none> {
using
type
=
Axm
; };
90
template
<>
struct
Axm::IsANode
<
plug
::option::some_if> {
using
type
=
Axm
; };
91
template
<>
struct
Axm::IsANode
<
plug
::option::is_some> {
using
type
=
Axm
; };
92
template
<>
struct
Axm::IsANode
<
plug
::option::unwrap_or> {
using
type
=
Axm
; };
93
94
#endif
95
}
// namespace mim
96
97
#ifndef DOXYGEN
// don't include in Doxygen documentation
98
99
100
#endif
axm.h
mim::Axm::IsANode::type
App type
Definition
axm.h:70
mim::Axm::IsANode
Definition
axm.h:69
mim::Def
Base class for all Defs.
Definition
def.h:273
mim::plug::option
The option Plugin
Definition
normalizers.cpp:5
mim::plug::option::Plugin_Id
static constexpr plugin_t Plugin_Id
Definition
autogen.h:10
mim::plug::option::unwrap_or
unwrap_or
Definition
autogen.h:57
mim::plug::option::is_some
is_some
Definition
autogen.h:42
mim::plug::option::Opt
Opt
Definition
autogen.h:14
mim::plug::option::unwrap_unsafe
unwrap_unsafe
Definition
autogen.h:49
mim::plug::option::normalize_unwrap_unsafe
const Def * normalize_unwrap_unsafe(const Def *, const Def *, const Def *arg)
Definition
normalizers.cpp:7
mim::plug::option::some_if
some_if
Definition
autogen.h:35
mim::plug::option::some
some
Definition
autogen.h:21
mim::plug::option::none
none
Definition
autogen.h:28
mim::plug::option::register_normalizers
void register_normalizers(Normalizers &normalizers)
mim::plug
Definition
lower_for.h:5
mim
Definition
ast.h:16
mim::flags_t
u64 flags_t
Definition
types.h:39
mim::Normalizers
absl::flat_hash_map< flags_t, NormalizeFn > Normalizers
Definition
plugin.h:27
mim::plugin_t
u64 plugin_t
Definition
types.h:40
mim::Node::Axm
@ Axm
Definition
def.h:122
plugin.h
mim::Annex::Num
static constexpr size_t Num
Number of Axm::subtags.
Definition
plugin.h:247
mim::Annex::Base
static constexpr flags_t Base
Definition
plugin.h:248
build
include
mim
plug
option
autogen.h
Generated by
1.18.0