1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
|
#ifndef debug_hh_INCLUDED
#define debug_hh_INCLUDED
#include "array.hh"
#include "enum.hh"
namespace Kakoune
{
class StringView;
enum class DebugFlags
{
None = 0,
Hooks = 1 << 0,
Shell = 1 << 1,
Profile = 1 << 2,
Keys = 1 << 3,
Commands = 1 << 4,
};
constexpr bool with_bit_ops(Meta::Type<DebugFlags>) { return true; }
constexpr auto enum_desc(Meta::Type<DebugFlags>)
{
return make_array<EnumDesc<DebugFlags>>({
{ DebugFlags::Hooks, "hooks" },
{ DebugFlags::Shell, "shell" },
{ DebugFlags::Profile, "profile" },
{ DebugFlags::Keys, "keys" },
{ DebugFlags::Commands, "commands" },
});
}
void write_to_debug_buffer(StringView str);
}
#endif // debug_hh_INCLUDED
|