summaryrefslogtreecommitdiff
path: root/src/debug.hh
diff options
context:
space:
mode:
authorEnrico Borba <enricozb@users.noreply.github.com>2024-12-23 09:23:58 +0100
committerGitHub <noreply@github.com>2024-12-23 09:23:58 +0100
commit52125e6336d596aebdd4da91080b3178ddca7449 (patch)
tree27d3e5c01660d567f22fee621c97753f294256b0 /src/debug.hh
parent14cb35f62b36b2f1aa530adb5e31c05ff1347bfc (diff)
parent9c458c50661446fc6e7295787b06422137af099d (diff)
Merge branch 'master' into enricozb/daemon-stdin
Diffstat (limited to 'src/debug.hh')
-rw-r--r--src/debug.hh39
1 files changed, 39 insertions, 0 deletions
diff --git a/src/debug.hh b/src/debug.hh
new file mode 100644
index 00000000..774d5710
--- /dev/null
+++ b/src/debug.hh
@@ -0,0 +1,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